On Wed, Sep 4, 2013 at 8:28 PM, Bostjan Skufca <bost...@a2o.si> wrote:
> Hi all, > > there is no description to be found about what the value of > realpath_cache_size actually is. > > Is it > a) max number of files/dirs in the cache or > b) overall cache size? > > I checked php.ini samples distributed with PHP 5.5.3, and documentation > here: > http://php.net/realpath-cache-size > > Can please someone here provide an answer? > Documentation and php.ini update would be nice too :) > This is a little bit complicated. The size represent the total number of bytes in the overall paths stored + some garbage. So if realpath cache stores an entry of say "/tmp/foo/bar.baz", then it will add 16 bytes to the realpath cache size. i.e, the longer the paths, the higher the cache size should be. The formula is located at http://lxr.php.net/xref/PHP_TRUNK/TSRM/tsrm_virtual_cwd.c#643 The realpath_cache_size() PHP function documentation says "Returns how much memory realpath cache is using." , and this is actually true, though it could be more accurate on how this memory is calculated. The realpath_cache_size INI description is "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." It's not very specific either, I admit. Julien.Pauli