linux load average
来源:互联网 发布:淘宝怎么提前收款 编辑:程序博客网 时间:2024/06/03 09:36
一、什么是load average?
linux系统中的Load对当前CPU工作量的度量 (WikiPedia: the system load is a measure of the amount of work that a computer system is doing)。也有简单的说是(cpu中任务个数的度量)进程队列的长度。
Load Average 就是一段时间 (1 分钟、5分钟、15分钟) 内平均 Load 。
我们可以通过系统命令"w"查看当前load average情况
[root@CNC-BJ-5-3N1 ~]# w
20:01:55 up 76 days, 8:20, 6 users, load average: 1.30, 1.48, 1.69
20:01:55 up 76 days, 8:20, 6 users, load average: 1.30, 1.48, 1.69
上面内容显示系统负载为“1.30, 1.48, 1.69”,这3个值是什么意思呢?
- 第一位1.30:表示最近1分钟平均负载
- 第二位1.48:表示最近5分钟平均负载
- 第三位1.69:表示最近15分钟平均负载
PS. linux系统是5秒钟进行一次Load采样
二、load average值的含义
2.1 单核处理器
假设我们的系统是单CPU单内核的,把它比喻成是一条单向马路,把CPU任务比作汽车。当车不多的时候,load <1;当车占满整个马路的时候 load=1;当马路都站满了,而且马路外还堆满了汽车的时候,load>1
Load < 1
Load = 1
Load >1
2.2 多核处理器
我们经常会发现服务器Load > 1但是运行仍然不错,那是因为服务器是多核处理器(Multi-core)。
假设我们服务器CPU是2核,那么将意味我们拥有2条马路,我们的Load = 2时,所有马路都跑满车辆。
Load = 2时马路都跑满了
#查看CPU core
grep 'model name' /proc/cpuinfo | wc -l
grep 'model name' /proc/cpuinfo | wc -l
3. 什么样的Load average值要提高警惕
- 0.7 < load < 1: 此时是不错的状态,如果进来更多的汽车,你的马路仍然可以应付。
- load = 1: 你的马路即将拥堵,而且没有更多的资源额外的任务,赶紧看看发生了什么吧。
- load > 5: 非常严重拥堵,我们的马路非常繁忙,每辆车都无法很快的运行
4. 三种Load值,应该看哪个?
通常我们先看15分钟load,如果load很高,再看1分钟和5分钟负载,查看是否有下降趋势。
1分钟负载值 > 1,那么我们不用担心,但是如果15分钟负载都超过1,我们要赶紧看看发生了什么事情。所以我们要根据实际情况查看这三个值。
阅读全文
0 0
- Linux Load Average
- Linux-Load Average
- Linux load average explained
- Linux-Load Average解析
- Linux-Load Average解析
- Linux-Load Average解析
- Linux-Load Average解析
- Linux中的Load average
- Linux-Load Average解析
- Linux-Load Average解析
- Linux-Load Average解析
- linux load average说明
- linux load average
- Linux load average平均负载
- Linux-Load Average解析(转)
- linux之load average分析
- Linux-Load Average解析(转)
- Linux系统中的load average
- 查找gitlab-ci runner历史版本
- ocx修改ID和名字
- ajax 设置Access-Control-Allow-Origin实现跨域访问
- 这里的人都想着做李白,却卷入现金贷漩涡不能自拔
- 自定义控件那些事儿 ----- 七【绘制Bitmap】
- linux load average
- jQuery中动态生成数据使用on绑定无效的问题;
- Spring-mvc自定义拦截器实现
- 中国国家防火墙
- Python爬取竞彩网每场比赛的开奖结果中的详细信息
- spoken language processing 总结概要
- leetcode 398. Random Pick Index 均概率挑选index
- easyui动态编辑,并改变单元格值
- 贴一个使用串口的方法