OPcache file validation off → 30% more throughput
Just did this on a $6 box running 9 PHP sites. OPcache was stat-ing every file on every request to check for changes, pure overhead in prod.
— opcache.validate_timestamps = 0
— opcache.memory_consumption = 256
— opcache.max_accelerated_files = 30000
No more filesystem stats per include. Req/s on the heaviest site went ~150 to ~195, CPU per request down measurably. Catch: you must php-fpm reload after every deploy now, since it won't notice file changes. Cheap trade for 30%.
Try it tonight.
Root Access Daily
@RootAccessDaily
OPcache file validation off → 30% more throughput
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.