tsung并发数量提不上去,怎么解决?

<?xml version="1.0"?>

<!DOCTYPE tsung SYSTEM "/usr/local/tsung/share/tsung/tsung-1.0.dtd">



<!---->

<servers>

<server host="127.1.1.1" port="1883" type="tcp" />

</servers>

<load>

<user session="mqtt_subscriber" start_time="10" unit="second"></user>

<arrivalphase phase="1" duration="5" unit="minute">

<users maxnumber="5000" interarrival="0.01" unit="second"/>

</arrivalphase>

</load>

<sessions>

<session name="mqtt_publisher" probability="100" type="ts_mqtt">

<request>

<mqtt type="connect" clean_start="true" keepalive="10" will_topic="phihome/test" will_qos="1" will_msg="will_msg" will_retain="false"></mqtt>

</request>

<for from="1" to="100" incr="1" var="loops">

<request subst="true">

<mqtt type="publish" topic="phihome/test" qos="1" retained="true">topic_JKCEBJKQCHEHJQajhcsajhcqh1312312312cacasbkca</mqtt>

</request>

</for>

<request>

<mqtt type="disconnect"></mqtt>

</request>

</session>

<session name="mqtt_subscriber" probability="0" type="ts_mqtt">

<request>

<mqtt type="connect" clean_start="true" keepalive="10"></mqtt>

</request>

<request subst="true">

<mqtt type="subscribe" topic="phihome/test" qos="1"></mqtt>

</request>

<request>

<!-- wait for 60s -->

<mqtt type="waitForMessages" timeout="60"></mqtt>

</request>

<request subst="true">

<mqtt type="unsubscribe" topic="phihome/test"></mqtt>

</request>

<request>

<mqtt type="disconnect"></mqtt>

</request>

</session>

</sessions>

文件句柄:ulimit -n 600000
图片说明

创建10000个用户, 并发数量一直低于200

回答

这个要考虑你本身服务器的性能存在问题,比如说网络、io、cpu,监测下。

以上是 tsung并发数量提不上去,怎么解决? 的全部内容, 来源链接: utcz.com/a/41258.html

回到顶部