Link to home
Create AccountLog in
Avatar of mstrelan
mstrelanFlag for Australia

asked on

MySQL query_cache_size advice

Hi experts,

I'm running a site that is serving up about 8000 pageviews per day and that is expected to increase to about 20000 or so. I want to optimize the server so that it remains fast and can handle plenty of traffic, so for now I'm focussing on MySQL tuning.

I'm using the mysqltuner.pl script and it is suggesting that I up my query_cache_size higher than 128MB at which it is currently set. I'm wondering is there a theoretical maximum setting before this has a negative impact? The server has 1.5GB of RAM.

Memory usage last 48 hours
 User generated image
Mysql selects 48 hours
 User generated image
Mysql updates last 48 hours
 User generated image
ASKER CERTIFIED SOLUTION
Avatar of Member_2_6211924
Member_2_6211924

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of mstrelan

ASKER

Well with query_cache_size set to 128M and query_cache_limit set to 1M I was getting hundreds of thousands of cache prunes per day. I have reduced query_cache_limit to 512K and now I get 0 cache prunes per day. My query cache efficiency has dropped from about 70% to 50% but mysqltuner.pl no longer gives me warnings.

Would you advise having a lower query_cache_limit or just bump up the query_cache_size?