在今天的ssh会议上,我的amazon ec2实例在login时收到以下通知:
系统信息由于负载高于1.0而被禁用
读这个:
System load averages is the average number of processes that are either in a runnable or uninterruptable state. A process in a runnable state is either using the CPU or waiting to use the CPU. A process in unin‐ terruptable state is waiting for some I/O access, eg waiting for disk. The averages are taken over the three time intervals. Load averages are not normalized for the number of CPUs in a system, so a load aver‐ age of 1 means a single CPU system is loaded all the time while on a 4 CPU system it means it was idle 75% of the time.
我明白,这是由于CPU达到100%(我使用微型实例与Ubuntu 13.10安装)。 问题是,看着我的aws显示器,我可以看到,在过去的20分钟里,甚至还没有达到20%的标准,半小时前当我安装了很多更新时,出现了一个接近75%的峰值。
任何人都可以澄清是什么问题?
首先,CPU百分比!=负载平均值。 你可能应该看看有什么不同。
现在,对你的问题。 如果负载平均值在login时突然激增,即使是几秒钟,也足以将其推到1.00以上,这将禁用Ubuntu的系统信息显示。 如此短的尖峰在长时间持续时间图中显示时,经常会被“平均掉”,所以您不会看到它们。 此外,AWS cloudwatch图表无法知道您的系统平均负载。 只有您的实例中的内核可以知道这一点。 Cloudwatch只能看到你使用了多lessCPU,这只是一个进入平均负载的小组件。