APC Hits/Misses and configuration

7.9k views Asked by At

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?

1

There are 1 answers

0
Justin On BEST ANSWER

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.