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

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

aria2正常;

btsync正常;

samba正常;

很好,

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

 

等等,内存使用率80%?我的2G内存被狗吃了吗??

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

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

posted on 2015-10-07 13:09  BitSky  阅读(1688)  评论(0编辑  收藏  举报

导航