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)
上一篇 2025年6月9日 下午2:01
下一篇 2025年6月9日 下午2:22


相关推荐

  • Java安全之log4j反序列化漏洞分析

    Java安全之log4j反序列化漏洞分析0x00前言前段时间在看某个cms代码的时候,发现log4j组件版本存在漏洞,并且开启了端口,但web站点是nginx反向代理的,而在外网并没有开放到该端

    2021年12月12日
    57
  • 嵌入式面试题(一)

    嵌入式面试题(一)1 关键字 volatile 有什么含义 并给出三个不同的例子防止编译器优化 如果你不知道这个关键字 那么你可能不是一个合格的嵌入式软件工程师 一个定义为 volatile 的变量是说这变量可能会被意想不到地改变 这样 编译器就不会去假设这个变量的值了 精确地说就是 优化器在用到这个变量时必须每次都小心地重新读取这个变量的值 而不是使用保存在寄存器里的备份 下面是 volatile 变量的几个例子 1

    2026年3月17日
    2
  • Java数字与字符串的转换

    Java数字与字符串的转换1 数字转字符串方法 1 使用 String 类的静态方法 valueOf 方法 2 先把基本类型装箱为对象 然后调用对象的 toString2 字符串转数字调用 Integer 的静态方法 parseInt

    2025年9月22日
    6
  • 曼昆 《经济学原理》(第5版)_曼昆经济学原理第几版好

    曼昆 《经济学原理》(第5版)_曼昆经济学原理第几版好第一章经济学十大原理在本章中你将——知道经济学研究稀缺性资源配置考察人们面临的一些交替关系知道机会成本的含义懂得在作出决策时如何运用边际推理讨论激励如何影响人们的行为考虑为什么人们或国家之间的交易可以使各方面受益-9经济学原理第五版 讨论为什么市场是一种良好的、但并不是完善的资源配置方式了解是什么因

    2026年1月22日
    4
  • WiFi频段_wifi工作频段

    WiFi频段_wifi工作频段我们知道wifi2.4G和5G是一个电磁波承载的信息。那莫他们各自所能用到的最大资源是多少呢?2.4G->2.4GHz~2.485GHz共83.5MHz的资源,我们频道的划分是以五Mhz为一个channel资源。5G->一般从5170~52505250~53305490~57305735~5835其中5170~5250是36~485250~5330是52~645490~5730是100~1445735~58…

    2022年10月20日
    3
  • 广东中山电信DNS地址 (铁通/网通)

    广东中山电信DNS地址 (铁通/网通)202.96.128.166202.96.128.86202.96.134.133 总忘,先记在这儿吧==============================广东各宽带运营商DNS列表==============================广东电信新DNS域名办事器共分3个地区:  1.中国电信广州地区用户(增城、番禺、从化等区的电信用户也包括在内)

    2022年7月11日
    94

发表回复

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

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