T2000 performance Apache

I only had one machine to use for benchmark testing and apache bench seemed to be the only benchmark to hold the amount of requests. Siege would report around 2-3,000 req/sec but would bum out after that. This was Apache 2.2.3 compiled with Sun Studio 11 on Solaris 10 1/06:

export CFLAGS=’-DSSL_EXPERIMENTAL -DSSL_ENGINE -xO4 -xtarget=generic’
export LDFLAGS=”-R/usr/ucblib”

# ./configure –prefix=/path/apache2 –enable-mods-shared=all –enable-cache –enable-mem-cache –enable-ssl –with-mpm=prefork –enable-so –enable-rule=SSL_EXPERIMENTAL –with-ssl=/usr/sfw

Amount of time it took to build Apache 2.2.3 with 24 threads:

# time dmake -j 24
real 6m4.925s
user 18m12.183s
sys 13m37.746s

Results:

# ab -n 40000 -c 30 http://x.x.x.x:30000/index.html
This is ApacheBench, Version 1.3d < $Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking x.x.x.x (be patient)
Completed 4000 requests
Completed 8000 requests
Completed 12000 requests
Completed 16000 requests
Completed 20000 requests
Completed 24000 requests
Completed 28000 requests
Completed 32000 requests
Completed 36000 requests
Finished 40000 requests
Server Software: Apache/2.2.3
Server Hostname: x.x.x.x
Server Port: 30000

Document Path: /index.html
Document Length: 125 bytes

Concurrency Level: 30
Time taken for tests: 4.114 seconds
Complete requests: 40000
Failed requests: 0
Broken pipe errors: 0
Total transferred: 16001200 bytes
HTML transferred: 5000375 bytes
Requests per second: 9722.90 [#/sec] (mean)
Time per request: 3.09 [ms] (mean)
Time per request: 0.10 [ms] (mean, across all concurrent requests)
Transfer rate: 3889.45 [Kbytes/sec] received

Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.9 0 16
Processing: 0 2 0.8 2 14
Waiting: 0 2 0.7 1 14
Total: 0 3 1.3 2 18

Percentage of the requests served within a certain time (ms)
50% 2
66% 3
75% 3
80% 3
90% 4
95% 6
98% 7
99% 9
100% 18 (last request)

httpd-mpm.conf prefork settings:

ServerLimit 8192
MaxClients 2048

StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 2048
MaxRequestsPerChild 0
ListenBacklog 8192
ServerLimit 2048

I couldn’t get it to go much over 9000-10000 req/sec with any more tweaking to the apache config. From checking other people’s results it looks like I should be able to get around double that using Nevada and certain OS tunings that I don’t have here. More to come later with PHP/MySQL/SSL.

6 Responses to “T2000 performance Apache”

  1. Kostas Pramatias Says:

    cannot wait for new results of this kind

  2. Peter Tribble Says:

    What’s with the /usr/ucblib stuff? Seem’s highly undesirable to me!

  3. Anonymous Coward Says:

    –with-mpm=prefork ? Why not worker?

  4. Mads Says:

    Yeah, I agree - either worker or event mpm and I strongly recommend upping the concurrency in ab.
    Peter: The /usr/ucblib is an annoying thing in apr that picks up on ucb - without adding the flag above, you’ll have to muddle with your LD_LIBRARY_PATH.

  5. Derek Says:

    Haven’t had a chance to try worker yet. Thanks for answering Mads :)

  6. » Blog Archive » T2000 Apache/PHP/MySQL Says:

    […] An update to my previous post, here are some results for Apache/PHP/MySQL. I used Apache 2.2.3 (prefork), PHP 5.2.1, MySQL 5.0.27, and APC 3.0.13. These were custom compiled pretty much the same options the CoolStack uses, with Sun Studio 11. […]

Leave a Reply