0 full gc时cpu idle_【cpuidle】计算每个cpu进入idle的时间

0 full gc时cpu idle_【cpuidle】计算每个cpu进入idle的时间参考内核文档 Supportingmu sys devices system cpu cpuidleThecu

参考内核文档

Supporting multiple CPU idle levels in kernel

cpuidle sysfs

System global cpuidle related information and tunables are under

/sys/devices/system/cpu/cpuidle

The current interfaces in this directory has self-explanatory names:

* current_driver

* current_governor_ro

With cpuidle_sysfs_switch boot option (meant for developer testing)

following objects are visible instead.

* current_driver

* available_governors

* current_governor

In this case users can switch the governor at run time by writing

to current_governor.

Per logical CPU specific cpuidle information are under

/sys/devices/system/cpu/cpuX/cpuidle

for each online cpu X

——————————————————————————–

# ls -lR /sys/devices/system/cpu/cpu0/cpuidle/

/sys/devices/system/cpu/cpu0/cpuidle/:

total 0

drwxr-xr-x 2 root root 0 Feb 8 10:42 state0

drwxr-xr-x 2 root root 0 Feb 8 10:42 state1

drwxr-xr-x 2 root root 0 Feb 8 10:42 state2

drwxr-xr-x 2 root root 0 Feb 8 10:42 state3

/sys/devices/system/cpu/cpu0/cpuidle/state0:

total 0

-r–r–r– 1 root root 4096 Feb 8 10:42 desc

-rw-r–r– 1 root root 4096 Feb 8 10:42 disable

-r–r–r– 1 root root 4096 Feb 8 10:42 latency

-r–r–r– 1 root root 4096 Feb 8 10:42 name

-r–r–r– 1 root root 4096 Feb 8 10:42 power

-r–r–r– 1 root root 4096 Feb 8 10:42 residency

-r–r–r– 1 root root 4096 Feb 8 10:42 time

-r–r–r– 1 root root 4096 Feb 8 10:42 usage

/sys/devices/system/cpu/cpu0/cpuidle/state1:

total 0

-r–r–r– 1 root root 4096 Feb 8 10:42 desc

-rw-r–r– 1 root root 4096 Feb 8 10:42 disable

-r–r–r– 1 root root 4096 Feb 8 10:42 latency

-r–r–r– 1 root root 4096 Feb 8 10:42 name

-r–r–r– 1 root root 4096 Feb 8 10:42 power

-r–r–r– 1 root root 4096 Feb 8 10:42 residency

-r–r–r– 1 root root 4096 Feb 8 10:42 time

-r–r–r– 1 root root 4096 Feb 8 10:42 usage

/sys/devices/system/cpu/cpu0/cpuidle/state2:

total 0

-r–r–r– 1 root root 4096 Feb 8 10:42 desc

-rw-r–r– 1 root root 4096 Feb 8 10:42 disable

-r–r–r– 1 root root 4096 Feb 8 10:42 latency

-r–r–r– 1 root root 4096 Feb 8 10:42 name

-r–r–r– 1 root root 4096 Feb 8 10:42 power

-r–r–r– 1 root root 4096 Feb 8 10:42 residency

-r–r–r– 1 root root 4096 Feb 8 10:42 time

-r–r–r– 1 root root 4096 Feb 8 10:42 usage

/sys/devices/system/cpu/cpu0/cpuidle/state3:

total 0

-r–r–r– 1 root root 4096 Feb 8 10:42 desc

-rw-r–r– 1 root root 4096 Feb 8 10:42 disable

-r–r–r– 1 root root 4096 Feb 8 10:42 latency

-r–r–r– 1 root root 4096 Feb 8 10:42 name

-r–r–r– 1 root root 4096 Feb 8 10:42 power

-r–r–r– 1 root root 4096 Feb 8 10:42 residency

-r–r–r– 1 root root 4096 Feb 8 10:42 time

-r–r–r– 1 root root 4096 Feb 8 10:42 usage

——————————————————————————–

* desc : Small description about the idle state (string)

* disable : Option to disable this idle state (bool) -> see note below

* latency : Latency to exit out of this idle state (in microseconds)

* residency : Time after which a state becomes more effecient than any

shallower state (in microseconds)

