Project

General

Profile

How to config to supports large connections in a room.

Bruce Chung
Added over 2 years ago

I use Tsung to do the stress test on Tigase 7.0.4.

From the tsung report, I see the Users-maximum_simultaneous high value is just 800.

Is it means that the Tigase just supports concurrent 800 connections?

The tigase configuration is below:

The etc/init.properties has

--new-connections-throttling=5222:2000

The etc/tigase.conf has

JAVA_OPTIONS="${GC} ${EX} ${ENC} ${DRV} ${JMX_REMOTE_IP} -server -Xms16384M -Xmx16384M "

The tsung scripts as below.

I want to simulate the scene: 30000 connections join in one room with rate 100/sec and send out group chat message.

<?xml version="1.0"?><tsung loglevel="notice" version="1.0">

  <clients>
    <client host="localhost" use_controller_vm="true" maxusers="100000"/>
  </clients>

  <servers>
  <server host="im.swift.com" port="5222" type="tcp"/>
 </servers>

  <load>
    <arrivalphase phase="1" duration="50" unit="minute">
       <users maxnumber="30000" interarrival="0.01" unit="second"/>
    </arrivalphase>
  </load>

  <options>
  <option type="ts_jabber" name="global_number" value="30000"/>
  <option type="ts_jabber" name="userid_max" value="30000"/>
  <option type="ts_jabber" name="domain" value="im.swift.com"/>
  <option type="ts_jabber" name="username" value="test_"/>
  <option type="ts_jabber" name="passwd" value="test_"/>

  <option type="ts_jabber" name="muc_service" value="muc.im.swift.com"/>
  </options>

  <sessions>
   <session bidi="true" probability="100" name="jabber-muc" type="ts_jabber">

      <request> <jabber type="connect" ack="no_ack"/> </request>
      <thinktime value="5"/>

      <transaction name="authenticate">
         <request> <jabber type="auth_get" ack="local"/> </request>
         <request> <jabber type="auth_set_plain" ack="local"/> </request>
      </transaction>

      <request> <jabber type="presence:initial" ack="no_ack"/> </request>
      <thinktime value="2"/>

      <transaction name="roster">
         <request> <jabber type="iq:roster:get" ack="local"/></request>
      </transaction>

      <thinktime value="10"/>

      <setdynvars sourcetype="random_string" length="15">
          <var name="nick1"/>
      </setdynvars>

      <request subst="true"> <jabber type="muc:join" ack="local" room="room-1" nick="%%_nick1%%_pfm"/> </request> 

      <thinktime value="5"/>

      <for from="1" to="10" var="i">
         <transaction name="online_chat">
            <request subst="true"> <jabber type="muc:chat" ack="no_ack" size="16" room="room-1"/> </request> 
         </transaction>
      </for>

      <thinktime value="600"/>

      <transaction name="close">
        <request> <jabber type="close" ack="no_ack"/> </request>
      </transaction>

  </session>


 </sessions>
</tsung>

Replies (1)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 2 years ago

Just a few things, some of which might be obvious to you and I am sorry if I state obvious, but maybe some of them are useful to you:

  1. Load tests are very complex projects, so expect difficulties and prepare to spend lots of time to prepare and run loads tests to get meaningful results

  2. Tsung generally has lower performance and higher resources consumption than Tigase, so you need more HW or VMs for Tsung than for Tigase (more RAM, CPU, etc...)

  3. If there are any performance problems, or problems with reaching test goals, make sure the Tsung is not the limiting factor

  4. If the problem is on the Tigase side, which might be of course, this is often misconfiguration error or leaving out debug logging which slow server down

  5. The main task when running the load test which show lower than expected results is to identify where is the bottleneck, the best source of information is the Tigase statistics, which show over 1,000 different performance metrics

  6. Monitor RAM and CPU usage on both Tsung and Tigase machine

  7. Tigase offers different throttling and limiting mechanism to prevent service abuse, this may affect load test results, so make sure all the settings are adjusted correctly

  8. If you run MUC tests and you want to have 30,000 users in a single room, please take your time to calculate traffic you have to expect. With 800 users as you got, joining 100/sec you have traffic of about: 100*800*2 = 160,000 XMPP packets per second. This is a huge traffic to handle, so you need a lot of CPU power on both the Tsung and Tigase side.

    (1-1/1)