了解平均负载与CPU使用率 [英] Understanding load average vs. cpu usage

查看:234
本文介绍了了解平均负载与CPU使用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我本人是Windows用户,所以我对Linux-y类型的东西的了解有点有限.

Okay, I'm very much a Windows user myself, so my knowledge of Linux-y type things is a bit limited.

但是,我的一般理解是,平均负载"表示在任何给定时间(平均在最后一分钟,五分钟和...十五分钟内)正在运行多少个处理量?

However it was my general understanding that "Load Average" is an indication of how many processed are being run at any given time, on average over the last minute, five minutes and... fifteen minutes?

无论如何,我一直在监视服务器,因为我们的营业额很大,而且人很多!

Anyway, I've been monitoring my server because we had a big opening and lots of people!

我一直在看top,发现有些东西与我以为我知道的相反.

I've been watching top and noticed something that seemed contrary to what I thought I knew.

如果平均负载为7,并带有4个超线程处理器,这是否不意味着CPU的工作能力约为7/8?

If the load average is at 7, with 4 hyper-threaded processors, shouldn't that means that the CPU is working to about 7/8 capacity?

为什么然后显示50.0%id?一半时间怎么闲着呢?

Why, then was it showing 50.0%id? How can it be idle half the time?

我没有得到XD

推荐答案

top显示正在运行的进程的CPU利用率,而load average显示(自1993年以来)正在运行的进程数和处于不间断状态的进程数.等待工作的进程不会消耗CPU.结果,top CPU利用率小于7/8 * 100%.

top shows CPU utilization for running processes while load average shows (since 1993) number of running processes plus number of processes in the uninterruptible state. Processes waiting for work do not consume CPU. As a result top CPU utilization is less that 7/8 * 100%.

来源: http://www.brendangregg .com/blog/2017-08-08/linux-load-averages.html

这篇关于了解平均负载与CPU使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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