LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-13-2019, 06:28 AM   #1
hemouyang
LQ Newbie
 
Registered: Aug 2019
Posts: 4

Rep: Reputation: Disabled
Unhappy centos7 ping localhost slow


When my machine was loaded with 10% CPU, 25% memory consumption and enough disk space, ping localhost found that the response time was 6ms, and it was also found that the IP time of other machines in the Intranet ping my machine was about 6ms.The Intranet network has determined that the environment is fine, and I have killed all the services that have been started (e.g. Mysql, redis), and found through traceroute that ping localhost is a local loop.The tcpdump catch tells you that the request is fast but the machine's reply is slow.Rebooting the network card does not work, but reboot will restore the machine to its original response speed of 0.04ms, which will slow down after a period of time.I suspect that the Linux kernel is slow in backpacking from network packets. How to locate and solve the problem?
 
Old 08-13-2019, 08:03 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,194

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
When you are seeing the delay, what is the output of these commands (after changing public IPs to XXX)
Code:
sudo iptables -vL
sudo tc -s qdisc
 
Old 08-13-2019, 02:54 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,145

Rep: Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918
Thoughts.

Not sure you can depend on ping.

If you have any sort of services that were on the localhost then that could leave leftovers.

I'd do a test to a localhost server instead or some file transfer maybe.

Localhost inside of a nic can be quite different than normal traffic too.

Guess it's possible that your loopback test is actually going outside of your nic and back still.

Last edited by jefro; 08-14-2019 at 05:04 PM.
 
Old 08-13-2019, 11:00 PM   #4
hemouyang
LQ Newbie
 
Registered: Aug 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
When you are seeing the delay, what is the output of these commands (after changing public IPs to XXX)
Code:
sudo iptables -vL
sudo tc -s qdisc
Thank you very much. I saw that iptables had a large number of Chain INPUT (policy ACCEPT) rules, so many that I could not saw all of them. I saw that iptables had a large number of Chain INPUT (policy ACCEPT) rules, so I guess this may be the reason for my slow response, but I was surprised that I did not know how these rules were generated, and all these rules disappeared after rebooting linux.
 
Old 08-13-2019, 11:02 PM   #5
hemouyang
LQ Newbie
 
Registered: Aug 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hemouyang View Post
Thank you very much. I saw that iptables had a large number of Chain INPUT (policy ACCEPT) rules, so many that I could not saw all of them. I saw that iptables had a large number of Chain INPUT (policy ACCEPT) rules, so I guess this may be the reason for my slow response, but I was surprised that I did not know how these rules were generated, and all these rules disappeared after rebooting linux.
Click image for larger version

Name:	tc -s.png
Views:	3
Size:	53.2 KB
ID:	31116

Click image for larger version

Name:	iptables -vL.png
Views:	3
Size:	57.0 KB
ID:	31117

Here are some images of commands
 
Old 08-13-2019, 11:05 PM   #6
hemouyang
LQ Newbie
 
Registered: Aug 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Thoughts.

Not sure you can depend on ping.

If you have any sort of services that were on the localhost then that could leave leftovers.

I'd do a test to a localhost server instead of some file transfer maybe.

Localhost inside of a nic can be quite different than normal traffic too.

Guess it's possible that your loopback test is actually going outside of your nic and back still.
thanks,I really should not solve the problem based on Ping, but I found that this is the only phenomenon and I had no clue to locate the problem. I grabbed the packet and analyzed that Ping did not go out of loopback
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any problem if I install CENTOS7 Workstation over CENTOS7 Server? Rich Strebendt Linux - Software 5 05-03-2018 11:05 PM
[SOLVED] Can ping & ping6 into Centos7 server from outside & can ping out, but can't ping6 out ftbseobrad Linux - Server 3 02-09-2017 08:43 PM
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
Can't ping localhost (ping: sendto: Operation not permitted) mentor99us Linux - Networking 7 09-05-2012 02:11 PM
I cannot ping with command 'ping IP' address but can ping with 'ping IP -I eth0' sanketmlad Linux - Networking 2 07-15-2011 05:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration