More meaningful benchmarks on APC

The site I benchmarked the other day is a Dokuwiki site, I discovered today that it’s possible to totally disable caching for Dokuwiki. The first thing I wanted to establish was whether disabling caching in the configuration file was enough to make it ineffective, or if the cache had to be cleared out afterward. (The site seemed suspiciously responsive after I changed the configuration.) My thinking is that turning off caching would make for a more meaningful test, since each PHP process would have to do so much more than just fetching and serving a file: it now has to parse and process a bunch of stuff.

Before emptying the cache:

Transactions:               38986 hits
Availability:                 100.00 %
Elapsed time:                 599.53 secs
Data transferred:             159.40 MB
Response time:                  7.14 secs
Transaction rate:              65.03 trans/sec
Throughput:                     0.27 MB/sec
Concurrency:                  464.28
Successful transactions:    38986
Failed transactions:            0
Longest transaction:           26.45
Shortest transaction:           0.09

After emptying the cache:

Transactions:               39241 hits
Availability:                 100.00 %
Elapsed time:                 599.74 secs
Data transferred:             159.73 MB
Response time:                  7.09 secs
Transaction rate:              65.43 trans/sec
Throughput:                     0.27 MB/sec
Concurrency:                  464.00
Successful transactions:    39241
Failed transactions:            0
Longest transaction:           26.83
Shortest transaction:           0.10

So yeah, just disabling it was enough to slow the site down sufficiently to make a more meaningful benchmark. So I turned APC back on and ran another benchmark:

Transactions:               77251 hits
Availability:                 100.00 %
Elapsed time:                 599.37 secs
Data transferred:             314.28 MB
Response time:                  3.36 secs
Transaction rate:             128.89 trans/sec
Throughput:                     0.52 MB/sec
Concurrency:                  433.47
Successful transactions:    77251
Failed transactions:            0
Longest transaction:            8.29
Shortest transaction:           0.09

So yeah, APC is win for this workload.

Next step: trying APC with older versions of PHP. That’s going to be a laugh and a half.

Leave a Reply