Thank you for the responses.

Greg, i will try to produce a log file for you.

Everybody, who cares about :),

To show what is mesured, i will explain the Test.
I tried to do a little, but somewhat realistic test. For that purpose there is network 
between the client and the application server, and network between application server 
and database server.

I used Sun JDK 1.3
I installed the binary packages of all servers, server/servlet combinations.
I added only the postgres datasource entries.
No optimizing is done.
So jboss/tomcat and jboss/jetty runinng as inVM if the documentation is correct.
There is alway only one configuration active.

The Client starts 64 Threads all doing the same - HTTP Get to the servlet.
After a warmup time of 30 sec (so all Entity Beans should be there and filled with 
data), measuring starts.
The next 2 minutes each Thread is measured, means:
  How long does it take to get the first Byte of the result back from the server ?

Because the returned data is small and my servlet doesn't flush in between, the time 
difference from first Byte returned to last Byte returned is also very small.

If a Thread gets back the whole result, it will start the next GET request. Results 
are never cached on the client side.

After measurement stops, the cooldown starts - read: give the server time to fullfill 
the outstanding requests, without interrupting the socket connection very hard. The 
results from this phase doesn't count, because there are no new GET requests.

Ok, what is happening on the server ?
The server executes the doGet Method of my servlet which calls a stateless session 
bean. The session bean does an findAll on a Entity beans home interface, which will 
return a collection.
After getting the collection the session bean gets the data from the entities and 
forms a result array which it then returns to the calling servlet.
The servlet produces the resulting HTML Page and sends it back to the client.
That's it.

As a result, the time which elapse between GET and first arrived byte will contain:
1 - the time needed to transfer the GET request to the server (Network)
2 - the time to process the request in the web server (figuring out it is a servlet 
call)
3 - the time to pass the request to the servlet
4 - the time the servlet needs to fullfill the request
5 - the time to call the session bean
6 - the time to find all entities (one database select query, which also uses network)
7 - the time to return the result from session bean to servlet
8 - the time to return the result to the client (again Network)

Because the data returned to the client is only 365 Bytes, which will fit in one 
network package, and there are only a few calls /sec, Network speed doesn't count 
much.

To see what i mean, look on this excerpt of the results for the orion server test:
Socket Statistics
--------------------------------------------------------------------------------
Socket Connects:              9262
Total Bytes Sent (in KB):     2125.56
Bytes Sent Rate (in KB/s):    17.69
Total Bytes Recv (in KB):     4757.63
Bytes Recv Rate (in KB/s):    39.59

The database is also very unlikely a performance bottleneck, only very few data will 
be requested.
So, Web Server Speed, Servlet Engine Speed, Application Server Speed and integration 
of this three is what counts.


Explanation of TTFB - Time to first byte
To get a better understanding look one these Page results (again from orion server 
test):

Page Results
================================================================================
URI:                          GET /telephone/servlet/TelephoneServlet
Hit Count:                    9262

Result Codes
Code      Description                   Count     
--------------------------------------------------------------------------------
200       OK                            9262      

Time to first byte (in milliseconds)
--------------------------------------------------------------------------------
Average:                      817.82
Min:                          9.40
25th Percentile:              253.86
50th Percentile:              390.58
75th Percentile:              990.28
Max:                          21739.87

Here is TTFB, the fastest response was only 9.40 ms, while the slowest was over 21 
seconds!
At average every thread has to wait 817.82 ms to see the first Byte of the result.


Time to last byte (in milliseconds)
--------------------------------------------------------------------------------
Average:                      840.90
Min:                          10.36
25th Percentile:              265.62
50th Percentile:              409.47
75th Percentile:              1034.60
Max:                          21741.60

Downloaded Content Length (in bytes)
--------------------------------------------------------------------------------
Min:                          365
25th Percentile:              365
50th Percentile:              365
75th Percentile:              365
Max:                          365

As you can easily see the result is always the same byte count. So all counted request 
are successfull.

Sorry for this long mail, but hopefully this clarifies the test a little bit.

Stefan�˛���m�ۢ�.���X��
+�)�v�,r����칻�&ލ�,����ߖ+-Š�x��c롹^���
+�)�v�,r�

Reply via email to