[英]When using Smack 4.1.0 API as a XMPP Client for Google’s GCM CCS, SecurityMode.required is not working
[英]XMPP Load Test Using Smack Client API
我想通過執行XMPP負載測試來測量XMPP服務器容量。 因此,我實現了負載測試器,並使用Smack Client API進行連接處理。
但是我發現它是如此昂貴,因為每個連接創建了三個線程(SmackExecutor,Reader和Writter)。
因此,盡管增加了計算機操作系統的限制(例如文件限制器),但我不能在一台強大的計算機上打開超過10K的連接。
您是否建議一種工具或實現方式在一台機器上處理超過20K的連接。
]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 513395
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 524288
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 262144
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[![在此處輸入圖片描述] [2]] [2]
依賴關系:
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack</artifactId>
<version>4.0.4</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smackx</artifactId>
<version>4.0.4</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-debug</artifactId>
<version>4.0.4</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-tcp</artifactId>
<version>4.0.4</version>
</dependency>
在網站https://discourse.igniterealtime.org/t/maximum-concurrent-users-possible-with-smack/72868/5上,我的問題有幾種意見
Smack was not designed to create 10.000s of connections within
the same JVM (of course having multiple XMPPConnection within the same JVM is fine).
I would recommend using a more lightweight XMPP library written in C or in Lua for stress testing.
You could also use multiple JVM processes, but still, the overhead caused by the threads
Smack uses per connection make it not the ideal library for stress testing.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.