-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

I am new to Apache/JServ as I am in the process of moving from the Java
Web Server (JWS).  Now that I have gotten the environment up and
running, I am doing some simple tests to see the difference in
performance between JServ and JWS.  The results of this testing are
confusing to me, so I thought I would ask the list if they can help
explain my results.

My servlet is essentially serving up files that are stored in an Oracle
database.  My test consists of two servlets.  TestServlet1 simply reads
a file from disk and returns it to the client.  TestServlet2 reads the
same file, but this time out of Oracle and returns it to the client. 
The reason I have these two tests is to ensure that the performance
penalty of using the database isn't too high.

My environment is:
   NT4.0/Java2 w/Hotspot
   Apache1.3.6/JServ1.0
   JWS2.0
   Oracle8.1.5
I am running both the web server and the DB on the same machine

Here are my results measured in KBytes/Second for one get request:

        TestServlet1    TestServlet2
JWS       3900            2000
JServ     4000             500

So you can see that for TestServlet1 the performance is roughly the
same.  However for TestServlet2 the performance of JServ is
significantly less.

I also did another test where I am trying to find the maximum throughput
so I tested again with 10 concurrent get requests instead of the single
request used above.

       TestServlet2
JWS      3100 (310*10)   
JServ    2000 (200*10)
(I only performed this test on TestServlet2)

So in the total throughput test, the difference narrows (JServ is only
33% slower than JWS as opposed to 75% slower in the first test).

My simple question is why?  

The only thing I can think of is that there is some sort of TCP/IP
bottleneck.  In TestServlet2 I am accessing the DB to get the bytes (via
TCP/IP).  When using JServ because of its architecture of being a
separate process from Apache also using TCP/IP, I need to move the bytes
a second time (really three times if you count the response back to the
client), once from Oracle to JServ, a second time from JServ to Apache. 
In JWS the bytes only are only moved once (from Oracle to JWS). 
Therefore if there is some bottleneck in the TCP/IP loopback (since this
is all on the same machine, the bytes aren't really going out to the
network, except of course when they get sent back to the client), the
JServ architecture might be inherently slower than JWS for servlets
doing database access to a local database.

thanks,
--Barry
________________________________________________________
NetZero - We believe in a FREE Internet.  Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to