While front-end  is often where most of the problems in website perceived performance lies, back-end performance is a major issue in Drupal 7, and currently even more so in Drupal 8.

Most backend optimizations focus on improving SQL queries, switching to document-based storage, and globally reducing PHP inefficiencies.

However, experience gathered around large media sites during last year brought evidence of a usually ignored dimension to performance: cache tuning.

While most backend devs are familiar with page and basic data  caching concepts, two common hints to improve performance are regularly "(a) put it in cache (b) use memcached instead of MySQL".  But what if cache costed more than it gains ? And if Memcached turned out to be slower than MySQL ? And popular alternative Redis sometimes less desirable than either ? How do we find out ? APC.php and phpmemcacheadmin are great tools but a) dedicated to one caching storage b) unaware of Drupal-level data.

Heisencache was created for this. It is a coder-oriented Drupal cache plugin implemented as a decorator that sits in front of your existing production cache and stores cache usage information with as low a cost as feasible, relying on offline data analysis to identify problems like single-value get access instead of multiple access, unexpected variable_set causing resets of the variable cache, always-missing cache_get, excessive data size, and other typical problems encountered in diagnosing bigger sites.

Currently written for D7, it is very likely to be ported to D8 as soon as big projects start being developed on D8.

This session will explain:

  • the most typical caching problems with Drupal 7 and how to identify them with Heisencache
  • the operation of Heisencache
  • how to write your own Heisencache listener and data-sink plugins for custom analysis

The presentation itself easily fits in a standard session, but if some attendees want a hands-on practical session with it, the session could be converted into a 2 hours workshop: this is usually the time it takes to train a developer on Heisencache and write a first plugin.

 

Heisencache Presentation on Speakerdeck: https://speakerdeck.com/fgm/speed-up-your-backend-caches-with-heisencache