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?
Run "free -m" and look at the second line (-/+ buffers/cache), this is a more accurate representation of your memory usage in mb.
See the responses in
– ManiacZX Oct 28 '09 at 07:36http://serverfault.com/questions/73189/why-is-my-server-using-so-much-memory
and
http://serverfault.com/questions/9442/why-does-red-hat-linux-report-less-free-memory-on-the-system-than-is-actually-ava
table_open_cachewhen you look at the docs. See @MarkRs answer when looking attable_cache– Jason Jul 28 '15 at 09:49