1.在测试所用的机器和Openfire服务机器上安装erlang、Tsung等软件,且位置、版本相同
2.运行Openfire服务,包括集群
3.编写or修改Tsung脚本
1)Openfire服务为集群模式
tsung脚本修改如下
<servers>
<server host="127.0.0.1" port="5222" type="tcp"/>
<server host="192.168.1.1" port="5222" type="tcp"/>
</servers>
2)Tsung为集群模式进行测试
由于一台电脑的最大连接数受限,需要多台测试机压更多的用户
每台测试机互相需要SSH登录免密码
tsung脚本修改如下
<clients>
<client host="localhost" weight="1" maxusers="100000" cpu="4"/>
<client host="192.168.1.3" weight="1" maxusers="100000" cpu="4"/>
</clients>
修改电脑本身的最大连接数
查看最大连接数
#ulimit -n
临时修改,仅对该页所在程序有效
#ulimit -n 65535
永久修改,以root用户修改/etc/security/limits.conf,添加以下几行
r
3659




被折叠的 条评论
为什么被折叠?



