& Lt; solve the problem of serious slow response latency caused by ubuntu ping & gt;, ubuntuping

Source: Internet
Author: User

<Solve the problem of serious slow and delayed ubuntu ping response>, using tuping
Solve the problem of slow ubuntu response and delay recently found that there are several offline ubuntu server12.04.2, ping www.baidu.com slow response to death, the ip address configuration is no problem, the dns resolution is completely OK, it's Grandma's, ping is slow, sometimes it doesn't work, monitoring has been alarming, annoying. Exclude these items: Try to install a new ubuntu server and check that ping still has this problem. There are more games such as centos and redhat. I really believe in my own skills, but it cannot solve the ping problem. Later, it was found that the hosts configuration in the/etc/nsswitch. conf file is incorrect. After making the following changes, it will be normal:

#/Etc/nsswitch. conf
#
# Example configuration of 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 this file.

Passwd: compat
Group: compat
Shadow: compat

# Hosts: files mdns4_minimal [NOTFOUND = return] dns mdns4 // comment out 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
~

No need to restart. Now ping is normal. Where is the problem? When you need to provide the information described in the nsswitch. conf file, the system will check the configuration line containing the appropriate info Field. It runs the method specified in the configuration line from left to right. By default, if you find the expected information, the system stops searching. If no action is specified, the system will try the next action when a method fails to return the result. It is possible that the desired information is not found at the end of the search. For example, the following two lines of nsswitch. conf file configuration line: host nis files dns through # strace/etc/nsswitch. conf shows that the reason for the delay is nis. It cannot be found until the nis database is searched. Continue to the next search and find it. This causes latency. Reference blog: Analysis of http://www.cnblogs.com/cute/archive/2012/05/17/2506342.html nsswitch. conf file

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.