[Zope] Tomcat Vrs Zope Round Two (ding, ding)

J. Atwood jatwood@bwanazulia.com
Fri, 28 Apr 2000 08:30:57 -0400


Ok, so I heard back from a few people yesterday talking about how the 
test was just serving static content and therefore is not really a 
"true" test. It is, though, a test of what Zope + Tomcat can do in 
terms of static performance.

To be fair, I decided to have them do a basic "connect" to a database 
and see what would happen.

Zope Machine: RH 6.1, 300 MHz, 256 MB RAM, 8 GB EIDE Drive - Zope. 2.1.4

Tomcat Machine: RH 6.1, 500 MHz, 512 MB RAM, 3 x 9.1 SCSI in RAID - 
Jakarta Tomcat 3.1

Both with PostGreSQL 6.5.3 installed from RPM. No modifications at all.

The .jsp page just tests the database connection. If it can get to 
the database it returns a string. (I will include the source at the 
bottom). Ran this about 5 times here is the best.

Document Length:        353 bytes

Concurrency Level:      25
Time taken for tests:   9.354 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      75430 bytes
HTML transferred:       35300 bytes
Requests per second:    10.69
Transfer rate:          8.06 kb/s received

Connnection Times (ms)
               min   avg   max
Connect:        0    11    63
Processing:   120  2061  2959
Total:        120  2072  3022

I then modified my Zope test page by creating a ZSQL Method that just 
does a simple select (select name for table where id = '1000') No 
biggy. I dropped that into the test.html page and made it display the 
name. Here is what I got after five or so tests.

Document Path:          /test.html
Document Length:        172 bytes

Concurrency Level:      25
Time taken for tests:   2.857 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      37875 bytes
HTML transferred:       17372 bytes
Requests per second:    35.00
Transfer rate:          13.26 kb/s received

Connnection Times (ms)
               min   avg   max
Connect:        0     0     2
Processing:    63   627   800
Total:         63   627   802

While I am not being totally blown away by the results I am starting 
to get the big picture.  I was also asked to try it against resin. 
Which I did last night and send the results. I tried it again this 
morning and while it would perform well in the first test it would 
die in the second test and need to be rebooted. Don't know what this 
is but will keep looking into it.

Next? To create a cgi script, in Python to get the same data and run 
it on Apache. Now that could be interesting! Also would be to put 
Zope on the same machine, but for now,being 3 x faster on a slower 
machine is just fine with me. :)

JMA














Source of .jsp with some HTML removed.

<%@ page language="java" %>
<%@ page import="savant.server.beans.GSSessionBean" %>
<%@ page import="savant.server.util.GSUtil" %>

<jsp:useBean id="sessionBean" scope="session" class="savant.server.beans.GSSe
ssionBean" />

         sessionBean.setDBDriver("postgresql.Driver");
         sessionBean.setDBURL("jdbc:postgresql://localhost/gs1");
         sessionBean.setDBUserID("userid);
         sessionBean.setDBPassword("usernam");

<%= sessionBean.gstest() %>