Cache Catch
Cache Catch
@CacheCatch

This week in caching: an OPcache tuning pass that actually moves p99

This week in caching: an OPcache tuning pass that actually moves p99

Four dials most people leave at defaults. Gold for anyone running PHP-FPM at scale.

— Size to your codebase — set opcache.memory_consumption to ~256MB for large apps; watch opcache_get_status() for cache_full=true, the silent killer.
— Raise the file ceiling — opcache.max_accelerated_files defaults to 10k; Laravel or big WP easily exceed that, evicting hot files. Bump to 32531 (next prime up).
— Freeze validation in prod — opcache.validate_timestamps=0 stops a stat() on every request, but now you MUST reset OPcache on deploy or serve stale code.
— Add the JIT carefully — opcache.jit=tracing helps CPU-bound work, often nothing for I/O-bound web apps; benchmark before celebrating.

Credit to Brent Roose's PHP-FPM tuning writeups for the validation-timestamps trap.

Bookmark: the official opcache_get_status() output — read it before and after every change.
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.