Disk-backed object cache

The Disk-backed object cache project evaluated supplementing the memcache-based object cache, which would greatly increase the amount of space dedicated to caching parsed pages.

Rationale

edit

Our parser cache hit ratio is very low, around 30% (see the graph)

This seems to be mostly due to insufficient parser cache size. Tim's theory is that if we increased the parser cache size by a factor of 10-100, then most of the yellow area on that graph should go away. This would reduce our Apache CPU usage substantially.

The parser cache does not have particularly stringent latency requirements, since most requests only do a single parser cache fetch.

Timeline

edit

After an initial attempt to deploy Ehcache, we switched to a different strategy of deploying a custom MySQL-based solution. This is on the WMF MediaWiki Core developers' roadmap, slated for work by Tim Starling soon after the 1.17 release.

Metrics

edit
 
Chart of the parser cache hit ratio before and after enabling the Disk-backed object cache.
 
Chart of the parser cache hit ratio showing cache filling up over the last two weeks.
  • Parser cache hit rate:
    • last 8 hours
    • last 8 days
    • Historic (pre-improvement) norm: 30% hit, 68% miss (absent), and <2% miss (expired)
    • The goal is to minimize the yellow area (cache miss - absent)
  • Apache CPU
  • Disk usage
    • Overview
    • The cache started out at 2.1 terabytes, so the cache size should is 2.1 TB minus the disk free.

Additional documents

edit