Bug #8851 Document the memory requirement for the table cache
Submitted: 28 Feb 2005 21:33 Modified: 28 Apr 2005 0:37
Reporter: John David Duncan Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1, 5.0 OS:Any (all)
Assigned to: Paul Dubois CPU Architecture:Any
Triage: D4 (Minor)

[28 Feb 2005 21:33] John David Duncan
Description:
Some mysql servers have table cache sizes set to 2000 or greater.

How much memory is required for a large table cache? 

Because the table cache is mentioned many times in the manual in conjunction with OS-imposed limits on open file descriptors, it is easy to make the mistake of thinking that the table cache is simply a cache of open file descriptors.  (In fact I made this mistake for several years!)

Actually, a table cache entry seems to require at least a TABLE structure and an instance of the handler class and possibly a few other linked structures.  The size of an instance of handler, moreover, might depend on the secret voodoo of C++'s "new" operator. 

But if someone can determine (roughly or typically) how much memory is actually required by the table cache, I'd like to see this information in section 7.5.5 "How MySQL Uses Memory".

How to repeat:
n/a

Suggested fix:
n/a
[28 Apr 2005 0:37] Paul Dubois
Asked the devs about this. Got value, "it depends"
responses not permitting any definitive statements
to be made.
[28 Apr 2005 0:42] Paul Dubois
s/value/vague/