0

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)

何か問題ある?

4

1 に答える 1

1

そのログに関連付けられている tsung.xml は確かですか? ログが 4 を示しているときに 1 フェーズしか指定していないように見えます...または、そのループは 1 番目のフェーズを同じようにさらに 3 回リサイクルしますか?

あなたが Tsung にどれだけ精通しているかはわかりませんが、私は数週間前に使い始めたばかりで、冗談ではありません。非常に強力です。スケーリング、分散、および負荷の強制乗算がいかに巧妙に行われるかという理由で、私はそれをずっと前に調整する必要がありました。

かなり頑丈に設定されているようです。遅くなりました。私の数学は決して良くありませんでしたが、あなたは 1 分間に 200,000 の http get を爆破しているようです。200,000 x 3 を掛けて、1 秒あたりの最小パケット数を取得します。それがあなたの意図でしたか?

私がしたことは、それを 1 秒に 1 回、1 分間、1 人のユーザーが到着するまで突き詰めて、それが実際に自然に停止するかどうかを確認し、ロード機能の感覚をつかむことでした。

于 2012-09-30T10:47:41.543 に答える