单板启动后,会经常看到提示“perf  interrupt took too long (n > x)”,这样的打印信息。

相关配置参数有:

/proc/sys/kernel/下

  perf_cpu_time_max_percent:    perf分析工具最大能够占用CPU性能的百分比0:不限制1~100:百分比值
  perf_event_max_sample_rate:    设置perf_event的最大取样速率,默认值为100000

perf采样使用会占用cpu,所以默认限制最大是perf_cpu_time_max_percent=25

超过就会触发上面这个告警,并调整采样速率,保持不要超过限制,也就是说如果你设置了perf_event_max_sample_rate。

那么出现上面这个告警后,perf_event_max_sample_rate的值会被调整。

可以通过调高perf_cpu_time_max_percent来解决。

如果调高也不能解决,就设置为0,此时就不会在去监控cpu的占用率了。

echo 0 > /proc/sys/kernel/perf_cpu_time_max_percent
echo 10000 >  /proc/sys/kernel/perf_event_max_sample_rate

 

相关文章:

  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-25
  • 2021-08-27
  • 2021-07-12
猜你喜欢
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
  • 2022-02-01
  • 2021-07-28
  • 2021-08-18
  • 2022-12-23
相关资源
相似解决方案