Article Source: http://blog.chinaunix.net/uid-9370128-id-1687475.html
The same IDC, IDC internal DNS server, the IP of each server to do a reverse resolution,
but not the internal network IP to do reverse resolution, so use Skip-name-resolve after using the intranet address to Mysqlslap request response half faster
Appendix: 7.5.6. How MySQL uses DNS
,--skip-networking involving parameter--skip-name-resolve,--Skip-host-cache
When a new client connects to Mysqld, Mysqld creates a new thread to process the request. The thread first checks whether the hostname is in the host name cache. If not, the thread attempts to resolve the host name:
· If the operating system supports thread-safe gethostbyaddr_r () and Gethostbyname_r () calls, threads use them to perform host name resolution.
· If the operating system does not support thread-safe calls, the thread locks a mutex and calls Gethostbyaddr () and gethostbyname (). In this case, no other thread can resolve the host name that is not in the host name cache until the 1th line threads unlocked the mutex.
You can use the--skip-name-resolve option to start mysqld to disable DNS host name lookups. However, in this case, you can only use the IP number in the authorization table in MySQL.
If you have a very slow DNS and many hosts, you can improve performance by disabling DNS lookups with--skip-name-resolve or by adding the Host_cache_size definition (default: 128) and recompiling the mysqld.
You can use the--skip-host-cache option to start the server to disable host name caching. To clear the host name cache, execute the FLUSH hosts statement or execute the mysqladmin flush-hosts command.
If you want to completely disable TCP/IP connections, start mysqld with the--skip-networking option.
Appendix. Grabbing data to be fully covered
when you connect to MySQL, you do a reverse address query to DNS
MySQL responds to clients only when the timeout fails
the MySQL process waiting to be parsed is the login state