简体   繁体   中英

TPS(transactions per second) of Resteasy service waves

I have one REST service written by resteasy framework deployed to Jetty web container.

The TPS performance point calculated by Tsung like below picture

在此处输入图片说明

I debug some parameter,but not work.note that the code is ok verified by some other team.


  • Thread number of Jetty
  • GC of JVM
  • TCP kernel parameters of OS

I do not know why. who can provide some debug parameters or issues raised the result.

Many thanks in advance

The following is configuration of Tsung


<?xml version="1.0"?><tsung loglevel="notice" version="1.5.0">
  <clients>
    <client host="tc-1" maxusers="50000" weight="1"/>
    <client host="tc-3" maxusers="50000" weight="1"/>
    <client host="tc-4" maxusers="50000" weight="1"/>
  </clients>
  <servers>
    <server host="service-ip" port="80" type="tcp"/>
  </servers>
  <monitoring>
    <monitor host="tc-1" type="erlang"/>
    <monitor host="tc-3" type="erlang"/>
    <monitor host="tc-4" type="erlang"/>
  </monitoring>
  <load duration="500" unit="second">
    <arrivalphase duration="500" phase="1" unit="second">
        <users arrivalrate="700" unit="second"/>
    </arrivalphase>
  </load>
  <options>
    <option name="user_agent" type="ts_http">
      <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>
    <option max="60000" min="1025" name="ports_range"/>
    <option name="seed" value="58989679"/>
  </options>
  <sessions>
    <session name="mytest" probability="100" type="ts_http">
        <request subst="true">
          <http content_type="application/json" method="GET" url="/mydata" version="1.1">
            <www_authenticate passwd="pwd" userid="username"/>
          </http>
        </request>
    </session>
  </sessions>
</tsung>

You should reduce the log level first (eg to warning).

How may requests/sec do you make? I can imagine that you have overloaded your tsung controller node. Did you take a look at your resource utilization of your tsung cluster?

You should also try to make more than one request per session, as creating a session/user requires resources and is not for free. eg making 10 req per session and starting 1/10th the users should yield the same request rate, but should also reduce the additional costs of launching a new session.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM