eZ Platform can be set up to run efficiently on almost any modern configuration. What follows is a list of recommendation that will make your installation perform better.
All the following recommendations are valid for both development and production setups, unless otherwise noted.
If you are in a hurry, the most important recommendations on this page are:
- Dump optimized Composer autoload classmap
- In development, use a full web server with vhost
- For clustering, reduce latency to Redis/Memcached, use Varnish and Solr
- Always use an up-to-date browser and an up-to-date operating system so you have access to latest browser versions
- If possible, use a fast, stable internet connection, because an unreliable connection will slow down UI
In production setups:
- Always use reverse proxy, and if possible use Varnish.
- Compared to the built-in Symfony Proxy in PHP Varnish is much faster and is able to queue up requests for the same fresh/invalidated resource.
- With ezplatform-http-cache support for xkey and grace Varnish provides more stable performance in read/write scenarios.
- Set up eZ Platform in cluster mode if you need to handle bigger spikes of traffic than a single server can manage.
- Use Nginx/Apache even for development, as PHP's built-in web server (as exposed via Symfony's
server:*commands) is only able to handle one request at a time.
- Use a recent version of nginx, set up https, and enable http/2 to reduce connection latency on parallel requests.
- Always enable opcache for php-fpm/
- Prefer php-fpm and web server using it over fast-cgi for lower overall memory usage.
- Keep Composer up to date.
- Always dump optimized class map using
composer dump-autoload --optimizeor relevant flags on
- Redis is recommended over Memcached as the latter has big performance issues caused by how Symfony cache works for cache tagging (Memcached does not handle lookups of non-existing cache items very well).
- Redis is recommended over filesystem cache even with a single server, as it offers better general performance for operations invalidating cache.
- However, pure read performance is slower, especially if the next point is not optimized.
- If you use Redis, make sure to tune it for in-memory cache usage. Its persistence feature is not needed with eZ Platform cache and will severely slow down execution time.
- Use Solr Bundle and Solr to greatly offload your database and get more stable performance on your installation.