zoukankan      html  css  js  c++  java
  • 记一次 irqbalance: WARNING, didn't collect load info for all cpus, balancing is broken问题

    前提   cenots6系列,日志出现了didn't collect load info for all cpus, balancing is broken问题,然后发现irqbalance在Linux上一般作为service,在多核处理器系统上分配硬件中断,以提升性能。

    基本原理
    1. 清除上一次的统计数据。
    2. 通过/proc/interrupts分析中断的情况。
    3. 通过/proc/stat分析中断的负载情况。
    4. 根据上面的统计数据计算中断均衡。
    5. 设置中断亲和力达到均衡。
    6. 睡眠一定时间返回1。

    irqbalance 理论上:
    启用 irqbalance 服务,既可以提升性能,又可以降低能耗。
    irqbalance 用于优化中断分配,它会自动收集系统数据以分析使用模式,并依据系统负载状况将工作状态置于 Performance mode 或 Power-save mode。
    处于 Performance mode 时,irqbalance 会将中断尽可能均匀地分发给各个 CPU core,以充分利用 CPU 多核,提升性能。
    处于 Power-save mode 时,irqbalance 会将中断集中分配给第一个 CPU,以保证其它空闲 CPU 的睡眠时间,降低能耗。
    但实际中往往影响cpu的使用均衡,建议服务器环境中关闭。

    然后外国论坛上也有报告和我一样的内存泄漏问题(发生在bananaPi上,另一个基于全志CPU的类树莓派ARM平台):

    http://www.lemaker.org/thread-5512-1-1.html

    最终讨论结果是:

    Thanks for the follow-up. So the solution for individual users of Lubuntu is

    sudo apt-get purge irqbalance

    and we've to hope that LeMaker doesn't include this package in their next OS releases. BTW: Even on the other side of the IT spectrum (not small ARM SBCs but big iron) today the key to performance is dedicated IRQ handling instead of random IRQ balancing (and then you further increase performance with eg. Receive Packet Steering and ensuring that only CPU cores that do not process ethN IRQs do the real packet handling)

    大意就是这个服务已经过时了,不适合当前的多核CPU(从低端的ARM 到高端的IRON大机),所谓的负载均衡并不能带来什么好处。普通用户应该直接删掉这个服务,发行版打包者最好也丢弃这个东西吧!

    原来是linux的遗留问题,那么就直接停止服务:

    service irqbalance stop

    然后htop一下,

    内存使用率果然降下来了~大善。

    最后按老外的建议完全删掉iqrbalance

    sudo apt-get purge irqbalance

    齐活~

  • 相关阅读:
    集合
    字典
    列表
    事件兼容性封装
    E5中遍历数组的方法
    canvas绘制三等分饼型图
    canvas制作刮刮乐案例
    canvas绘制饼型图
    javascript中手风琴特效
    javascript中client()兼容性封装
  • 原文地址:https://www.cnblogs.com/zhaobin-diray/p/10494273.html
Copyright © 2011-2022 走看看