繁体   English   中英

使用Smack客户端API的XMPP负载测试

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM