tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher K. St. John" <...@distributopia.com>
Subject Performance Test Workload: HelloWorld Servlet
Date Thu, 27 Jun 2002 15:15:53 GMT

 I'm getting unusual preliminary results on some
performance tests against a very simple servlet, and
I'd like to see what results other people get. If
you're going to run the tests yourself, don't look at
my results ahead of time if you can resist (they're at
the bottom of the message)

 I'm http_load'ing against 4.0.3 and 4.1 HEAD using
8 threads and 0,1,8,16 and 32k response sizes. I ran
http_load on one machine and Tomcat on another. I ran
a couple rounds before the final test at each response
size to let the jit warm things up.

 The server.xml I used just declares a single HTTP
connector and a simple Engine/Host/Context. No logging,
valves, etc.

 The results are preliminary because I haven't done the
appropriate system tuning and didn't bother with the
proper controls on what was running on my test box, I
have a sneaking suspicion I'm a few days out of date
on HEAD.etc, etc. Note also that hitting a single URL
over and over is a totally bogus way to test
"performance", but relative results between different
versions of the same software can be interesting.


---------------------------------------------------------

public class HelloServlet extends HttpServlet {

  private static byte[] buf;
  private static int sz = 32*1024;

  public void init() throws ServletException {
    buf = new byte[sz];
    for(int i=0; i<sz; i++)
      buf[i] = 88; // ASCII 'X'
  }

  public void doGet(HttpServletRequest req, HttpServletResponse rsp)
    throws IOException, ServletException
  {
    OutputStream ostr = rsp.getOutputStream();
    ostr.write(buf);
  }
}

-----------------------------------------------------









 PRELIM RESULTS

 MinTC is included for comparison, since it uses the 4.0.3
HTTP connector but attempts to improve the Catalina side
of things. It's sort of the converse of the 4.1
Connector improvements. But it's not finished so it's not
really a fair comparison. Think of it as an upper bound on
where relatively unsophisticated Catalina optimizations
can get you.

 I'm running Linux with kernel 2.4.17, and Java HotSpot(TM)
Client VM (build 1.3.1_02-b02). The results are "better"
with the server VM, but it didn't look like the startup
scripts were running Tomcat that way.

 All results are in "bogo-cps" (bogus connections-per-second).
Note that the idea is not to test against other web servers
(except possibly Apache as a baseline), but against versions
of Tomcat. The 32k results are saturating the local network.

 
		4.0.3		4.1.X		MinTC

   0k/8	  	  881		  960		 1059
   1k/8	  	  855		  916		 1010
   8k/8	  	  719		  732		  767
  16k/8	  	  520		  533		  532
  32k/8	  	  319		  320		  320


 Ignore the absolute numbers, yours will be very different.
(I'm too lazy to normalize them). I'll hold off on
conclusions until I get some feedback about whether other
people are getting similiar results (or if my test setup
was a little too preliminary)


-- 
Christopher St. John cks@distributopia.com
DistribuTopia http://www.distributopia.com

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message