十一一個假期回來,順手看了看本身的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