首页 » 系统相关 » 粗谈 Load_average 负载

粗谈 Load_average 负载

linux/unit 系统中查看cpu系统负载,都会先看一下这个参数,这个值在uptime 或ps 中都有


[oracle@topbox ~]$ grep "model name" /proc/cpuinfo
model name      : Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
model name      : Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
model name      : Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
model name      : Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
model name      : Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
model name      : Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
model name      : Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
model name      : Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
[oracle@topbox ~]$ uptime                                       
 11:32:58 up 782 days, 19:25,  1 user,  load average: 0.52, 0.48, 0.50
[oracle@topbox ~]$ top

top - 11:33:03 up 782 days, 19:25,  1 user,  load average: 0.56, 0.49, 0.50
Tasks: 561 total,   1 running, 560 sleeping,   0 stopped,   0 zombie
Cpu(s): 18.0%us,  1.0%sy,  0.0%ni, 78.3%id,  1.7%wa,  0.0%hi,  1.0%si,  0.0%st
Mem:  16432240k total, 16341584k used,    90656k free,    59308k buffers
Swap: 16383976k total,   105476k used, 16278500k free, 13140524k cached

load average: 0.56, 0.49, 0.50
三个值前后分别是最近1分,5分,15分钟的平均负载,其实如果是单核CPU 的0.1 与0.9是没多大关系的,都表示现在压力可以接受,如果大于cpu总核数,那就是cpu 承载压力已超出,需要分析原因了,而如果是8核CPU或4个双核CPU,这个值在0到7也是正常的

一般判断这个值经验值是判断5分钟或15分钟,如果一直超负荷,就要考虑增加CPU了

打赏

目前这篇文章有1条评论(Rss)评论关闭。

  1. Jazmin Zwilling | #1
    2011-12-21 at 02:57

    Do you mind basically if I cite a pair of your current topics as long as I give you acknowledgement along with sources back to your website? My internet sites is within the matching topic as yours and my website visitors would certainly make full use of a lot of the expertise you actually offer on this site. Feel free to inform me if it is okay with you. Kind regards!