zoukankan      html  css  js  c++  java
  • 关于CPU的User、Nice、System、Wait、Idle各个参数的解释

    使用Ganglia监控整个Hadoop集群,看到Ganglia采集的各种指标:CPU各个具体的指标含义解释如下:

    ①CPU(监测到的master主机上的CPU使用情况)

    从图中看出,一共有五个关于CPU的指标。分别如下:

    ⓐ User

    User表示:CPU一共花了多少比例的时间运行在用户态空间或者说是用户进程(running user space processes)。典型的用户态空间程序有:Shells、数据库、web服务器……

    ⓑ Nice

    Nice表示:可理解为,用户空间进程的CPU的调度优先级,范围为[-20,19]

    You can set the nice value when launching a process with the nice command and then change it with the renice command.
    Only the superuser (root) can specify a priority increase of a process.

    具体参考:Cpu中的Nice是什么?

    ⓒSystem

    System的含义与User相似。System表示:CPU花了多少比例的时间在内核空间运行。分配内存、IO操作、创建子进程……都是内核操作。这也表明,当IO操作频繁时,System参数会很高。

    When a user space process needs something from the system, for example when it needs to allocate memory, perform some I/O, 
    or it needs to create a child process, then the kernel is running

    ⓓWait

    在计算机中,读写磁盘的操作远比CPU运行的速度要慢,CPU负载处理数据,而数据一般在磁盘上需要读到内存中才能处理。当CPU发起读写操作后,需要等着磁盘驱动器将数据读入内存(可参考:JAVA IO 以及 NIO 理解),从而导致CPU 在等待的这一段时间内无事可做。CPU处于这种等待状态的时间由Wait参数来衡量。

    cpu is idle while waiting for an I/O operation to complete。The time the CPU spends in this state is shown by the wait statistic.

    Idle

    Idel表示:CPU处于空闲状态时间比例。一般而言,idel + user + nice 约等于100%

    此外,Linux中的top命令可实时显示系统的CPU使用情况。下图可看出Ganglia的gmond占的cpu还是很多的。

    参考文献:理解Linux cpu 状态

  • 相关阅读:
    php动态编辑zlib扩展
    部署平台分布式锁设计
    quartz源码分析——执行引擎和线程模型
    RabbitMq核心概念和术语
    Netty SSL安全配置
    跨站脚本攻击介绍
    ssl Diffie-Hellman弱密码问题
    java server wrapper 和 maven assembly 插件
    跨站请求伪造防御
    字符编码笔记:ASCII,Unicode和UTF-8
  • 原文地址:https://www.cnblogs.com/hapjin/p/6296296.html
Copyright © 2011-2022 走看看