超出了持续时间,但并非所有用户都已启动

时间:2012-09-21 06:34:03

标签: tsung

我用tsung测试套接字。

tsung.xml:

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

  <!-- Client side setup -->
  <clients>
    <client host="localhost" use_controller_vm="true" maxusers="10000"/>
  </clients>

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

  <!-- to start os monitoring (cpu, network, memory). Use an erlang
  agent on the remote machine or SNMP. erlang is the default -->
  <!-- <monitoring>
    <monitor host="localhost"></monitor>
  </monitoring> -->

  <!-- <load duration="1" unit="minute" loop="3"> -->
  <load loop="3">
  <arrivalphase phase="1" duration="1" unit="minute">
    <!-- <users interarrival="0.001" unit="second"></users> -->
    <users arrivalrate="200" unit="second" />
  </arrivalphase>
 </load>
<!--
  <options>
   <option type="ts_http" name="user_agent">
    <user_agent probability="80">Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Galeon/1.3.21</user_agent>
    <user_agent probability="20">Mozilla/5.0 (Windows; U; Windows NT 5.2; fr-FR; rv:1.7.8) Gecko/20050511 Firefox/1.0.4</user_agent>
   </option>
  </options>
 -->
  <!-- start a session for a http user. the probability is the
  frequency of this type os session. The sum of all session's
  probabilities must be 100 -->

 <sessions>
  <session probability="100" name="socket-example" type="ts_socket">
    <request>
      <socket></socket>
    </request>
  </session>
 </sessions>
</tsung>

几乎在每个阶段,我都收到了报告:Phase duration exceeded, but not all users were launched,就像下面一样:

=INFO REPORT==== 21-Sep-2012::14:28:44 ===
    ts_config_server:(5:<0.50.0>) All remote beams started, sync 

=INFO REPORT==== 21-Sep-2012::14:28:44 ===
    ts_config_server:(5:<0.50.0>) New arrival phase 1 for client "localhost" (last ? true): will start 6000 users

=INFO REPORT==== 21-Sep-2012::14:28:44 ===
    ts_config_server:(5:<0.50.0>) New arrival phase 2 for client "localhost" (last ? true): will start 6000 users

=INFO REPORT==== 21-Sep-2012::14:28:44 ===
    ts_config_server:(5:<0.50.0>) New arrival phase 3 for client "localhost" (last ? true): will start 6000 users

=INFO REPORT==== 21-Sep-2012::14:28:44 ===
    ts_config_server:(5:<0.50.0>) New arrival phase 4 for client "localhost" (last ? true): will start 6000 users

=INFO REPORT==== 21-Sep-2012::14:28:44 ===
         ts_launcher:(5:<0.84.0>) Expected duration of first phase: 60.0 sec (6000 users) 

=INFO REPORT==== 21-Sep-2012::14:28:44 ===
         ts_launcher:(5:<0.84.0>) Activate launcher (6000 users) in 10019 msec 

=INFO REPORT==== 21-Sep-2012::14:29:54 ===
         ts_launcher:(5:<0.84.0>) Phase duration exceeded, but not all users were launched (440 users, 7.3% of phase)

有什么问题吗?

1 个答案:

答案 0 :(得分:1)

您确定与该日志关联的tsung.xml是什么?看起来你只指定了一个阶段,而日志显示为4 ......或者这个循环是否同样回收第一阶段,再多3次?

不确定你对Tsung的熟悉程度,我刚刚开始使用它几周前,我发现它不是笑话。非常强大。我不得不回过头来调整它,因为它可以扩展,分配并强制增加负载。

看起来你已经把它设置得有点粗壮了。已经很晚了,我的数学从来没有变好,但看起来你只需要一分钟就可以爆发200,000个http秒。继续并乘以200,000 x 3以获得每秒最小的数据包。那是你的意图吗?

我所做的是将它一直撞到1个用户每秒到达1次,持续1分钟,看看它是否会自动停止它自己并感受它的加载能力