Stack Matrix Hub (8)
APCu & OPcache Tuning for PrestaShop Symfony Containers
Cut Symfony metadata parsing overhead by pinning APCu apc.shm_size = 128M and Doctrine/YAML annotation caches.
128 MB APCu SHM · 32,531 OPcache Files · -38% CPU
Why APCu Accelerates PrestaShop Back Office and Checkout
PrestaShop relies on Doctrine metadata, translation catalogs, and Symfony routing tables. Enabling APCu (apc.shm_size = 128M) keeps hot metadata inside shared worker memory rather than re-reading serialized files on every request.
Raising opcache.max_accelerated_files Past 30,000
A PrestaShop 8/9 store with 35 modules easily ships over 18,000 PHP files. Raise opcache.max_accelerated_files = 32531 so OPcache never evicts core Symfony classes.
Measured Thresholds & Configuration
| PHP Directive | Default Value | EuroCart Bench Target | Impact |
|---|---|---|---|
| opcache.memory_consumption | 128M | 192M - 320M | Zero cache eviction |
| opcache.max_accelerated_files | 10000 | 32531 | Covers core + 60 modules |
| apc.shm_size | 32M | 128M | Fits Doctrine + translation maps |