[Tsung] Suggested method of testing a Jabber Servers max user connects

Taylor Laramie taylor.laramie at globalrelay.net
Tue Feb 5 11:04:38 CET 2008


Wow! Just to preface, thanks for the responses :)

> Hello,
> 
> What is the error message ?
> 
> 
> --
> Nicolas

This is the error message I'm seeing in tsung_controller:
** {badarg,[{erlang,list_to_binary,
                     [["<iq id='",
                       "248376",
                       "' type='get' >",
                       "<query xmlns='jabber:iq:",
                       "auth",
                       "'>",
                       "<username>",
                       [106,98,95,98,101,110,99,104|{error,no_free_userid}],
                       "</username></query></iq>"]]},
             {ts_jabber_common,auth_get,3},
             {ts_client,handle_next_request,2},
             {gen_fsm,handle_msg,7},
             {proc_lib,init_p,5}]}

One thing I did notice from tailing the logs in ejabberd was that even 
when the max number number of connections I thought I had specified in 
the tsung.xml had been reached, it still attempts to connect.

<-- snip of top of tsung.xml -->
   <clients>
     <client host="localhost" use_controller_vm="true" 
maxusers='25000'></client>
   </clients>

  <servers>
   <server host="10.20.7.12" port="5223" type="ssl"></server>
  </servers>

   <load>
    <arrivalphase phase="1" duration="20" unit="minute">
     <users interarrival="0.05" unit="second"></users>
    </arrivalphase>
   </load>

  <options>
   <option type="ts_jabber" name="global_number" value="9000"></option>
   <option type="ts_jabber" name="userid_max" value="9000"></option>
   <option type="ts_jabber" name="domain" value="globalrelay.net"></option>
   <option type="ts_jabber" name="username" value="jb_bench"></option>
   <option type="ts_jabber" name="passwd" value="test"></option>
  </options>

   <sessions>
    <session probability="100" name="jabber-example" type="ts_jabber">

</-- snip-->

In the above the intention is to try and connect 9000 users @ 20ps.

> Did you use ssl support included in tsung or do you change something to
> get tls ?
> 
> How many machines are you using for injection ? a single ?

Just the included SSL support. Unfortionately I only have a single 
machine to use for my testing purposes though the load on the system 
itself is quite low.

> Not sure which Erlang your using, but if it is one of the single-threaded
> versions, then you have to be really careful to watch your CPU utilization
> on the Tsung controller. Even on a multi-cpu box, the single-threaded erlang
> will only use 1 CPU or core for the controller, and once that controller
> process maxes out that CPU, you're done. Doesn't matter how many Tsung
> client processes your are using to spread the load, the controller process
> will be a bottleneck in that situation. I've gotten around this problem in
> the past by simultaneously running multiple Tsung instances (with separate
> sets of users for each controller instance).
>
> SMP erlang should help solve that controller bottleneck problem, but I
> haven't don't have too much first-hand experience with that yet.

I'm using R11B-5 built against OpenSSL 0.9.8g with the current flags for 
erl in the Tsung script:
ERL_OPTS=" -smp +K true +A 1 ERL_MAX_ETS_TABLES 40000 +P 100000 "
Also ERL_MAX_PORTS is set to 50000. Load on the tsung system is really 
quite low as is the memory usage (I haven't installed snmpd though to 
track the  min/max so I can't confirm right now).
I also reset the ephemeral from what they were defaulted to (32768 
61000) to a higher value though I didn't see any sign of port exhaustion.
Lastly :) ulimit for nofile has been set to 65535.

-- 
Taylor Laramie
Systems Administrator


More information about the Tsung-users mailing list