Tuning PHP’s Realpath Cache
Today I learned about the (relatively new) realpath_cache_size and realpath_cache_ttl php.ini directives, which were added in PHP 5.1.0.PHP 5.1.x and up caches the real path of include files, thus avoiding the extra system call when include_once and require_once are used (or at least, this is what I understood – hope I didn’t confuse anything).
Apparently, the cache size is configurable, and if you’re system has lots of RAM, you can increase realpath_cache_size – the default is 16Kbyte, which means you’ll have 16Kbyte of cache per Apache process. Almost every decent production system can handle an additional 16KBytes per process, and as I understand, this could have a positive effect on performance in applications that have lots of include files.
页:
[1]