MySQL tuning

I’ve been notified of “Too many connections” errors lately (thanks to logcheck), and I just realized that I think I’ve missed a few emails from Yahoogroups.

So looking around, I found out that MySQL’s table_cache was set to 64, and max_connections at 100. While table_cache really should be (max_connections * N), where N is the max number of tables that may be in a JOIN operation at anytime.

No wonder that, when checked with mysqladmin -p status, table_cache always peaked at its maximum.

table_cache has been raised to 512, and the server is running happily now.

For those who suspect that they need to tune their MySQL installation, here are 2 good links :
[ Tuning MySQL ]
[ Tuning MySQL 4 ]


Leave a Reply

Your email address will not be published. Required fields are marked *