Zend default performance parameters and default settings

As far as I understand these settings:

opcache.validate_timestamps=0
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=3907
opcache.blacklist_filename=/blacklisted_files

      

should improve performance (per links: 1 , 2 and 3 ). I'm really not sure about the last two, and in my case the value "4" "internet_strings_buffer" will never be populated (therefore does not give better results), but "validate_timestamps" should remove the stat () overhead and hence give me better but as per my tests with JMeter I cannot confirm this. Each setting alone is worse than the default settings.

I understand that "performance tuning" might not improve much, but I think it shouldn't get any worse (the difference is about +2ms for each request).

Q: Why are the default settings better than performance settings / recommendations?

Also does OPCache handle less rewrite / delete / lookup in memory better than more (says "opcache.memory_consumption" setting)?

+3


source to share


1 answer


Choices 2 and 3 have an indirect performance impact because they relate to the capacity of the Operations cache. If your current usage is consistent with the defaults, you won't see any significant difference other than a slight increase in the system overhead of using Opcache. Of course, you will benefit if the current usage is not appropriate, because the cache will have more capacity and you will get fewer cache misses.

Option 4 is about defining patterns for PHP script filenames that are volatile and therefore should not be cached. This is especially important if you have disabled timestamp checking, as such changes will not be picked up by Opcache.



Option 1 removes additional stat () calls that strace

the PHP process can check . On modern processors, the Linux kernel caches inodes quite efficiently, so it only stores the auxiliary mSec if the node is in the VFAT cache. You will need to build a timing test fairly well to measure this difference.

Opcache has a very bad reuse strategy: it doesn't bother. The cache fills up slowly and when full it is completely cleared and rebuilt from scratch.

+4


source







All Articles