APC -> APCu / OPCache, performance poor

后端 未结 3 598
青春惊慌失措
青春惊慌失措 2020-12-23 20:54

I have an m3.xlarge EC2 instance that I updated to PHP 5.5.11 today.

With this update, it overwrote php55-pecl-apc with

3条回答
  •  余生分开走
    2020-12-23 21:36

    From the RFC that was responsible for making OPCache integrated into PHP:

    APC can reclaim memory of old invalidated scripts. APC uses a memory manager and can reclaim memory associated with a script that is no longer in use; Optimizer+ works differently, and marks such memory as ‘dirty’, but never actually reclaims it. Once the dirty percentage climbs above a configurable threshold - Optimizer+ restarts itself. Note that this behavior has both stability advantages and disadvantages.

    My guess is that you are hitting the threshold that triggers the opcode cache restart.

    Reference: https://wiki.php.net/rfc/optimizerplus#advantages_of_apc_over_optimizer

提交回复
热议问题