在Cubieboard上关闭irqbalance服务避免内存泄漏

十一一个假期回来,顺手看了看本身的cubieboard运行状态怎么样php

aria2正常;html

btsync正常;linux

samba正常;ubuntu

很好,服务器

顺手htop一下,已经开机了13天了,CPU使用率4%,内存使用率80%,也正常负载均衡

 

等等,内存使用率80%?个人2G内存被狗吃了吗??dom

喵喵喵喵,irqbalance 占用了76%的内存。这是个鸟进程。放狗搜索了下才知道:ide

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

转自:http://www.aikaiyuan.com/7109.html优化

 

而后外国论坛上也有报告和我同样的内存泄漏问题(发生在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

齐活~

 PS:关于irqbalance对性能影响的解释:http://successfultree.blogspot.de/2012/06/case-study-irqbalance-is-not-useful-for.html

相关文章
相关标签/搜索