introduce powertop to end users

42
End User End User 的觀點 的觀點 利用 利用 Powertop Powertop 節省筆電耗能 節省筆電耗能 Yuan CHAO ( 趙元 ) (National Taiwan University, Taipei, Taiwan) COSCUP 2010/08/14-15

Upload: yuan-chao

Post on 13-May-2015

1.664 views

Category:

Documents


1 download

DESCRIPTION

Introducing fully locallized powertop to Chinese users. Save energy; save the Earth. Presented in COSCUP 2010.

TRANSCRIPT

Page 1: Introduce powertop to end users

由由 End UserEnd User 的觀點的觀點利用利用 PowertopPowertop 節省筆電耗能節省筆電耗能

Yuan CHAO (趙元 )(National Taiwan University, Taipei, Taiwan)

COSCUP2010/08/14-15

Page 2: Introduce powertop to end users

我是誰?Yuan CHAO

YChaoyuanchao .at. gmail

.. .

Page 3: Introduce powertop to end users

研究員高能物理

偶而不務正業閒暇時玩玩 OSS...

Page 4: Introduce powertop to end users

LHCLHC

HTMLHTML 的出生地的出生地 !!!!!!

Page 5: Introduce powertop to end users

LHCLHC

Page 6: Introduce powertop to end users

這些都 ...

不重要

Page 7: Introduce powertop to end users

Powertop

本地化Since 2007

Page 8: Introduce powertop to end users

Powertop

有力的頂點?

Page 9: Introduce powertop to end users

Powertop

有力的頂點?測量筆電耗能的工具

http://www.lesswatts.org/

Page 10: Introduce powertop to end users
Page 11: Introduce powertop to end users
Page 12: Introduce powertop to end users
Page 13: Introduce powertop to end users

背景知識

Page 14: Introduce powertop to end users

進階組態與電源介面Advanced Configuration

and Power Interface(ACPI)

Page 15: Introduce powertop to end users
Page 16: Introduce powertop to end users

處理器動態時脈調整Intel SpeedStep®AMD PowerNow!™IBM EnergyScale

Transmeta LongRun(2)VIA LongHaul

...

Page 17: Introduce powertop to end users

P ≃ C V 2f

電容 C 為定值

Page 18: Introduce powertop to end users

P ≃ C V 2f

電容 C 為定值核心電壓 V

Page 19: Introduce powertop to end users

P ≃ C V 2f

電容 C 為定值核心電壓 V運作時脈 f

Page 20: Introduce powertop to end users

P ≃ C V 2f

高時脈→高耗電

Page 21: Introduce powertop to end users
Page 22: Introduce powertop to end users

處理器電源狀態C0-Cn

忙碌工作 ... 深層睡眠

Page 23: Introduce powertop to end users

處理器電源狀態C0-Cn

忙碌工作 ... 深層睡眠睡愈熟愈難叫醒

Page 24: Introduce powertop to end users

處理器電源狀態C0-Cn

忙碌工作 ... 深層睡眠通常非 OS 控制

Page 25: Introduce powertop to end users

Linux 下的對策避免讓 CPU 脫離閒置

高精度計時排程(Hi-Res Timer)動態核心中斷(Tickless Idle)

Since 2006

Page 26: Introduce powertop to end users

傳統 Linux 核心排程無工作時 CPU 進入閒置

定時喚醒處理排程"Tick"

100-1000Hz( 編譯時決定 )

Page 27: Introduce powertop to end users

新的 Linux 核心排程Merged in since 2.6.19

階層式時鐘排程取消定時喚醒排程

可犧牲準時排程統合中斷http://www.tglx.de/projects/hrtimers/

Page 28: Introduce powertop to end users

Round Jiffies

http://www.lesswatts.org/projects/tickless/round_jiffies.php

Page 29: Introduce powertop to end users
Page 30: Introduce powertop to end users

Powertop 協助檢查找出讓 CPU 脫離閒置的程序

關掉無用耗電的 daemon改用綠色的替代程式

提供各種系統參數的建議

Page 31: Introduce powertop to end users
Page 32: Introduce powertop to end users

建議 : 使用下列指令對所有 CPU 啟用 Ondemand 時脈管理模式 : 建議 : 使用下列指令啟動 laptop-mode 功能 :建議 : 使用下列指令取消 NMI watchdog 監控 :建議 : 於 BIOS 中啟用 HPET ( 多媒體計時器 ) 建議 : 使用下列指令啟用 AC97 省電功能 :建議 : 以下列指令啟用 noatime 使檔案系統停止紀錄檔案存取時間 建議 : 以下列指令啟用省電型 CPU 排程器 :建議 : 使用下列指令延長 VM dirty writeback 資料回寫時間自 %1.2f 改為 15 秒鐘 :建議 : 不使用藍牙功能時,以下列指令關閉藍牙信號 :建議 : 啟用 CONFIG_USB_SUSPEND 核心選項 .建議 : 啟用 CONFIG_CPU_FREQ_GOV_ONDEMAND 核心選項建議 : 啟用 CONFIG_NO_HZ 核心選項建議 : 啟用 CONFIG_ACPI_BATTERY 核心選項建議 : 啟用 CONFIG_HPET_TIMER 核心選項建議 : 啟用 CONFIG_SND_AC97_POWER_SAVE 核心選項建議 : 取消 CONFIG_IRQBALANCE 核心選項建議 : 啟用 CONFIG_CPU_FREQ_STAT 核心選項建議 : 啟用 CONFIG_INOTIFY 核心選項 .建議 : 停用或移除 'beagle' 套件建議 : 停用或移除 'gnome 電源管理程式 '. 建議 : 停用或移除 'pcscd' 套件建議 : 使用下列指令取消 'hal' 檢查光碟狀態 : 建議 : 使用下列指令啟動 SATA ALPM 電源管理功能 : echo min_power > /sys/class/scsi_host/host0/link_power_management_policy建議 : 使用下列指令關閉 TV 輸出顯示功能 :建議 : 使用下列指令啟動無線網路省電功能 :建議 : 使用下列指令啟動無線網路省電功能 :建議 : 當不使用 WIFI 時,以下列指令關閉 WIFI 信號 :建議 : 按下 U 鍵啟用 USB 自動休眠功能,或是於 grub 加入以下核心參數

Page 33: Introduce powertop to end users

實際效果因人而異

螢幕背光 2-3 Watts

USB ~3 Watts

硬碟運轉 ~0.5-1.5 Watts

BT/Wifi ~1 Watts

GigaBit 有線網路 ~0.5 Watts

...

http://www.lesswatts.org/images/mobile_feature.gif

Page 34: Introduce powertop to end users

Powertop 的建議可以每次開機後手動

可以寫入 /etc/rc.local希望 linux 發佈商預設好

Page 35: Introduce powertop to end users

愛護地球

Page 36: Introduce powertop to end users

節能減碳

Page 37: Introduce powertop to end users

希望大家的 CPU一睡不起睡得更熟

Page 38: Introduce powertop to end users

翻譯有問題請告訴我

Page 39: Introduce powertop to end users

Thank YOU!

Page 40: Introduce powertop to end users

Timer?時鐘 ? 計時器?

Page 41: Introduce powertop to end users

Timer Wheel

http://www.ibm.com/developerworks/aix/library/au-lowertime/index.html

Page 42: Introduce powertop to end users

hrTimer Cascading

http://www.tglx.de/projects/hrtimers/