The use of Tsung in the pressure test of the MQTT switch

Source: Internet
Author: User

Transferred from: http://www.cnblogs.com/lingyejun/p/7941271.html

Ntsung Test Tool Basic Test command for Tsung-f ~/.tsung/mqtt.xml-l < log save path > Start

Mqtt.xml are as follows (can be found under the/usr/share/doc/tsung/examples path):

Official documents: http://tsung.erlang-projects.org/user_manual/conf-client-server.html

Tsung Installation Steps on the server
Tsung total number of connections during pressure measurement = number of native available IP addresses x number of available ports in the remote server x number of IP addresses available to the remotely accessible server. Yum install-y gcc gcc-c++ make libX11 xauthyum install-y cairo-devel pango-devel freetype-devel gd-develyum install-y N Curses-devel openssl-devel unixodbc-devel wxwidgets-devel wxgtk3-docs mesa-libgl-devel wget http://erlang.org/ Download/otp_src_20.0.tar.gzwget https://www.cpan.org/modules/by-module/Template/ Template-toolkit-2.26.tar.gzwget http://tsung.erlang-projects.org/dist/tsung-1.7.0.tar.gz  tar zxf otp_src_ 20.0.TAR.GZCD otp_src_20.0./configure--prefix=/usr/local/erlang--without-javacmake-j 2make install  tar zxf GNUPLOT-4.4.2.TAR.GZCD gnuplot-4.4.2./configuremake-j 2make Install export path= $PATH:/usr/local/erlang/bin/tar zxf TSUNG-1.7.0.TAR.GZCD tsung-1.7.0./configure--prefix=/usr/local/tsung

  

test scripts for Tsung
<?xml version= "1.0"? ><!    DOCTYPE Tsung SYSTEM "/usr/local/tsung/share/tsung/tsung-1.0.dtd" ><tsung loglevel= "Debug" version= "1.0" > <clients> <client host= "Bogon" maxusers= "100000" cpu= "1" > <ip value= "192.168.1.152" ></ip&      Gt <ip value= "192.168.1.153" ></ip> <ip value= "192.168.1.154" ></ip> <ip value= "192.168.1. 155 "></ip> </client> </clients> <servers> <server host=" 192.168.1.110 "port= "61613" type= "tcp"/> </servers> <load> <user session= "mqtt_subscriber" start_time= "Uni" t= "Second" ></user> <arrivalphase phase= 1 "duration=" unit= "Second" > <users maxnumb        Er= "100000" arrivalrate= "unit=" second "/> </arrivalphase> </load> <sessions>            <session name= "Mqtt_publisher" probability= "type=" > <request>    <mqtt type= "Connect" clean_start= "true" keepalive= "ten" username= "admin" password= "password" will_topic= "phihome/  Test "will_qos=" 0 "will_msg=" will_msg "will_retain=" false "></mqtt> </request> <for from= "1" to= "ten" incr= "1" var= "loops" > <request subst= "true" > <mqtt type= "P            Ublish "topic=" Phihome/test "qos=" 1 "retained=" true ">test_message</mqtt> </request> </for> <request> <mqtt type= "Disconnect" ></mqtt> </requ est> </session> <session name= "mqtt_subscriber" probability= "0" type= "ts_mqtt" > &L t;request> <mqtt type= "Connect" clean_start= "true" keepalive= "ten" ></mqtt> </re Quest> <request subst= "true" > <mqtt type= "subscribe" topic= "Test_topic" qos= "1" >& Lt;/mqtt> </request> <request> <!--wait for 60s-<mqtt type= "Waitform                Essages "timeout=" ></mqtt> </request> <request subst= "true" >                <mqtt type= "Unsubscribe" topic= "Test_topic" ></mqtt> </request> <request> <mqtt type= "Disconnect" ></mqtt> </request> </session> </sessio Ns></tsung>
Test Results Overview

Note: Single Tsung pressure measurement official website pure version Mosquitto (single broker), peak connection number is 197626, followed by the addition of another tsung, altogether two machines together pressure.

Number of connections at maximum peak of a single station:

The number of connections at the maximum of two peaks:

The use of Tsung in the pressure test of the MQTT switch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.