Bug #68085 Ensure there is an overflow counter (GLOBAL STATUS?) for when the host_cache siz
Submitted: 15 Jan 2013 6:47 Modified: 21 Jan 2013 6:44
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Options Severity:S4 (Feature request)
Version:5.6.9? OS:Any
Assigned to:

[15 Jan 2013 6:47] Simon Mudd
See bug: http://bugs.mysql.com/bug.php?id=67236 which was filed by me and has now been marked as closed. (The original problem has been solved.)

I'd very much like to see (as an extra feature request) a GLOBAL STATUS counter host_cache_overflow_count (?) for when the host_cache overflows if this doesn't exist already. The host_cache is good and the fact its size is now dynamically configurable is also good, but _if_ it fills up there's no indication of how frequent that is. A counter would allow us to monitor this and thus determine if this is a frequent issue or not, and thus decide whether to take appropriate action (increasing the host_cache size).

I mentioned this at the end of the bug and Marc Alff responded but it seems this is unlikely to be seen by anyone, hence making the feature request here.

Background: Why am I so paranoid about this? With 5.5 I had occasional connections problems to severs (clients have a very short connect timeout, 2s) and think this has been to mysqld doing reverse DNS lookups some of which may fail (it's UDP) but the DNS retry period is too short for the retry to have happened so mysqld simply doesn't respond in time. I've solved this by using a local caching service as disabling DNS altogether is not very friendly. I would like to be able to _see_ if there's a relationship in 5.6 and have a counter which can give a better indication of these overflows, as the overflow will (probably) trigger a DNS lookup.  This was never possible in 5.5.

How to repeat:
see above.

Suggested fix:
A a status variable which increases by 1 every time the host_cache size is exceeded.
[20 Jan 2013 18:45] James Day
Simon, or to express this differently, you seem to want a global counter host_cache_discards that says how often the LRU rule was used to remove an entry from the host cache to make room for a new entry?

Anything else that you'd like added in relation to the host cache? Might end up being enough to add an IS or PS table to hold the information.
[21 Jan 2013 6:44] Simon Mudd
Hi James.

No, this is the only thing that comes to mind, and again partly as a help to diagnose issues which may arise. I am also not too worried where this information is stored and suggested GLOBAL STATUS simply as I collect information from there on my servers already so that would be collected automatically. Another location would be fine I guess if there are reasons to do that.