Bug #78303 Add some DNS latency timings to performance_schema (host_cache?)
Submitted: 2 Sep 2015 10:02 Modified: 2 Sep 2015 12:04
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: Marc ALFF CPU Architecture:Any
Tags: host_cache, performance_schema

[2 Sep 2015 10:02] Simon Mudd
Description:
Sometimes when tracking down connection errors from a client it's hard to see if the problem is a problem on the client side, the network or the server.

performance_schema.host_cache has some handy information and given the way that host information is cached it might be nice if some DNS latency metrics were added here. This would help potentially indicate if it took longer to resolve a ip to hostname than normal.

How to repeat:
See above.

There is currently little information about connection metrics and timings.

Suggested fix:
It would be nice in general to add more metrics which indicate the connection phase in MySQL and what happens and how long these take.
* time from accepting a connection to having it handled by a thread
* time for any DNS lookups and other validations (grant related?)

For 5.7 this is probably too late but maybe the DNS latency values could be added as described, and might give an indication of whether DNS times vary etc, as once done the information is cached so this is probably not a frequent activity and perhaps will leave a trail which can be studied later if needed.
[2 Sep 2015 12:04] MySQL Verification Team
Hello Simon,

Thank you for the feature request!

Thanks,
Umesh