Linux – ping response time

linuxping

I have two sites hosted on two different data-centres. Recently one site has become very slow. The ping response from application server to DB server is not fast enough. How do I investigate the issue?

On fast server:
10 packets transmitted, 10 received, 0% packet loss, time 8998ms
rtt min/avg/max/mdev = 0.243/0.279/0.502/0.074 ms

On slow server:
21 packets transmitted, 21 received, 0% packet loss, time 20011ms
rtt min/avg/max/mdev = 1.131/1.816/3.584/0.560 ms

The tracert command shows the following:

On fast server:
tracert db
traceroute to db (xxx.xxx.100.101), 30 hops max, 40 byte packets
 1  db (xxx.xxx.100.101)  0.552 ms  0.530 ms  0.527 ms

 On slow server:
tracert xxx.16.55.140
traceroute to xxx.16.55.140 (xxx.16.55.140), 30 hops max, 40 byte packets
 1  xxx.16.55.140 (xxx.16.55.140)  1.859 ms  1.845 ms  1.842 ms

Best Answer

Perform a pathping from the web server to the database server and see where the slowdown is reported to be. Then, confirm by performing a pathping from the database server to the web front end. Use the IP address of the nodes, and not DNS names. As Womble pointed out, it could be rDNS slowdowns.

FYI, pathping, like tracert, can provide deceiving path information simply based on how packets might be routed one way forward and a different way backward based on network congestion. Also, the forward path is not guaranteed to be the same with each increased hop. However, those are extraneous topics at this point. Moving on...

Once you determine where the slowdown is you can continue to troubleshoot. It may be the end nodes themselves are the slowdown if they are under heavy load or improperly configured in some way. If you find out what the slow node is, update your questions with the proper information.