做ping请求把服务器上的负载? [英] Do ping requests put a load on a server?

查看:500
本文介绍了做ping请求把服务器上的负载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多的客户(约4000)。
每个客户端坪我的服务器每2秒。
这些ping请求可以把负载在服务器上,慢下来?

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?

如何监控此负载?
现在,服务器响应慢,但处理器几乎是闲置和空闲内存就可以了。
我在Ubuntu上运行的Apache。

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.

推荐答案

假设你的意思是UDP / ICMP的ping只是为了看看如果主机是活的,4000大概的主机没有太大的负荷,是相当容易计算。 CPU和内存明智,平处理通过你的内核,并应进行优化,以花不了多少资源。所以,你需要看的网络资源。最关键的一点将是,如果你有一个半双工链路,因为所有的你的主机是健谈,就会造成很多冲突和重传(和丢弃的坪)的。如果链接都是全双工的,让我们计算在服务器所需的带宽的实际金额。

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 you're 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 you're 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客户端@2秒

  • 每个平是在电线上(32字节数据+ 8字节的ICMP报头+ 20字节的IP头+ 14字节以太网)的72个字节。 *如果您使用VLAN标记,或基于UDP的ping你可能有一些额外的开销

  • 如果我们可以假设坪是随机分布的,我们将有每秒2000坪@ 72字节= 144000字节

  • 多8得到=的bps 1,152,000个基点,或约1.1Mbps。

  • 在一个100Mbps网卡,这将是大约1.1%的利用率只为坪。

如果这是一个局域网环境中,我会说这基本上是空载可言,如果它横跨T1去那么它负载的巨大数额。所以,你应该基本运行相同的计算上的网络链接也可能是一个瓶颈。

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.

最后,如果你不使用ICMP ping命令来检查主机,但有一个应用程序级平,你将有你使用的是什么协议的所有开销,而ping需要一路走了协议栈,而你的应用程序需要作出回应。再次,这可能是一个非常小的负载,或者它可能是巨大的,取决于实施的细节和网络速度。如果主机是空闲的,我怀疑这对你是一个问题。

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 you're 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.

这篇关于做ping请求把服务器上的负载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