用Tsung对XMPP进行压力测试,登陆用户只有十几个,无法再添加,何故?

时间:2022-12-28 11:40:35

用Tsung对XMPP进行压力测试,登陆用户只有十几个,无法再添加,何故?

下面是配置文件jobber.xml

<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/local/tsung/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0">


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


  <!-- Server side setup -->
 <servers>
  <server host="192.168.1.188" port="5222" type="tcp"></server>
 </servers>


  <load>
   <arrivalphase phase="1" duration="1" unit="minute">
    <users interarrival="2" unit="second"></users>
<users arrivalrate="300" unit="second"></users>
   </arrivalphase> 
  </load>


  <!-- JABBER parameters -->
  <!-- to synchronise users,  use a global acknoledgement -->
 <options>
  <option type="ts_jabber" name="global_number" value="100"></option>
  <option type="ts_jabber" name="userid_max" value="10000"></option>
  <option type="ts_jabber" name="domain" value="192.168.1.188"></option>
  <option type="ts_jabber" name="username" value="tsung"></option>
  <option type="ts_jabber" name="passwd" value="tsung"></option>
 </options>


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


    <request> <jabber type="connect" ack="no_ack"></jabber> </request>
    <thinktime value="2"></thinktime>
    <transaction name="authenticate">
      <request> <jabber type="auth_get" ack="local"></jabber> </request>
      <request> <jabber type="auth_set_plain" ack="local"></jabber> </request>
    </transaction>


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


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


    <thinktime value="30"></thinktime>


    <transaction name="online">
    <request> <jabber type="chat" ack="no_ack" size="16" destination="online"></jabber> </request>
    </transaction>


    <thinktime value="30"></thinktime>


    <transaction name="offline">
      <request> <jabber type="chat" ack="no_ack" size="56" destination="offline"></jabber> </request>
    </transaction>


    <thinktime value="30"></thinktime>


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


  </session>


  <session probability="20" name="jabber-plain" type="ts_jabber">


    <request> <jabber type="connect" ack="no_ack"></jabber> </request>


    <thinktime value="2"></thinktime> 


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


    <thinktime value="30"></thinktime>


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


  </session>





  <session probability="20" name="jabber-digest" type="ts_jabber">


    <!-- regexp captures stream ID returned by server -->
    <request>
      <dyn_variable name="sid" re="&lt;stream:stream id=&quot;(.*)&quot; xmlns:stream"/>
      <jabber type="connect" ack="local"></jabber>
    </request>


    <thinktime value="2"></thinktime>


    <transaction name="auth_digest">
      <request> <jabber type="auth_get" ack="local"></jabber> </request>
      <request subst='true'> <jabber type="auth_set_digest" ack="local"></jabber> </request>
    </transaction>
    <thinktime value="30"></thinktime>


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






  <session probability="10" name="jabber-sipdigest" type="ts_jabber">


    <request> <jabber type="connect" ack="no_ack"></jabber> </request>


    <thinktime value="2"></thinktime>


    <transaction name="auth_sipdigest">
      <!-- regexp captures nonce value returned by server -->
      <request>
        <dyn_variable name="nonce" re="&lt;Nonce encoding=&quot;hex&quot;&gt;(.*)&lt;\/Nonce&gt;"/>
        <jabber type="auth_get" ack="local"></jabber>
      </request>
      <request subst='true'> <jabber type="auth_set_sip" ack="local"></jabber> </request>
    </transaction>
    <thinktime value="30"></thinktime>


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







 </sessions>
</tsung>