APC 命中/未命中和配置
关于 APC 操作码缓存的“命中和未命中”是什么?我已经安装了 APC 并且运行得很好,但是我有“一些”失误,我想知道这是否是“坏”的。另外,我正在运行 Openx,因此,很快就会填满“缓存完整计数”。我需要在配置中更改哪些内容才能最大限度地减少这种情况?有推荐的配置吗?
What are "Hits & Misses" in reference to APC opcode caching? I've installed APC and it's running great, but I've got "some" misses and I'm wondering if that's "bad". Also, I am running Openx and, as such, am filling up the "Cache full count(s)" pretty quickly. What do I need to change in the configuration to minimize that? Any recommended configurations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一些失误是可以预料的。
Hits = 事物在缓存中
Miss = 事物(尚未)在缓存中。新的或很少使用的东西总是会被错过,所以你总是会期待一些。
您可能需要调整专用于 APC 的内存量 - 这是一种猜谜游戏,平衡您的机器拥有的内存量和您“通常”在 APC 中填充的内存量(它应该告诉您已满的数量或百分比) )。您必须调整各种值才能看到。好的基线是所有源代码的压缩版本,例如 gzip 级别 2 - 假设您要删除注释、变量名称和其他内容,您将永远无法克服这一点。然后您就可以计算出要专用于缓存的金额。
如果您也使用 APC 进行键值缓存,那么它会比代码缓存更快地被填满 - 并且您预计最终会填满它。然后,您需要找到一个能够提供您满意的错失率的金额。
Some misses are to be expected.
Hits = things are in cache
Miss = things not (yet) in cache. New or less-used things will always be a miss, so you'll always expect some.
You may need to tune how much memory you're dedicating to APC - Its sort of a guessing game, balancing how much memory your machine has and how much you 'usually' have filled in APC (it should tell you a amount or percent full). You'll have to tweak various values to see. An OK baseline is a compressed version of all your source code at like gzip level 2 - assume you're taking out comments and variable names and stuff, and you'll never get over that. Then you can figure out how much to dedicate to the cache.
If you're using APC for key-value caching as well, that will fill up faster than just code caching - and you'll expect to fill it up eventually. You'll then need to find an amount that gives a miss ratio you're comfortable with.