Turck vs APC benchmark

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

A quick comparison of Turck MMCache versus the current APC for running MediaWiki.

Methodology[edit]

Test methodology: 'ab -n 100' simple single-thread benchmark from another machine on the local network. Used a copy of w:en:Zuiderzee Works. Tests done both 'straight' (parser cache hit) and with ?action=purge (to force rendering). Each pass involved restarting the web server with the configuration, then for each of the cache-hit and forced-render versions running the ab twice. First run was discarded, second run recorded.

This was done for each of turck, no opcode cache, and APC, then a second set afterwards.

As connection and transfer times are negligible on the local network (within margin of rounding error), only the 'Total' line was recorded here.

Details[edit]

  • machine: 2.0 GHz Athlon XP 2400+, 512MB
  • os: Ubuntu Linux "Hoary Hedgehog"
  • MediaWiki CVS HEAD as of 2005-09-20; configured with memcached backing
  • Apache 2.0.53 from Ubuntu package
  • PHP 4.3.10 from Ubuntu package
  • memcached 1.1.11 from Ubuntu package
  • Turck 2.4.6 from Ubuntu package
  • APC 3.0.8 compiled and installed with PEAR installer


Results[edit]

                          Connnection Times (ms)
                      min  mean[+/-sd] median   max
turck cache 1:         64    77   27.6     68   231
turck cache 2:         66    75   24.9     68   203
  apc cache 2:         69    78   21.4     72   193
  apc cache 1:         69    78   22.5     72   237
plain cache 1:        202   221   38.0    207   367
plain cache 2:        202   221   39.4    207   391
                          Connnection Times (ms)
                      min  mean[+/-sd] median   max
turck purge 2:        309   330   31.0    317   429
turck purge 1:        311   331   33.5    318   507
  apc purge 2:        326   337   17.7    332   467
  apc purge 1:        329   349   38.7    335   518
plain purge 1:        463   492   48.5    469   652
plain purge 2:        464   498   47.7    472   691


Conclusions[edit]

APC seems to be doing pretty well in performance; in my quick tests above it comes quite close to the traditional leader (Turck), but it's actively maintained. The current version of APC is claimed to work on PHP 5 and 5.1 as well.

I haven't tested for stability, fragility, etc, nor have I tested yet on PHP 5 or on x86_64; these should get done. Also comparison against the current eAccelerator might be worthwhile.