How can I tune the PHP realpath cache?

大城市里の小女人 提交于 2019-11-30 07:32:16

You've probably already found this, but for those who come across this question, you can use realpath_cache_size() and realpath_cache_get() to figure out how much of the realpath cache is being used on your site and tune the settings accordingly.

Though I can't offer anything specific to your situation, my understanding is that 16k is pretty low for most larger PHP applications (particularly ones that use a framework like the Zend Framework). I'd say at least double the cache size if your application uses lots of includes and see where to go from there. You might also want to increase the TTL as long as your directory structure is pretty consistent.

the 16K is the # of files not activity.

Set to 1k for most sites. Very similar to settings in APC, xcache ea etc.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!