I install APC for customers all the time, but never benchmarked any specific performance test. I have seen the effect and would suggest some sort of caching service for a website. Well, I noticed I didn’t have APC on my server, so I thought I would do some bench marking and install. Here is the results of using apache’s benchmark command against my nginx server:

Before APC

Server Software: nginx/0.8.54
Server Hostname: 8bitpipe.com
Server Port: 80

Document Path: /
Document Length: 41342 bytes

Concurrency Level: 50
Time taken for tests: 111.764 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 41643000 bytes
HTML transferred: 41342000 bytes
Requests per second: 8.95 [#/sec] (mean)
Time per request: 5588.215 [ms] (mean)
Time per request: 111.764 [ms] (mean, across all concurrent requests)
Transfer rate: 363.86 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 1.0 1 7
Processing: 687 5455 743.2 5424 7066
Waiting: 683 5451 743.2 5420 7063
Total: 693 5456 742.5 5425 7067

Percentage of the requests served within a certain time (ms)
50% 5425
66% 5559
75% 5728
80% 5855
90% 6260
95% 6459
98% 6595
99% 6680
100% 7067 (longest request)

After APC

Server Software: nginx/0.8.54
Server Hostname: 8bitpipe.com
Server Port: 80

Document Path: /
Document Length: 41342 bytes

Concurrency Level: 50
Time taken for tests: 78.133 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 41643000 bytes
HTML transferred: 41342000 bytes
Requests per second: 12.80 [#/sec] (mean)
Time per request: 3906.663 [ms] (mean)
Time per request: 78.133 [ms] (mean, across all concurrent requests)
Transfer rate: 520.48 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 0.5 1 4
Processing: 555 3816 623.6 3727 5867
Waiting: 551 3812 623.7 3722 5863
Total: 559 3817 623.4 3727 5867

Percentage of the requests served within a certain time (ms)
50% 3727
66% 3833
75% 3977
80% 4084
90% 4462
95% 4894
98% 5546
99% 5635
100% 5867 (longest request)

This is a noticeable difference on this simple test without any tuning to APC (my nginx install is fairly stock also).

Leave a Reply