Tuning (and understanding) table_cache in mySQL

Posted by jotango on Server Fault See other posts from Server Fault or by jotango
Published on 2009-10-27T17:52:27Z Indexed on 2010/04/11 7:03 UTC
Read the original article Hit count: 328

Filed under:
|
|

Hello,

I ran the excellent MySQL performance tuning script and started to work through the suggestions. One I ran into was

TABLE CACHE Current table_cache value = 4096 tables You have a total of 1073 tables. You have 3900 open tables. Current table_cache hit rate is 2%, while 95% of your table cache is in use. You should probably increase your table_cache

I started to read up on the table_cache but found the MySQL documentation quite lacking. They do say to increase the table_cache, "if you have the memory". Unfortunately the table_cache variable is defined as "The number of open tables for all threads."

How will the memory used by MySQL change, if I increase this variable? What is a good value, to set it to?

© Server Fault or respective owner

Related posts about mysql

Related posts about mysqld