I saw some bad utilization of the query cache on one of my clusters the other day. I haven’t tuned the cache since installing the standard cnf file so let’s take the following usage graph that is output by Monolith.

Queries not cached: 40,000
Queries in cache: 250

Queries not cached: 7500
Queries in cache: 200
In the first image we see there are dramatically less queries in the cache vs. the number of queries not cached. This was pulled with the following variables:
query_cache=32M
query_cache_limit=1M
Take the second graph after changing the settings to:
query_cache=8M
query_cache_limit=128K
So after seeing the visual relation between queries in the cache and queries not cached, tuning and checking again, we have a much better utilization of the cache – less queries not cached. After watching the server more we might want to change settings again to further tune this. If I increase the query_cache size now, even more queries will stay in the cache which will allow more efficient utilization of the cache, but that’s for another time.
One thing to watch here in the trend is that the queries not cached does not continue to grow linearly in the manner that the first graph shows.