日期:2014-05-16  浏览次数:20658 次

【翻译】理解Linux cpu load的含义

网上看道这篇文章,

Understanding Linux CPU Load - when should you be worried?

感觉还不错,翻译和摘录了关键的信息:

?

对于单核的机器而言,3条原则(多核类推)

1,load小于0.7的时候,系统很正常;只有大于0.7的时候,需要关注下。The?"Need to Look into it"?Rule of Thumb:?0.70?If your load average is staying above > 0.70, it's time to investigate before things get worse.

?

2,load大于1的时候,需要马上解决。The?"Fix this now"?Rule of Thumb:?1.00. If your load average stays above 1.00, find the problem and fix it now. Otherwise, you're going to get woken up in the middle of the night, and it's not going to be fun.

?

3,load大于5的时候,噩梦开始了。The?"Arrgh, it's 3AM WTF?"?Rule of Thumb:?5.0. If your load average is above 5.00, you could be in serious trouble, your box is either hanging or slowing way down, and this will (inexplicably) happen in the worst possible time like in the middle of the night or when you're presenting at a conference. Don't let it get there.

?

所以,如果是四个处理器的机器,load为3,完全健康状态;?Got a quad-processor system? It's still healthy with a load of 3.00.

?

多核和多处理器的对比,核是关键:

2个四核的处理器 == 4个二核的处理器 ==八个单核的处理器。

?

  • The "number of cores = max load"?Rule of Thumb: on a multicore system, your load should not exceed the number of cores available.

  • The?"cores is cores"?Rule of Thumb: How the cores are spread out over CPUs doesn't matter. Two quad-cores == four dual-cores == eight single-cores. It's all eight cores for these purposes.

    ?

    top命令或uptimes命令查看到得信息:

    load ave