<ubuntu Ping Response Slow latency serious resolution >

Source: Internet
Author: User

solve Ubuntu slow, latency problemsRecently found that there are several Ubuntu server12.04.2, ping www.baidu.com slow response, IP with no problem, the DNS resolution write is also fully OK, its grandmother, Ping is slow to respond to the deadly, sometimes not through, monitoring has been the police,  It's annoying. Exclude these items:
    1. IP configuration issues;
    2. DNS resolution issues;
    3. network cable problem;
Try to take a look at the Ubuntu server, ping still exists this problem, CentOS, Redhat play more, encounter this also really believe their level, but is not solve the problem of ping. Later found is because the/etc/nsswitch.conf file in the configuration of the hosts have problems, make the following changes after normal:

#/etc/nsswitch.conf
#
# Example configuration of the GNU Name Service Switch functionality.
# If you have the ' glibc-doc-reference ' and ' info ' packages installed, try:
# ' info libc ' Name Service Switch "' For information about the this file.

Passwd:compat
Group:compat
Shadow:compat

#hosts: Files Mdns4_minimal [Notfound=return] DNS MDNS4//comment off this line
Hosts:files DNS//Add the following line
Networks:files

PROTOCOLS:DB files
SERVICES:DB files
ETHERS:DB files
RPC:DB files

Netgroup:nis
~

Without restarting, Ping is all right now.   What's wrong with the problem? When you need to provide the information described in the Nsswitch.conf file, the system checks the configuration line with the appropriate info field. It followsfrom left to rightThe order begins execution of the method specified in the configuration line. By default, the system stops searching if the expected information is found. If you do not specify an action, the system tries the next action when a method fails to return a result.  It's possible that the search ended without finding the information you wanted. For example, the following two lines of nsswitch.conf file configuration line: Host NIS files DNS through #strace/etc/nsswitch.conf can be viewed in fact, the reason for the delay is in the NIS this block, which is not found when calling the search NIS library, Too much time is wasted. Continue to the next search, found. Thus a delay occurs. Reference blog: Analysis of http://www.cnblogs.com/cute/archive/2012/05/17/2506342.html nsswitch.conf file

<ubuntu Ping Response Slow latency serious resolution >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.