You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Henri Gomez <hg...@apache.org> on 2004/07/22 10:16:43 UTC

mod_proxy details : WAS: Invitation to HTTPD commiters in tomcat-dev

Remy Maucherat wrote:
> Filip Hanik - Dev wrote:
> 
>> ok, there are two very simple memory friendly ways to do sticky load 
>> balancing.
>> And as a matter of fact, this is how some hardware loadbalancers do it.
>>
>> 1. Set a cookie on the clients machine - no server memory to hold a map
>> 2. If the client doesn't accept cookies, do a simple sticky load 
>> balancing based on the IP of the client request. Again, no memory
>> map needed.
>>
>> The current jvmRoute addition to JSESSIONID is not really needed, 
>> since it doesn't add that much of a benefit over the two options
>> above. So right then and there, there is one less thing to configure.
>>  
>>
> It's cool to have one less thing to configure, but it seems to me 
> jvmRoute is the most reliable and efficient way of doing stickiness (the 
> cookie way is intrusive, and the IP way is highly inaccurate).

Well it seems the discussion advance quickly and on the right direction,
a true ASF members colaboration.

I made some benchs yesterday on my laptop between :

- TC 3.3.2/Coyote
- Apache 2.0.49 alone (simple html file)
- Apache 2.0.49 + jk 1.2.6 + TC 3.3.2/jk2
- Apache 2.0.49 + jk 1.2.6 + 2 * TC 3.3.2/jk2
- Apache 2.0.49 + mod_proxy + TC 3.3.2 (Coyote 1.1).

I'll redo them today on a faster machines since the results where
a little too random but the benchs raise some questions :

- I'm using ab (ApacheBench) and wonder if the -k (keep alive)
   if HTTP keep-alive is really used ?

- Did mod_proxy keep a connection cache ?


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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Brian Pane <br...@apache.org>.
Henri Gomez wrote:

> I made some benchs on my Linux Fedora Core 2
> on a P4 2.8ghz / 1Gb RAM :


> Apache 2 alone         1202 req/s
> TC/Coyote         883 req/s


One thing I noticed when looking at Tomcat 5.0.x is that its default,
static-file-delivering servlet does a stat(2) of each path prefix leading
up to the file.  A standard installation of Apache 2.x, with FollowSymlinks
enabled, doesn't do these stat calls, for obvious performance reasons.

Is the stat'ing of all the directories leading up to the requested file
in Tomcat intentional (it *is* valuable in some environments for
security purposes), or is it just a side-effect of the implementation?

Brian


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Peter Lin <wo...@gmail.com>.
you can run it in non-Gui mode with -n option.

http://jakarta.apache.org/jmeter/usermanual/get-started.html#non_gui

might help, or not.

peter

