Wednesday, March 04, 2015

PHP Tuning - realpath_cache_size integer and realpath_cache_ttl integer

Two interesting directives available since PHP 5.1 are

  1. real_cache_size
  2. real_cahe_ttl

The given definitions are as follows.

realpath_cache_size integer - Determines the size of the realpath cache to be used by PHP. This value should be increased on systems where PHP opens many files, to reflect the quantity of the file operations performed.
The size represents the total number of bytes in the path strings stored, plus the size of the data associated with the cache entry. This means that in order to store longer paths in the cache, the cache size must be larger. This value does not directly control the number of distinct paths that can be cached.
The size required for the cache entry data is system dependent.
realpath_cache_ttl integer - Duration of time (in seconds) for which to cache realpath information for a given file or directory. For systems with rarely changing files, consider increasing the value.
One user on a Reddit Thread  seems to suggest that on enabling he got 50-70% increase in performance. That is significant. What I am not sure is how it works with APC.


References

Audio Noise Removal

Many times in record clips we end up with unwanted background noise. Recently faced with the situation, I  needed to clean up some audio and...