Successfully reported this slideshow.
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Magento Cach...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
About PHP ac...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
PHP accelera...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
PHP accelera...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Magento cach...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Magento cach...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Zend TwoLeve...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Magento cach...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Magento FPC ...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Issues with ...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Reverse prox...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Yireo server...
Presentation “Magento Caching” - http://slideshare.net/yireo
Jisse Reitsma (jisse@yireo.com) - Twitter @yireo
Yireo Stuff
...
Upcoming SlideShare
Loading in …5
×

Magento caching

4,957 views

Published on

A laydown of all Magento caching technologies (like Redis, memcached, APC), PHP accelerators (including Zend Optimizer+) and Full Page Cache options (Varnish, LestiFPC, Zoom).

Published in: Technology
  • Be the first to comment

Magento caching

  1. 1. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Magento Caching
  2. 2. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo About PHP accelerators PHP is an interpreted language. The PHP interpreter converts PHP to bytecode. A PHP engine can cache interpreted bytecode into memory (or on the filesystem) by using a PHP accelerator (aka opcode cacher).
  3. 3. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo PHP accelerators - listing Zend Optimizer+ Built into PHP 5.5; Optional in PHP 5.4 APC Standard opcode cacher under PHP 5.3 and PHP 5.4 Obsolete: Xcache eAccelerator
  4. 4. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo PHP accelerators - tips Using Zend Optimizer+ PHP 5.5: Enabled by default PHP 5.4: Perhaps faster than APC > benchmark for yourself Using APC Make sure APC cache is large enough Make sure TTL is set and not 0 Set apc.stat = 0 if PHP-files don't change anymore
  5. 5. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Magento cache / session handlers (1/2) File (folder /var/cache) Tip: Store in tmpfs / RAM-disk Database APC (Advanced PHP Cache) or APCu (APC userland) under PHP 5.5)
  6. 6. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Magento cache / session handlers (2/2) memcached Distributed caching system Run through UNIX socket and not TCP/IP socket Redis (recommended) Dstributed caching system Cm_RedisSession extension / Cm_Cache_Backend_Redis Run through UNIX socket and not TCP/IP socket
  7. 7. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Zend TwoLevel Cache Fast cache backend Options: APC, memcached, file Slow cache backend Options: Files, database, memcached, apc Ment for management of tags, when fast cache does not In practice When memcached is used (fast cache), /var/cache is still used (slow cache) When Redis is used (fast cache), /var/cache stays empty (no slow cache)
  8. 8. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Magento caching - tips Use Redis instead of memcache Bypass Two Level Cache issue (and keep /var/cache empty) Optimize “files” backend (/var/cache) When small enough, use RAM disk or tmpfs When larger, use Cm_Cache_Backend_File for more subfolders When even larger, switch to other caching backend (preferred: Redis) Larger cache Beware of a cache being too large (>10Gb). Caching might become pointless.
  9. 9. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Magento FPC (Full Page Cache) Magento Enterprise Edition (Enterprise_PageCache) Lesti::FPC Free and very flexible Make sure to configure Layered Navigation properly (especially sliders) Zoom Full-Page Cache Free and a bit faster than Lesti::FPC No updates since Magento CE 1.8 AJAX calls for lazy loading
  10. 10. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Issues with FPC Cold cache is slow Prewarm the cache by using site crawlers Wrong content is displayed Hole punching not configured properly Make sure to check for proper caching of AJAX calls Session data shared between customers Only cache non-session specific data Optionally use customer specific cache (Lesti: “lazy blocks”)
  11. 11. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Reverse proxy Nginx Also native Nginx caching (fastcgi cache) No hole punching, no cache purging SSL support Varnish Magento extension Turpentine Hole punching support via VCL (Varnish Control Language) Cache purging via varnishadm (shell) No SSL support
  12. 12. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Yireo server configuration Nginx / PHP-FPM version 1.6: SPDY FastCGI page caching PHP-FPM through socket, not TCP/IP PHP 5.4 Zend OPC, not APC Magento + Redis cache MySQL InnoDB tuning
  13. 13. Presentation “Magento Caching” - http://slideshare.net/yireo Jisse Reitsma (jisse@yireo.com) - Twitter @yireo Yireo Stuff DisableLog Disable all Magento logging ProfilerLog Gather profiling statistics over time (plus nice graphs in Magento backend) Magento Performance Insights Pending: Web-based in summer 2014

×