Deciding on cache settings in W3TC

Deciding on cache settings in W3TC

I have tested with pagespeed disabled, for measurement purposes:

time \
wget --quiet https://www.save-up.ch/shop-sitemap.xml --output-document - | \
  egrep -o "<loc>[^<>]*</loc>" | \
  sed -e 's:</*loc>::g' | \
  awk '{print $1"?PageSpeed=off"}' | \
  parallel --no-notice --pipe -L 30 \
  wget --input-file - \
    -e robots=off \
    --quiet \
    {} -O - >/dev/null

It was a total of 309 URL’s.

| PHP-FPM | 1st | 2st | |=====================================|======|=======| | mem: Only page cache, memcached | 1:06 | 0:02 | | mem: Object cache only, memcached | 1:06 | 0:02 | | mem: Object apc, db memc | 1:02 | 0:02 |

mem: Database cache only, memcached 1:11 0:02
apc: Page cache, apc 1:06 0:02
apc: Object cache only, apc 0:59 0:02
apc: Database cache only, apc 1:11 1:12
apc: Both obj & db cache, apc 1:05 1:04

| HHVM 3.12.0 | 1st | 2st | |=====================================|======|======| | No cache | 0:22 | 0:21 | > none |————————————-|——|——| | mem: Page cache in memcached | 0:35 | 0:02 | < 1st run? what? | mem: Object cache only, memcached | X:42 | X:42 | | mem: Database cache only, memcached | X:41 | X:41 | |————————————-|——|——| | apc: Page cache, apc | 0:21 | 0:02 | < Champ! Stable. | apc: Object cache only, apc | 0:21 | 0:02 | < unstable / breaks often | apc: Database cache only, apc | 0:29 | 0:03 | |————————————-|——|——| | dsk: Only page cache, disk enh | X:21 | X:20 | > no caching | dsk: Object cache only, apc | X:20 | X:20 |

In second run, on warm cache, everything is fast (except disk). In first run, HHVM with apc is by far the fastest.

Conclusion: Always use ONLY page cache on APC, nothing more and whatever HHVM or FPM. In first run HHVM is twice as fast as FPM but on second run, on warm cache, it doesn’t matter. Enabling ONLY APC object cache is slightly faster but quite unstable in HHVM.

Shorter: HHVM + only page cache with APC, and failover on FPM is safe.

date 01. Jan 0001 | modified 29. Dec 2023
filename: Task - Deciding on W3TC Cache Settings