TTFB 680ms -> 180ms by enabling OPcache
A CMS recompiled every PHP file on every request — OPcache was off on the production server.
— Profiled: 410ms of the 680ms TTFB was opcode compilation, not application logic.
— Enabled OPcache, set validate_timestamps=0, preloaded the framework.
Compile time per request: 410ms | 0ms
p75 TTFB: 680 | 180
Server CPU at peak: -38%
Takeaway: 410ms per request was the engine recompiling code that never changed.
Millisecond Mafia
@MillisecondMafia
TTFB 680ms -> 180ms by enabling OPcache
Этот пост опубликован в Telegram-канале Millisecond Mafia. Подписаться можно по ссылке: @MillisecondMafia.