Friday, March 09, 2007

Eksperimen CPU Hotplug dan Konsumsi Power

Kondisi awal: paksakan governor userspace untuk cpufreq; set frekuensi CPU 1.666 GHz. Hal ini dipilih agar tidak terjadi perubahan frekuensi CPU secara otomatis, yang mungkin terjadi ketika kita memilih governor bertipe conservative, powersave, maupun ondemand. Ukur pemakaian arus.

root@hokage:~# cpufreq-set -d 1.666g
root@hokage:~# cpufreq-set -u 1.666g
root@hokage:~# cpufreq-set -g userspace
root@hokage:~# cpufreq-info
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 0 1
hardware limits: 1000 MHz - 1.67 GHz
available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: userspace, powersave, ondemand, conservative, performance
current policy: frequency should be within 1.67 GHz and 1.67 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 1.67 GHz (asserted by call to hardware).
analyzing CPU 1:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 0 1
hardware limits: 1000 MHz - 1.67 GHz
available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: userspace, powersave, ondemand, conservative, performance
current policy: frequency should be within 1.67 GHz and 1.67 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 1.67 GHz (asserted by call to hardware).

root@hokage:~# grep rate /proc/acpi/battery/BAT1/state
present rate: 1693 mA

Tahap kedua, kita coba matikan CPU #1. CPU #0 tidak bisa dimatikan :D
root@hokage:~# echo 0 > /sys/devices/system/cpu/cpu1/online
root@hokage:~# cpufreq-info
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 0
hardware limits: 1000 MHz - 1.67 GHz
available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: userspace, powersave, ondemand, conservative, performance
current policy: frequency should be within 1.67 GHz and 1.67 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 1.67 GHz (asserted by call to hardware).
root@hokage:~# grep processor /proc/cpuinfo
processor : 0

CPU #1 offline! Tapi, coba kita lihat pemakaian arus:
root@hokage:~# grep rate /proc/acpi/battery/BAT1/state
present rate: 2084 mA

2084 > 1693 tentu saja! Kenapa? CPU #1 dimatikan, tapi arus malah naik?
Kita coba hidupkan lagi CPU #1
root@hokage:~# echo 1 > /sys/devices/system/cpu/cpu1/online
root@hokage:~# grep processor /proc/cpuinfo
processor : 0
processor : 1
root@hokage:~# grep rate /proc/acpi/battery/BAT1/state
present rate: 1653 mA

... dan arus kembali ke level semula. Percobaan pengiritan daya yang gagal *sigh*.Apakah anda juga mengalami hal yang sama? FYI prosesor saya adalah Core 2 Duo T5500 1.66GHz:
root@hokage:~# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
stepping : 6
cpu MHz : 1667.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi
mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 3336.47
clflush size : 64

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
stepping : 6
cpu MHz : 1667.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi
mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 3333.58
clflush size : 64
root@hokage:~# head -1 /var/log/dmesg
Linux version 2.6.20-acer-2 (andika@hokage) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #3 SMP PREEMPT Fri Mar 9 13:15:14 WIT 2007

5 comments:

Gian 'GiantiXBrain' Giovani said...

mas menurut saya tulisan anda bagus. tapi sayang template blogger anda ito lho. ancoor banget

maaf !!
giantixbrain.blogspot.com

andika said...

mau bikinin template yang lebih bagus? :D

Anonymous said...

ama website ku masih ancur

test test http://bimoseptyop.blogspot.com

Rosie said...

These comments have been invaluable to me as is this whole site. I thank you for your comment.

rezzie said...

Mungkin karena frekuensi dikunci dan
satu CPU dimatikan sehingga saat
ada tugas untuk dikerjakan CPU
menyelesaikannya lebih lama dari
sebelumnya--otomatis konsumsi daya
naik.