* name : Name of the idle state (string)

* power : Power consumed while in this idle state (in milliwatts)

* time : Total time spent in this idle state (in microseconds)

* usage : Number of times this state was entered (count)

Note:

The behavior and the effect of the disable variable depends on the

implementation of a particular governor. In the ladder governor, for

example, it is not coherent, i.e. if one is disabling a light state,

then all deeper states are disabled as well, but the disable variable

does not reflect it. Likewise, if one enables a deep state but a lighter

state still is disabled, then this has no effect.

其中time显示了每个idle阶段的时间长短。

前后两次idle/state*/time的时间即是进入idle的时间。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/233943.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • MySQL timestampdiff()函数返回两个时间之间的差值「建议收藏」

    MySQL timestampdiff()函数返回两个时间之间的差值「建议收藏」TIMESTAMPDIFF(unit,begin,end);TIMESTAMPDIFF函数返回begin-end的结果,其中begin和end是DATE或DATETIME表达式。TIMESTAMPDIFF函数允许其参数具有混合类型,例如,begin是DATE值,end可以是DATETIME值。如果使用DATE值,则TIMESTAMPDIFF函数将其视为时间部分为“00:00:00”的DATETIME值。unit参数是确定(end-begin)的结果的单位,表示为整数。以下是有效单位:MI

    2022年5月6日
    217
  • 好程序员Java培训分享如何快速入门Java

    好程序员Java培训分享如何快速入门Java好程序员Java培训分享如何快速入门Java,一、掌握静态方法和属性  静态方法和属性用于描述某一类对象群体的特征,而不是单个对象的特征。Java中大量应用了静态方法和属性,这是一个通常的技巧。但是这种技巧在很多语言中不被频繁地使用。理解静态方法和属性对于理解类与对象的关系是十分有帮助的,在大量的Java规范中,静态方法和属性被频繁使用。因此学习者应该理解静态方法和属性。Java在方法和属性的调用上是一致的,区别只表现在声明的时候,这和c++是不同的。  二、重视接口  在面向对象早期的应用中大量使用

    2022年7月7日
    22
  • build.gradle报错(eclipse编译不了项目)

    笔者是通过idea编译spring5源代码,该项目基于gradle构建,编译过程中具体报错如下:2020-03-1610:38:26,134[663812]INFO-.project.GradleProjectResolver-Gradleprojectresolveerrororg.gradle.tooling.GradleConnectionException:…

    2022年4月11日
    285
  • 教你用Python自制一张好看的指数估值图!这招很好用!

    教你用Python自制一张好看的指数估值图!这招很好用!对于以定投指数的方式理财的朋友 最需要关注的指标便是各个指数的估值 在指数低估时买入 高估时卖出 那如何制作一张估值图来跟踪指数的估值情况呢 本文就从 0 到 1 介绍如何用 Matplotlib 画一张漂亮的指数估值图 准备数据首先 准备我们需要的数据 一般来说 经历了一轮牛熊周期的历史估值更具比较意义 所以 这里以上证指数 2013 年到目前为止的行情数据为例进行演示 同时 采用滚动市盈率为估值指标 数据来源为 tushare importpandas

    2025年6月1日
    2
  • 编程怎么入门_损失函数的基本概念和原理

    编程怎么入门_损失函数的基本概念和原理介绍了Socket编程的基本概念,并以UDP编程为例,给出示例。

    2022年10月18日
    2
  • app抓包工具_【旧版IPA抓包教程2】超便捷苹果旧版本APP抓包/轻松抓取你想要的版本,旧版app任意下载…

    app抓包工具_【旧版IPA抓包教程2】超便捷苹果旧版本APP抓包/轻松抓取你想要的版本,旧版app任意下载…之前呢就已经给大家发过一期抓包旧版ipa的教程,果然方法多种多样,今天又给大家带来一个更加简便快捷的的抓包软件,过程很简单,是个正常人都能学会,赶紧学起来吧~首先还是电脑一台,包含AppStore的iTunes的一个,旧版抓包程序一个,这次所需的工具就是多出来一个⛏镐子一样的玩意,这个程序是免费的,网上应该也能找到。也可以在文章末尾找到关键词回复下载。首先打开iTunes并登…

    2022年5月7日
    709

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号