Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用Smack客户端API进行XMPP负载测试_Java_Load_Smack - Fatal编程技术网

Java 使用Smack客户端API进行XMPP负载测试

Java 使用Smack客户端API进行XMPP负载测试,java,load,smack,Java,Load,Smack,我想通过执行XMPP负载测试来测量XMPP服务器的容量。因此,我实现了一个负载测试仪,并使用Smack客户端API进行连接处理 但我发现它非常昂贵,因为每个连接都创建了三个线程(SmackExecutor、Reader和Writer) 因此,尽管增加了机器操作系统的限制,例如文件析构函数 您是否建议在一台机器上处理20K以上连接的工具或实现方法 ]$ ulimit -a core file size (blocks, -c) 0 data seg size

我想通过执行XMPP负载测试来测量XMPP服务器的容量。因此,我实现了一个负载测试仪,并使用Smack客户端API进行连接处理

但我发现它非常昂贵,因为每个连接都创建了三个线程(SmackExecutor、Reader和Writer)

因此,尽管增加了机器操作系统的限制,例如文件析构函数

您是否建议在一台机器上处理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>

org.igniterealtime.smack
掴
4.0.4
org.igniterealtime.smack
猛击
4.0.4
org.igniterealtime.smack
smack调试
4.0.4
org.igniterealtime.smack
smack tcp
4.0.4

关于我的问题,网站上有几种观点

    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.