`
kanpiaoxue
  • 浏览: 1781084 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

(理解Linux机器负载)Understanding the Load Average on Linux and Other Unix-like Systems

 
阅读更多

 

《Understanding the Load Average on Linux and Other Unix-like Systems》
参考地址:

https://www.howtogeek.com/194642/understanding-the-load-average-on-linux-and-other-unix-like-systems/

 

 

 

 

Linux, Mac, and other Unix-like systems display “load average” numbers. These numbers tell you how busy your system’s CPU, disk, and other resources are. They’re not self-explanatory at first, but it’s easy to become familiar with them.

Whether you’re using a Linux desktop or server, a Linux-based router firmware, a NAS system based on Linux or BSD, or even Mac OS X, you’ve probably seen a “load average” measurement somewhere.

 

On Unix-like systems, including Linux, the system load is a measurement of the computational work the system is performing. This measurement is displayed as a number. A completely idle computer has a load average of 0. Each running process either using or waiting for CPU resources adds 1 to the load average. So, if your system has a load of 5, five processes are either using or waiting for the CPU.

Unix systems traditionally just counted processes waiting for the CPU, but Linux also counts processes waiting for other resources — for example, processes waiting to read from or write to the disk.

On its own, the load number doesn’t mean too much. A computer might have a load of 0 one split-second, and a load of 5 the next split-second as several processes use the CPU. Even if you could see the load at any given time, that number would be basically meaningless.

That’s why Unix-like systems don’t display the current load. They display the load average — an average of the computer’s load over several periods of time. This allows you to see how much work your computer has been performing.

 

Finding the Load Average

RELATED: How to Manage Processes from the Linux Terminal: 10 Commands You Need to Know

The load average is shown in many different graphical and terminal utilities, including in the top command and in the graphical GNOME System Monitor tool. However, the easiest, most standardized way to see your load average is to run the uptime commandin a terminal. This command shows your computer’s load average as well as how long it’s been powered on.

The uptime command works on Linux, Mac OS X, and other Unix-like systems. If you’re using a Linux or BSD-based device with a web interface — such as the DD-WRT router firmware or FreeNAS NAS system — you’ll probably see the load average somewhere in its status page.

 

Understanding the Load Average Output

The first time you see a load average, the numbers look fairly meaningless. Here’s an example load average readout:

load average: 1.05, 0.70, 5.09

From left to right, these numbers show you the average load over the last one minute, the last five minutes, and the last fifteen minutes. In other words, the above output means:

load average over the last 1 minute: 1.05

load average over the last 5 minutes: 0.70

load average over the last 15 minutes: 5.09

The time periods are omitted to save space. Once you’re familiar with the time periods, you can quickly glance at the load average numbers and understand what they mean.

 

What Do the Numbers Mean, Exactly?

Let’s use the above numbers to understand what the load average actually means. Assuming you’re using a single-CPU system, the numbers tell us that:

over the last 1 minute: The computer was overloaded by 5% on average. On average, .05 processes were waiting for the CPU. (1.05)

over the last 5 minutes: The CPU idled for 30% of the time. (0.70)

over the last 15 minutes: The computer was overloaded by 409% on average. On average, 4.09 processes were waiting for the CPU. (5.09)

You probably have a system with multiple CPUs or a multi-core CPU. The load average numbers work a bit differently on such a system. For example, if you have a load average of 2 on a single-CPU system, this means your system was overloaded by 100 percent — the entire period of time, one process was using the CPU while one other process was waiting. On a system with two CPUs, this would be complete usage — two different processes were using two different CPUs the entire time. On a system with four CPUs, this would be half usage — two processes were using two CPUs, while two CPUs were sitting idle.

To understand the load average number, you need to know how many CPUs your system has. A load average of 6.03 would indicate a system with a single CPU was massively overloaded, but it would be fine on a computer with 8 CPUs.

 

The load average is especially useful on servers and embedded systems. You can glance at it to understand how your system is performing. If it’s overloaded, you may need to deal with a process that’s wasting resources, provide more hardware resources, or move some of the workload to another system.

分享到:
评论

相关推荐

    详解Linux中Load_average负载

    ### 详解Linux中Load_average负载 在Linux系统中,了解`Load average`(负载平均)的概念对于系统管理和性能监控至关重要。本文将详细解释Linux系统中的负载平均值,并探讨其背后的意义以及如何根据这些值来判断...

    UNIX Load Average Part 3 and addendum

    在UNIX操作系统中,"Load Average"是一个至关重要的性能指标,它反映了系统在特定时间间隔内的平均负载情况。本文将深入探讨UNIX Load Average的概念,它的计算方法,以及如何利用这一信息来优化系统性能。 首先,...

    UNIX Load Average Part 1

    在深入探讨UNIX系统中的负载平均值(Load Average)之前,我们需要了解一些基础知识。首先,负载平均值并不是一个UNIX命令,它更像一个嵌入式的度量指标,通常显示在像uptime和procinfo这样的其他UNIX命令的输出中。...

    loadrunner11-load-generator-linux负载机

    《Linux负载机与LoadRunner11中的Load Generator详解》 在软件测试领域,尤其是性能测试中,LoadRunner是一款被广泛使用的工具,它能够模拟大量用户并发执行操作,以测试系统在高负载下的性能表现。本篇文章将重点...

    rabbitmq-server-generic-unix-3.6.1.tar

    标题中的“rabbitmq-server-generic-unix-3.6.1.tar”是指RabbitMQ服务器的3.6.1版本的通用Unix安装包。RabbitMQ是一个开源的消息代理和队列服务器,广泛应用于分布式系统中,用于处理异步任务、消息传递和负载均衡...

    Spotlight on Unix 监控Linux服务器

    本文将深入探讨"Spotlight on Unix"这一专业工具在Linux服务器监控中的应用。 "Spotlight on Unix"是一款强大的系统性能分析和故障诊断工具,专为Unix和Linux环境设计。它提供了一整套全面的监控解决方案,能够实时...

    UNIX Load Average Part 2

    UNIX系统中的负载平均值(Load Average),经常被系统管理员用来衡量系统性能和规划系统容量。负载平均值是指在特定时间周期内,系统处于“可运行状态”的平均进程数以及正在等待资源的进程数总和。它是系统负载的一...

    unix/linux loadagv的原理详解

    在Unix和Linux操作系统中,Load Average是一个非常关键的性能指标,它用来衡量系统在特定时间段内的平均负载。本文将深入探讨Load Average的工作原理,并解析其计算方式,帮助你更好地理解和利用这一信息。 **1. ...

    Understanding the Linux Kernel (3rd Edition)

    《Understanding the Linux Kernel (3rd Edition)》是一本深入探讨Linux内核工作原理的经典教材,由Daniel P. Bovet和Marco Cesati共同撰写。本书详细分析了Linux内核中最关键的数据结构、算法和编程技巧。作者们...

    Linux top命令 load average 参数的衡量标准

    在输入查看可用的CPU核数命令,获得12时,意味着本系统可用CPU核数12核 nproc 输入top指令,查看 load average 参数,我的习惯用法是如下所示,代表所显示的top界面...平均负载(load average)-是在给定的1、5和1

    LR-windows-linux-UNIX-IBM-AIX.rar_aix

    在"LR监控windows、linux、UNIX、IBM AIX系统方法"这个主题中,我们将深入探讨如何使用LR对这四种主流操作系统进行性能监控。 首先,让我们了解LR的基本工作原理。LR通过录制用户操作生成脚本,然后在测试阶段回放...

    loadrunner-11-load-generator

    《Linux环境下LoadRunner 11负载机的深度解析与应用》 LoadRunner是一款业界公认的强大的性能测试工具,尤其在企业级应用系统中,它扮演着举足轻重的角色。本篇将聚焦于“loadrunner-11-load-generator”,即...

    Understanding the Linux Kernel (3rd)

    《深入理解Linux内核》(3rd Edition)是一本经典的IT技术书籍,专注于解析Linux操作系统的核心机制和技术。这本书深入浅出地介绍了Linux内核的工作原理,对于任何希望深入理解操作系统或者从事Linux系统开发的读者...

    UNIX and Linux System Administration Handbook

    《UNIX and Linux System Administration Handbook》是一本关于UNIX和Linux系统管理的权威手册,由Evi Nemeth, Garth Snyder, Trent R. Hein以及Ben Whaley合著,并由Terry Morreale, Ned McClain, Ron Jachim, ...

    Linux Block IO Introducing Multi-queue SSD Access on Multi-core Systems

    ### Linux Block IO:引入多队列SSD访问在多核系统中的应用 #### 摘要 随着存储设备性能从几年前的每秒几百次输入/输出操作(I/O)迅速提升到现在的每秒数十万次I/O,并且预计未来五年内将达到每秒数百万次I/O,...

    Unix&Linux;资料

    在IT领域,Unix和Linux是两个...它们的广泛使用和深厚的技术积累,使得学习和理解Unix&Linux资料对于任何IT专业人士来说都是非常有价值的。无论是从基础操作到高级技术,这份资料都将为你的技术之路提供宝贵的资源。

Global site tag (gtag.js) - Google Analytics