APC -> APCu / OPCache, performance poor

后端 未结 3 589
青春惊慌失措
青春惊慌失措 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:35

    Right now you are checking every file on every request for changes, which probably isn't what you want on a production system.

    I usually just disable it (remember to restart the web server after making changes):

    opcache.validate_timestamps=0
    

    Alternatively, you can try setting the frequency to something other than 0 and keep it enabled:

    opcache.validate_timestamps=1  
    opcache.revalidate_freq=300
    

    This should theoretically only check for changes every 5 minutes.

提交回复
热议问题