Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do ping requests put a load on a server?

I have a lot of clients (around 4000). Each client pings my server every 2 seconds. Can these ping requests put a load on the server and slow it down?

How can I monitor this load? Now the server response slowly but the processor is almost idle and the free memory is ok. I'm running Apache on Ubuntu.

like image 968
Pavel Avatar asked Nov 21 '25 08:11

Pavel


1 Answers

Assuming you mean a UDP/ICMP ping just to see if the host is alive, 4000 hosts probably isn't much load and is fairly easy to calculate. CPU and memory wise, ping is handled by your kernel, and should be optimized to not take much resources. So, you need to look at network resources. The most critical point will be if you have a half-duplex link, because all of your hosts are chatty, you'll cause alot of collisions and retransmissions (and dropped pings). If the links are all full duplex, let's calculate the actual amount of bandwidth required at the server.

  • 4000 client @2 seconds
  • Each ping is 72 bytes on the wire (32 bytes data + 8 bytes ICMP header + 20 bytes IP header + 14 bytes Ethernet). * You might have some additional overhead if you use vlan tagging, or UDP based pings
  • If we can assume the pings are randomly distributed, we would have 2000 pings per second @ 72 bytes = 144000 bytes
  • Multiple by 8 to get Bps = 1,152,000 bps or about 1.1Mbps.
  • On a 100Mbps Lan, this would be about 1.1% utilization just for the pings.

If this is a lan environment, I'd say this is basically no load at all, if it's going across a T1 then it's an immense amount of load. So you should basically run the same calculation on which network links may also be a bottle neck.

Lastly, if you're not using ICMP pings to check the host, but have an application level ping, you will have all the overhead of what protocol you are using, and the ping will need to go all the way up the protocol stack, and your application needs to respond. Again, this could be a very minimal load, or it could be immense, depending on the implementation details and the network speed. If the host is idle, I doubt this is a problem for you.

like image 93
Kevin Nisbet Avatar answered Nov 23 '25 22:11

Kevin Nisbet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!