title: How can I tune the PHP realpath cache?
body: <p>Recent versions of PHP have a cache of filenames for knowing the real path of files, and <code>require_once()</code> and <code>include_once()</code> can take advantage of it.</p>
  
  <p>There's a value you can set in your <em>php.ini</em> to set the size of the cache, but I have no idea how to tell what the size should be.  The default value is 16k, but I see no way of telling how much of that cache we're using.  The docs are vague: </p>
  
  <p><a href="http://us2.php.net/manual/en/ini.core.php#ini.realpath-cache-size" rel="nofollow noreferrer">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.</a></p>
  
  <p>Yes, I can jack up the amount of cache allowed, and run tests with <code>ab</code> or some other testing, but I'd like something with a little more introspection than just timing from a distance.</p>