On Thu, 22 Jul 2004 15:33:41 +0200, Henri Gomez <hg...@apache.org> wrote:
> Peter Lin wrote:
> 
> > the nightly build of jmeter has an alpha sampler that uses Commons
> > HTTPClient. you may want to try that one instead, if you use jmeter
> >
> > peter
> 
> made some tests with JMeter 2.0.1 but my laptop is
> way to slow.
> 
> I need another smaller stress tool ;(
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
>

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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Henri Gomez <hg...@apache.org>.
Peter Lin wrote:

> the nightly build of jmeter has an alpha sampler that uses Commons
> HTTPClient. you may want to try that one instead, if you use jmeter
> 
> peter

made some tests with JMeter 2.0.1 but my laptop is
way to slow.

I need another smaller stress tool ;(



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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Peter Lin <wo...@gmail.com>.
the nightly build of jmeter has an alpha sampler that uses Commons
HTTPClient. you may want to try that one instead, if you use jmeter

peter

On Thu, 22 Jul 2004 15:09:19 +0200, Henri Gomez <hg...@apache.org> wrote:
> Remy Maucherat wrote:
> 
> > Henri Gomez wrote:
> >
> >> I made some benchs on my Linux Fedora Core 2
> >> on a P4 2.8ghz / 1Gb RAM :
> >>
> >> Apache 2.0.50 in
> >>
> >>  - Apache 2.0.50 alone (simple html file)
> >>
> >>  - TC 3.3.2/Coyote 1.1
> >>
> >>  - Apache 2.0.50 + jk 1.2.6 + TC 3.3.2/jk2
> >>
> >> JkMount /examples/* local
> >>
> >> worker.local.port=8009
> >> worker.local.host=localhost
> >> worker.local.type=ajp13
> >> worker.local.cachesize=16
> >> worker.local.cache_timeout=600
> >> worker.local.socket_keepalive=1
> >> worker.local.socket_timeout=300
> >>
> >>
> >>  - Apache 2.0.50 + mod_proxy + TC 3.3.2 (Coyote 1.1).
> >>
> >> ProxyPass /tc3/ http://localhost:11011/
> >> ProxyPassReverse /tc3/ http://localhost:11011/
> >>
> >>
> >> Apache Bench is running on another machine, Windows 2000 P3 1Ghz,
> >> and both systems are on a switched 100Mbps network :
> >>
> >>
> >> Apache 2 alone         1202 req/s
> >> TC/Coyote         883 req/s
> >> Apache 2 + jk + TC    906 req/s
> >> Apache 2 + proxy + TC    497.req/s    (but with 8000 errors ;(
> >>
> >>
> >> Constatation :
> >>
> >> - Remy make a tremendous works since Coyote HTTP 1.1 is only 15% slower
> >>   than the Apache 2 native HTTP.
> >>
> >> - mod_proxy is 50% slower than mod_jk and that's a really bad news.
> >>   Also many errors appears, about 4% errors.
> >>
> >> - Tomcat via jk or mod_proxy, when on the same machine make a cpu load
> >>   of 60% system and 30% user. Tomcat alone is 33% system and 10% user.
> >>
> >>
> >> How could we optimize mod_proxy settings since I'm using the standard
> >> httpd.conf ?
> >
> >
> > It's quite bad :( Did you check everything was ok using verbose ?
> > ab -n 1 -v 10
> > All your tests show "Keep-Alive requests:    0 " in the result. It
> > should work ok with Tomcat standalone (to be honest, I didn't try 3.3
> > with the current HTTP/1.1 connector), and with Apache as well.
> >
> > ab uses HTTP/1.0 keepalive with the "-k" option.
> 
> Well I was thinking ab (2.0.40) use HTTP 1.1. I'll retest it
> with JMeter :)
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
>

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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Henri Gomez <hg...@apache.org>.
Henri Gomez wrote:

> Tim Funk wrote:
> 
>> Try siege: http://joedog.org/siege/
>>
>> Despite what the docs say, it runs pretty sweet on cygwin too. (with 
>> 2.60b5)
> 
> 
> Well I've got problem with release 2.59 and 2.60b5, siege seems to
> sleep ? (using HTTP 1.1)
> 
> siege -u http://machone/HelloWorldExample.html -b -r10 -c16 ;(

The problems disappears when i change

connection = keep-alive

to

connection = close


Bad, I wanted to test HTTP 1.1 with keep-alive ;(

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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Henri Gomez <hg...@apache.org>.
Tim Funk wrote:

> Try siege: http://joedog.org/siege/
> 
> Despite what the docs say, it runs pretty sweet on cygwin too. (with 
> 2.60b5)

Well I've got problem with release 2.59 and 2.60b5, siege seems to
sleep ? (using HTTP 1.1)

siege -u http://machone/HelloWorldExample.html -b -r10 -c16 ;(



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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Tim Funk <fu...@joedog.org>.
Try siege: http://joedog.org/siege/

Despite what the docs say, it runs pretty sweet on cygwin too. (with 2.60b5)

-Tim

Henri Gomez wrote:

> jean-frederic clere wrote:
> 
>>>
>>>
>>
>> mod_proxy in ap_proxy_http_cleanup() closes the socket if HTTP is <1.1 
>> is that correct?
>>
>> The request was (from ab):
>> +++
>> GET /examples/ HTTP/1.0^M
>> User-Agent: ApacheBench/2.0.40-dev^M
>> Connection: Keep-Alive^M
>> Host: localhost:7779^M
>> Accept: */*^M
>> ^M
>> +++
> 
> 
> I'm still looking for a bench tester supporting HTTP 1.1, jmeter is too 
> hog for my PIII 1Ghz ;(
> 

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

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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Henri Gomez <hg...@apache.org>.
jean-frederic clere wrote:

>>
>>
> 
> mod_proxy in ap_proxy_http_cleanup() closes the socket if HTTP is <1.1 
> is that correct?
> 
> The request was (from ab):
> +++
> GET /examples/ HTTP/1.0^M
> User-Agent: ApacheBench/2.0.40-dev^M
> Connection: Keep-Alive^M
> Host: localhost:7779^M
> Accept: */*^M
> ^M
> +++

I'm still looking for a bench tester supporting HTTP 1.1, jmeter is too 
hog for my PIII 1Ghz ;(



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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by jean-frederic clere <jf...@Fujitsu-Siemens.com>.
Henri Gomez wrote:
> Remy Maucherat wrote:
> 
>> Henri Gomez wrote:
>>
>>> I made some benchs on my Linux Fedora Core 2
>>> on a P4 2.8ghz / 1Gb RAM :
>>>
>>> Apache 2.0.50 in
>>>
>>>  - Apache 2.0.50 alone (simple html file)
>>>
>>>  - TC 3.3.2/Coyote 1.1
>>>
>>>  - Apache 2.0.50 + jk 1.2.6 + TC 3.3.2/jk2
>>>
>>> JkMount /examples/* local
>>>
>>> worker.local.port=8009
>>> worker.local.host=localhost
>>> worker.local.type=ajp13
>>> worker.local.cachesize=16
>>> worker.local.cache_timeout=600
>>> worker.local.socket_keepalive=1
>>> worker.local.socket_timeout=300
>>>
>>>
>>>  - Apache 2.0.50 + mod_proxy + TC 3.3.2 (Coyote 1.1).
>>>
>>> ProxyPass /tc3/ http://localhost:11011/
>>> ProxyPassReverse /tc3/ http://localhost:11011/
>>>
>>>
>>> Apache Bench is running on another machine, Windows 2000 P3 1Ghz,
>>> and both systems are on a switched 100Mbps network :
>>>
>>>
>>> Apache 2 alone         1202 req/s
>>> TC/Coyote         883 req/s
>>> Apache 2 + jk + TC    906 req/s
>>> Apache 2 + proxy + TC    497.req/s    (but with 8000 errors ;(
>>>
>>>
>>> Constatation :
>>>
>>> - Remy make a tremendous works since Coyote HTTP 1.1 is only 15% slower
>>>   than the Apache 2 native HTTP.
>>>
>>> - mod_proxy is 50% slower than mod_jk and that's a really bad news.
>>>   Also many errors appears, about 4% errors.
>>>
>>> - Tomcat via jk or mod_proxy, when on the same machine make a cpu load
>>>   of 60% system and 30% user. Tomcat alone is 33% system and 10% user.
>>>
>>>
>>> How could we optimize mod_proxy settings since I'm using the standard
>>> httpd.conf ?
>>
>>
>>
>> It's quite bad :( Did you check everything was ok using verbose ?
>> ab -n 1 -v 10
>> All your tests show "Keep-Alive requests:    0 " in the result. It 
>> should work ok with Tomcat standalone (to be honest, I didn't try 3.3 
>> with the current HTTP/1.1 connector), and with Apache as well.
>>
>> ab uses HTTP/1.0 keepalive with the "-k" option.
> 
> 
> Well I was thinking ab (2.0.40) use HTTP 1.1. I'll retest it
> with JMeter :)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 

mod_proxy in ap_proxy_http_cleanup() closes the socket if HTTP is <1.1 is that 
correct?

The request was (from ab):
+++
GET /examples/ HTTP/1.0^M
User-Agent: ApacheBench/2.0.40-dev^M
Connection: Keep-Alive^M
Host: localhost:7779^M
Accept: */*^M
^M
+++

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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Henri Gomez <hg...@apache.org>.
Remy Maucherat wrote:

> Henri Gomez wrote:
> 
>> I made some benchs on my Linux Fedora Core 2
>> on a P4 2.8ghz / 1Gb RAM :
>>
>> Apache 2.0.50 in
>>
>>  - Apache 2.0.50 alone (simple html file)
>>
>>  - TC 3.3.2/Coyote 1.1
>>
>>  - Apache 2.0.50 + jk 1.2.6 + TC 3.3.2/jk2
>>
>> JkMount /examples/* local
>>
>> worker.local.port=8009
>> worker.local.host=localhost
>> worker.local.type=ajp13
>> worker.local.cachesize=16
>> worker.local.cache_timeout=600
>> worker.local.socket_keepalive=1
>> worker.local.socket_timeout=300
>>
>>
>>  - Apache 2.0.50 + mod_proxy + TC 3.3.2 (Coyote 1.1).
>>
>> ProxyPass /tc3/ http://localhost:11011/
>> ProxyPassReverse /tc3/ http://localhost:11011/
>>
>>
>> Apache Bench is running on another machine, Windows 2000 P3 1Ghz,
>> and both systems are on a switched 100Mbps network :
>>
>>
>> Apache 2 alone         1202 req/s
>> TC/Coyote         883 req/s
>> Apache 2 + jk + TC    906 req/s
>> Apache 2 + proxy + TC    497.req/s    (but with 8000 errors ;(
>>
>>
>> Constatation :
>>
>> - Remy make a tremendous works since Coyote HTTP 1.1 is only 15% slower
>>   than the Apache 2 native HTTP.
>>
>> - mod_proxy is 50% slower than mod_jk and that's a really bad news.
>>   Also many errors appears, about 4% errors.
>>
>> - Tomcat via jk or mod_proxy, when on the same machine make a cpu load
>>   of 60% system and 30% user. Tomcat alone is 33% system and 10% user.
>>
>>
>> How could we optimize mod_proxy settings since I'm using the standard
>> httpd.conf ?
> 
> 
> It's quite bad :( Did you check everything was ok using verbose ?
> ab -n 1 -v 10
> All your tests show "Keep-Alive requests:    0 " in the result. It 
> should work ok with Tomcat standalone (to be honest, I didn't try 3.3 
> with the current HTTP/1.1 connector), and with Apache as well.
> 
> ab uses HTTP/1.0 keepalive with the "-k" option.

Well I was thinking ab (2.0.40) use HTTP 1.1. I'll retest it
with JMeter :)


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


Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Remy Maucherat <re...@apache.org>.
Henri Gomez wrote:

> I made some benchs on my Linux Fedora Core 2
> on a P4 2.8ghz / 1Gb RAM :
>
> Apache 2.0.50 in
>
>  - Apache 2.0.50 alone (simple html file)
>
>  - TC 3.3.2/Coyote 1.1
>
>  - Apache 2.0.50 + jk 1.2.6 + TC 3.3.2/jk2
>
> JkMount /examples/* local
>
> worker.local.port=8009
> worker.local.host=localhost
> worker.local.type=ajp13
> worker.local.cachesize=16
> worker.local.cache_timeout=600
> worker.local.socket_keepalive=1
> worker.local.socket_timeout=300
>
>
>  - Apache 2.0.50 + mod_proxy + TC 3.3.2 (Coyote 1.1).
>
> ProxyPass /tc3/ http://localhost:11011/
> ProxyPassReverse /tc3/ http://localhost:11011/
>
>
> Apache Bench is running on another machine, Windows 2000 P3 1Ghz,
> and both systems are on a switched 100Mbps network :
>
>
> Apache 2 alone         1202 req/s
> TC/Coyote         883 req/s
> Apache 2 + jk + TC    906 req/s
> Apache 2 + proxy + TC    497.req/s    (but with 8000 errors ;(
>
>
> Constatation :
>
> - Remy make a tremendous works since Coyote HTTP 1.1 is only 15% slower
>   than the Apache 2 native HTTP.
>
> - mod_proxy is 50% slower than mod_jk and that's a really bad news.
>   Also many errors appears, about 4% errors.
>
> - Tomcat via jk or mod_proxy, when on the same machine make a cpu load
>   of 60% system and 30% user. Tomcat alone is 33% system and 10% user.
>
>
> How could we optimize mod_proxy settings since I'm using the standard
> httpd.conf ?

It's quite bad :( Did you check everything was ok using verbose ?
ab -n 1 -v 10
All your tests show "Keep-Alive requests:    0 " in the result. It 
should work ok with Tomcat standalone (to be honest, I didn't try 3.3 
with the current HTTP/1.1 connector), and with Apache as well.

ab uses HTTP/1.0 keepalive with the "-k" option.

Rémy


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


Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Henri Gomez <hg...@apache.org>.
I made some benchs on my Linux Fedora Core 2
on a P4 2.8ghz / 1Gb RAM :

Apache 2.0.50 in

  - Apache 2.0.50 alone (simple html file)

  - TC 3.3.2/Coyote 1.1

  - Apache 2.0.50 + jk 1.2.6 + TC 3.3.2/jk2

JkMount /examples/* local

worker.local.port=8009
worker.local.host=localhost
worker.local.type=ajp13
worker.local.cachesize=16
worker.local.cache_timeout=600
worker.local.socket_keepalive=1
worker.local.socket_timeout=300


  - Apache 2.0.50 + mod_proxy + TC 3.3.2 (Coyote 1.1).

ProxyPass /tc3/ http://localhost:11011/
ProxyPassReverse /tc3/ http://localhost:11011/


Apache Bench is running on another machine, Windows 2000 P3 1Ghz,
and both systems are on a switched 100Mbps network :


Apache 2 alone 		1202 req/s
TC/Coyote 		883 req/s
Apache 2 + jk + TC	906 req/s
Apache 2 + proxy + TC	497.req/s	(but with 8000 errors ;(


Constatation :

- Remy make a tremendous works since Coyote HTTP 1.1 is only 15% slower
   than the Apache 2 native HTTP.

- mod_proxy is 50% slower than mod_jk and that's a really bad news.
   Also many errors appears, about 4% errors.

- Tomcat via jk or mod_proxy, when on the same machine make a cpu load
   of 60% system and 30% user. Tomcat alone is 33% system and 10% user.


How could we optimize mod_proxy settings since I'm using the standard
httpd.conf ?

------

Complete bench results :

Apache 2.0.50 alone (simple html file)

C:\Program Files\Apache Group\Apache2\bin>ab -k -n 200000 -c 16 
http://machone/HelloWorldExample.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 20000 requests
Completed 40000 requests
Completed 60000 requests
Completed 80000 requests
Completed 100000 requests
Completed 120000 requests
Completed 140000 requests
Completed 160000 requests
Completed 180000 requests
Finished 200000 requests


Server Software:        Apache/2.0.50
Server Hostname:        machone
Server Port:            80

Document Path:          /HelloWorldExample.html
Document Length:        459 bytes

Concurrency Level:      16
Time taken for tests:   166.299127 seconds
Complete requests:      200000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      145800000 bytes
HTML transferred:       91800000 bytes
Requests per second:    1202.65 [#/sec] (mean)
Time per request:       13.304 [ms] (mean)
Time per request:       0.831 [ms] (mean, across all concurrent requests)
Transfer rate:          856.18 [Kbytes/sec] received


Tomcat 3.3.2 using the Coyote 1.1 HTTP connector

C:\Program Files\Apache Group\Apache2\bin>ab -k -n 200000 -c 16 
http://machone:11011/examples/servlet/HelloWorldExample
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 20000 requests
Completed 40000 requests
Completed 60000 requests
Completed 80000 requests
Completed 100000 requests
Completed 120000 requests
Completed 140000 requests
Completed 160000 requests
Completed 180000 requests
Finished 200000 requests


Server Software:        Apache-Coyote/1.1
Server Hostname:        machone
Server Port:            11011

Document Path:          /examples/servlet/HelloWorldExample
Document Length:        400 bytes

Concurrency Level:      16
Time taken for tests:   226.485671 seconds
Complete requests:      200000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      105400000 bytes
HTML transferred:       80000000 bytes
Requests per second:    883.06 [#/sec] (mean)
Time per request:       18.119 [ms] (mean)
Time per request:       1.132 [ms] (mean, across all concurrent requests)
Transfer rate:          454.46 [Kbytes/sec] received


Apache 2.0.50 + jk 1.2.6 + Tomcat 3.3.2 (via Coyote JK2 connector)

C:\Program Files\Apache Group\Apache2\bin>ab -k -n 200000 -c 16 
http://machone/examples/servlet/HelloWorldExample
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 20000 requests
Completed 40000 requests
Completed 60000 requests
Completed 80000 requests
Completed 100000 requests
Completed 120000 requests
Completed 140000 requests
Completed 160000 requests
Completed 180000 requests
Finished 200000 requests


Server Software:        Apache/2.0.50
Server Hostname:        machone
Server Port:            80

Document Path:          /examples/servlet/HelloWorldExample
Document Length:        400 bytes

Concurrency Level:      16
Time taken for tests:   220.637261 seconds
Complete requests:      200000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      110400000 bytes
HTML transferred:       80000000 bytes
Requests per second:    906.47 [#/sec] (mean)
Time per request:       17.651 [ms] (mean)
Time per request:       1.103 [ms] (mean, across all concurrent requests)
Transfer rate:          488.64 [Kbytes/sec] received


Apache 2.0.50 + mod_proxy + Tomcat 3.3.2 (via Coyote HTTP connector)

C:\Program Files\Apache Group\Apache2\bin>ab -k -n 200000 -c 16 
http://machone/tc3/examples/servlet/HelloWorldExample
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 20000 requests
Completed 40000 requests
Completed 60000 requests
Completed 80000 requests
Completed 100000 requests
Completed 120000 requests
Completed 140000 requests
Completed 160000 requests
Completed 180000 requests
Finished 200000 requests


Server Software:        Apache-Coyote/1.1
Server Hostname:        machone
Server Port:            80

Document Path:          /tc3/examples/servlet/HelloWorldExample
Document Length:        400 bytes

Concurrency Level:      16
Time taken for tests:   401.717641 seconds
Complete requests:      200000
Failed requests:        8046
    (Connect: 0, Length: 8046, Exceptions: 0)
Write errors:           0
Non-2xx responses:      8046
Keep-Alive requests:    0
Total transferred:      108724136 bytes
HTML transferred:       79299998 bytes
Requests per second:    497.86 [#/sec] (mean)
Time per request:       32.137 [ms] (mean)
Time per request:       2.009 [ms] (mean, across all concurrent requests)
Transfer rate:          264.30 [Kbytes/sec] received

Re: mod_proxy details : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Remy Maucherat <re...@apache.org>.
Henri Gomez wrote:

> I made some benchs yesterday on my laptop between :
>
> - TC 3.3.2/Coyote
> - Apache 2.0.49 alone (simple html file)
> - Apache 2.0.49 + jk 1.2.6 + TC 3.3.2/jk2
> - Apache 2.0.49 + jk 1.2.6 + 2 * TC 3.3.2/jk2
> - Apache 2.0.49 + mod_proxy + TC 3.3.2 (Coyote 1.1).
>
> I'll redo them today on a faster machines since the results where
> a little too random but the benchs raise some questions :
>
> - I'm using ab (ApacheBench) and wonder if the -k (keep alive)
>   if HTTP keep-alive is really used ?

I do my testing with -k usually, and with something like -c 20, to get 
an average load level (I'm using that on Cygwin, so high concurrency 
does't quite work in localhost). It seems like keepalive is being used 
often, and this factors out some of the network stack overhead when I'm 
profiling stuff.

Rémy


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


Re: mod_proxy details : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by jean-frederic clere <jf...@Fujitsu-Siemens.com>.
Henri Gomez wrote:
> Remy Maucherat wrote:
> 
>> Filip Hanik - Dev wrote:
>>
>>> ok, there are two very simple memory friendly ways to do sticky load 
>>> balancing.
>>> And as a matter of fact, this is how some hardware loadbalancers do it.
>>>
>>> 1. Set a cookie on the clients machine - no server memory to hold a map
>>> 2. If the client doesn't accept cookies, do a simple sticky load 
>>> balancing based on the IP of the client request. Again, no memory
>>> map needed.
>>>
>>> The current jvmRoute addition to JSESSIONID is not really needed, 
>>> since it doesn't add that much of a benefit over the two options
>>> above. So right then and there, there is one less thing to configure.
>>>  
>>>
>> It's cool to have one less thing to configure, but it seems to me 
>> jvmRoute is the most reliable and efficient way of doing stickiness 
>> (the cookie way is intrusive, and the IP way is highly inaccurate).
> 
> 
> Well it seems the discussion advance quickly and on the right direction,
> a true ASF members colaboration.
> 
> I made some benchs yesterday on my laptop between :
> 
> - TC 3.3.2/Coyote
> - Apache 2.0.49 alone (simple html file)
> - Apache 2.0.49 + jk 1.2.6 + TC 3.3.2/jk2
> - Apache 2.0.49 + jk 1.2.6 + 2 * TC 3.3.2/jk2
> - Apache 2.0.49 + mod_proxy + TC 3.3.2 (Coyote 1.1).
> 
> I'll redo them today on a faster machines since the results where
> a little too random but the benchs raise some questions :
> 
> - I'm using ab (ApacheBench) and wonder if the -k (keep alive)
>   if HTTP keep-alive is really used ?

Why?
Remember to run ab on a separate (fast) machine otherwise the results are random ;-)

> 
> - Did mod_proxy keep a connection cache ?
> 

It does not close the socket to the proxy when using HTTP/1.1 and "Connection:" 
is  not "close".

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


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


Re: mod_proxy details : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Graham Leggett <mi...@sharp.fm>.
Henri Gomez wrote:

> - I'm using ab (ApacheBench) and wonder if the -k (keep alive)
>   if HTTP keep-alive is really used ?
> 
> - Did mod_proxy keep a connection cache ?

Proxy's HTTP module will reuse the same connection from previous 
connections if keepalives are being used, it doesn't keep a connection 
cache for more than one connection at a time.

This behaviour is limited to proxy_http though. There is nothing inside 
proxy that would prevent proxy_ajp from keeping a connection cache.

Regards,
Graham
--

Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

Posted by Henri Gomez <hg...@apache.org>.
I made some benchs on my Linux Fedora Core 2
on a P4 2.8ghz / 1Gb RAM :

Apache 2.0.50 in

  - Apache 2.0.50 alone (simple html file)

  - TC 3.3.2/Coyote 1.1

  - Apache 2.0.50 + jk 1.2.6 + TC 3.3.2/jk2

JkMount /examples/* local

worker.local.port=8009
worker.local.host=localhost
worker.local.type=ajp13
worker.local.cachesize=16
worker.local.cache_timeout=600
worker.local.socket_keepalive=1
worker.local.socket_timeout=300


  - Apache 2.0.50 + mod_proxy + TC 3.3.2 (Coyote 1.1).

ProxyPass /tc3/ http://localhost:11011/
ProxyPassReverse /tc3/ http://localhost:11011/


Apache Bench is running on another machine, Windows 2000 P3 1Ghz,
and both systems are on a switched 100Mbps network :


Apache 2 alone 		1202 req/s
TC/Coyote 		883 req/s
Apache 2 + jk + TC	906 req/s
Apache 2 + proxy + TC	497.req/s	(but with 8000 errors ;(


Constatation :

- Remy make a tremendous works since Coyote HTTP 1.1 is only 15% slower
   than the Apache 2 native HTTP.

- mod_proxy is 50% slower than mod_jk and that's a really bad news.
   Also many errors appears, about 4% errors.

- Tomcat via jk or mod_proxy, when on the same machine make a cpu load
   of 60% system and 30% user. Tomcat alone is 33% system and 10% user.


How could we optimize mod_proxy settings since I'm using the standard
httpd.conf ?

------

Complete bench results :

Apache 2.0.50 alone (simple html file)

C:\Program Files\Apache Group\Apache2\bin>ab -k -n 200000 -c 16 
http://machone/HelloWorldExample.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 20000 requests
Completed 40000 requests
Completed 60000 requests
Completed 80000 requests
Completed 100000 requests
Completed 120000 requests
Completed 140000 requests
Completed 160000 requests
Completed 180000 requests
Finished 200000 requests


Server Software:        Apache/2.0.50
Server Hostname:        machone
Server Port:            80

Document Path:          /HelloWorldExample.html
Document Length:        459 bytes

Concurrency Level:      16
Time taken for tests:   166.299127 seconds
Complete requests:      200000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      145800000 bytes
HTML transferred:       91800000 bytes
Requests per second:    1202.65 [#/sec] (mean)
Time per request:       13.304 [ms] (mean)
Time per request:       0.831 [ms] (mean, across all concurrent requests)
Transfer rate:          856.18 [Kbytes/sec] received


Tomcat 3.3.2 using the Coyote 1.1 HTTP connector

C:\Program Files\Apache Group\Apache2\bin>ab -k -n 200000 -c 16 
http://machone:11011/examples/servlet/HelloWorldExample
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 20000 requests
Completed 40000 requests
Completed 60000 requests
Completed 80000 requests
Completed 100000 requests
Completed 120000 requests
Completed 140000 requests
Completed 160000 requests
Completed 180000 requests
Finished 200000 requests


Server Software:        Apache-Coyote/1.1
Server Hostname:        machone
Server Port:            11011

Document Path:          /examples/servlet/HelloWorldExample
Document Length:        400 bytes

Concurrency Level:      16
Time taken for tests:   226.485671 seconds
Complete requests:      200000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      105400000 bytes
HTML transferred:       80000000 bytes
Requests per second:    883.06 [#/sec] (mean)
Time per request:       18.119 [ms] (mean)
Time per request:       1.132 [ms] (mean, across all concurrent requests)
Transfer rate:          454.46 [Kbytes/sec] received


Apache 2.0.50 + jk 1.2.6 + Tomcat 3.3.2 (via Coyote JK2 connector)

C:\Program Files\Apache Group\Apache2\bin>ab -k -n 200000 -c 16 
http://machone/examples/servlet/HelloWorldExample
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 20000 requests
Completed 40000 requests
Completed 60000 requests
Completed 80000 requests
Completed 100000 requests
Completed 120000 requests
Completed 140000 requests
Completed 160000 requests
Completed 180000 requests
Finished 200000 requests


Server Software:        Apache/2.0.50
Server Hostname:        machone
Server Port:            80

Document Path:          /examples/servlet/HelloWorldExample
Document Length:        400 bytes

Concurrency Level:      16
Time taken for tests:   220.637261 seconds
Complete requests:      200000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      110400000 bytes
HTML transferred:       80000000 bytes
Requests per second:    906.47 [#/sec] (mean)
Time per request:       17.651 [ms] (mean)
Time per request:       1.103 [ms] (mean, across all concurrent requests)
Transfer rate:          488.64 [Kbytes/sec] received


Apache 2.0.50 + mod_proxy + Tomcat 3.3.2 (via Coyote HTTP connector)

C:\Program Files\Apache Group\Apache2\bin>ab -k -n 200000 -c 16 
http://machone/tc3/examples/servlet/HelloWorldExample
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 20000 requests
Completed 40000 requests
Completed 60000 requests
Completed 80000 requests
Completed 100000 requests
Completed 120000 requests
Completed 140000 requests
Completed 160000 requests
Completed 180000 requests
Finished 200000 requests


Server Software:        Apache-Coyote/1.1
Server Hostname:        machone
Server Port:            80

Document Path:          /tc3/examples/servlet/HelloWorldExample
Document Length:        400 bytes

Concurrency Level:      16
Time taken for tests:   401.717641 seconds
Complete requests:      200000
Failed requests:        8046
    (Connect: 0, Length: 8046, Exceptions: 0)
Write errors:           0
Non-2xx responses:      8046
Keep-Alive requests:    0
Total transferred:      108724136 bytes
HTML transferred:       79299998 bytes
Requests per second:    497.86 [#/sec] (mean)
Time per request:       32.137 [ms] (mean)
Time per request:       2.009 [ms] (mean, across all concurrent requests)
Transfer rate:          264.30 [Kbytes/sec] received

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