Kanru’s 探險日誌

這裡應該會放一些我每日遊覽的站台及一些心得,就當作是我的學習筆記吧^^。

Intel 新玩具 — PowerTop!

with 2 comments

常常覺得筆電的電池肚量不夠嗎?每次都撐不了幾個小時就沒電了? Intel 釋出這個名為 powertop 的新玩具,可以測量出是哪些程序常常把 CPU 從深層睡眠中喚醒,只要有辦法去掉這些惱人的 timer,搭配 linux 2.6.21 中的新特性 dynamic tick,可以讓電腦在不工作的時候可以好好休息,延長工作時間。

在 debian/sid 中只需要

apt-get install powertop

就可以安裝最新版的 powertop,但是要真正實用的分析功能,還需要把 kernel 中的 debug 功能打開

Kernel hacking  --->
    [*] Kernel debugging
        [*] Collect kernel timers statistics

輸出結果如下

Cn          Avg residency (5s)  Long term residency avg
C0 (cpu running)        (17.6%)
C1                0.0ms ( 0.0%)                   0.0ms
C2                3.3ms (82.4%)                   3.1ms
C3                0.0ms ( 0.0%)                   0.0ms

Wakeups-from-idle per second :  252.8 
Power usage (ACPI estimate) :  22.9 W (2.3 hours left)

Top causes for wakeups:
  27.5% (165.2)       <interrupt> : uhci_hcd:usb5, HDA Intel, i915@pci:0000:00:02.0 
  22.2% (133.6)       firefox-bin : schedule_timeout (process_timeout) 
  18.5% (111.0)       liferea-bin : schedule_timeout (process_timeout) 
   8.4% (50.2)              java : schedule_timeout (process_timeout) 
   4.1% (24.8)              Xorg : do_setitimer (it_real_fn) 
   2.6% (15.4)             xchat : schedule_timeout (process_timeout) 
   2.5% (15.0)       laptop_mode : queue_delayed_work_on (delayed_work_timer_ 
   2.1% (12.8)       <interrupt> : libata 
   2.1% (12.8)    gnome-terminal : schedule_timeout (process_timeout) 
   2.1% (12.4)       <interrupt> : yenta, ipw2200

清單上的常客 i915@pci, firefox, liferea 等可以在 powertop 網站上的 Tips and Tricks 找到紀錄,也有紀錄一些解決的方法或是 patch… 不過目前我的 i915@pci 無解 囧rz

期待這個計劃可以將 linux 在筆電上的工作效率提高 :)

ps. 網站上有個很誘人的 Success stories

With PowerTOP, I managed to increase the battery life of my Panasonic R4 laptop from 4 to almost 7 hours — Keith Packard, Principal Engineer at Intel

※ 歷史上的今天

Written by Kanru Chen

May 18th, 2007 at 3:09 pm

Posted in Linux, 爬網探險

Tagged with

2 Responses to 'Intel 新玩具 — PowerTop!'

Subscribe to comments with RSS or TrackBack to 'Intel 新玩具 — PowerTop!'.

  1. 有沒有win32版本的Orz

    lain

    21 May 07 at 6:52 pm

  2. for windows?數誰是timer使用大戶/發不必要的中斷?,windows 很多東西都是寫死的,就算數出來而且是不太必要的timer,想修改也是只能當惡搞!發不必要的中斷在windows裡(還要確定是不必要的),driver open source有幾個?修改?!換成open source的東西再說吧!如果真的想硬幹,hook幾個用timer的地方應該是可以(還是在惡搞),不過我想多辦是multimedia/ui在消耗, 反是這只是trade-off (癡笑)

    癡漢

    23 May 07 at 2:36 am

Leave a Reply