使用Tsung进行测试时,Tigase xmpp服务器崩溃

时间:2013-06-13 08:28:10

标签: java crash xmpp tsung tigase

我正在尝试测试Tigase XMPP服务器5.2.0的功能。

我正在使用tsung 1.4.2运行测试以连接20K用户(一旦20K工作,我将尝试用150K检查它)。大约6000个连接后,tigase崩溃了。 有人可以帮我解决问题吗?

详细说明: tsung的参数是:(每秒12个连接,连接1666秒= 20K用户)

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

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

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

  <load>
   <arrivalphase phase="1" duration="2000" unit="minute">
   <users interarrival="0.08" unit="second"></users>
   </arrivalphase>
  </load>

  <!-- JABBER parameters -->
  <!-- to synchronise users,  use a global acknoledgement -->
 <options>
  <option type="ts_jabber" name="global_number" value="30000"></option>
  <option type="ts_jabber" name="userid_max" value="20000"></option>
  <option type="ts_jabber" name="domain" value="my_domain"></option>
  <option type="ts_jabber" name="username" value="user"></option>
  <option type="ts_jabber" name="passwd" value="pass"></option>
 </options>

  <sessions>
   <session probability="100" 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="2"></thinktime>

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

    <thinktime value="1666"></thinktime>

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

  </session>


 </sessions>
</tsung>

在tigase中,参数是:(init.properties)

config-type=--gen-config-def
--admins=admin@my_domain
--virt-hosts = my_domain

--user-db=mysql
--user-db-uri=jdbc:mysql://mysql_ip:3306/tigasedb?user=user&password=password&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true

tigase.conf:

ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
DRV="-Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver:org.apache.derby.jdbc.EmbeddedDriver"
#GC="-XX:+UseBiasedLocking -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:ParallelCMSThreads=2 -XX:-ReduceInitialCardMarks"
#EX="-XX:+OptimizeStringConcat -XX:+DoEscapeAnalysis -XX:+UseNUMA"
JAVA_HOME="/usr/lib64/jvm/java-1.6.0-openjdk"
CLASSPATH=""
JAVA_OPTIONS="${GC} ${EX} ${ENC} ${DRV} -server -Xms100M -Xmx200M -XX:PermSize=32m -XX:MaxPermSize=256m -XX:MaxDirectMemorySize=128m "
TIGASE_CONFIG="etc/tigase.xml"
TIGASE_OPTIONS=" --property-file etc/init.properties "

1 个答案:

答案 0 :(得分:1)

JVM的内存设置太低。由于OOM,您的安装可能会崩溃。