Power Management / CPU Scaling in Proxmox 1.7 (2.6.32-4-pve)

dlasher

Renowned Member
Mar 23, 2011
247
36
93
So I'm happily running 1.7 on a fairly beefy machine (4x4 core) that I'm using to replace about a dozen physical machines. It's being used to provide services in a medium sized office, which has high usage patterns between 8am and 6pm, but during the night, the machine sits very idle.

However, best that I can tell, PM1.7 doesn't appear to be running at anything other than full blown 100% CPU speed/voltage, on all cores, all the time.

I've tried to find/install "powernowd" and "cpuspeed" but any of the tems I've tried, aptitude has no matches for.

How do I enable/use CPU speed/voltage scaling? (it is correctly enabled in the bios.. I was running RHEL5 on here for a bit, before settling on PM1.7)

(here's cpuinfo on one of the CPU's, verifiying cabilitiy, but no use)
processor : 0
vendor_id : AuthenticAMD
cpu family : 16
model : 2
model name : Quad-Core AMD Opteron(tm) Processor 8356
stepping : 3
cpu MHz : 2294.213
cache size : 512 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
bogomips : 4588.42
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
 
Last edited:
I think I might have figured it out.. all the modules seem to be present, and once I installed "powernowd", and modprobed some modules, it's scaling down..

Steps I took:
- Temporarily added public apt source -- "deb http://ftp.de.debian.org/debian lenny main"
- installed "powernowd"
- disabled public apt source
- started powernowd in foreground.. complained about modules not being loaded.
- modprob'd a bunch of modules it complained about

modprobe cpufreq_powersave
modprobe cpufreq_stats
modprobe cpufreq_userspace
modprobe powernow-k8

Start powernowd up... the CPU's have scaled down..

# cat /proc/cpuinfo | grep MHz
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000
cpu MHz : 1150.000

But I can load up a VM, and I don't see the CPU's scale back up..

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3236 root 20 0 4408m 4.0g 1716 S 190 17.0 1310:27 kvm
3215 root 20 0 1288m 422m 1704 S 14 1.8 155:35.41 kvm
18103 root 20 0 1381m 1.0g 1712 S 6 4.4 57:44.09 kvm

Maybe it's the threshold.. .so I set min to 10 and max to 50 (default is 20 & 80).. and now it's scaling..

<snip>
cpu MHz : 2300.000
cpu MHz : 1400.000
cpu MHz : 1150.000
<snip>

now i have this feeling it's going to bite me somehow down the road, but for now it appears to be working as expected.
 
Hi,
with the 2.6.35-kernel you don't need to load modules - i think there are includet in the kernel.

But it seems that powernow has problems with more than 20 cores:
Code:
# powernowd
powernowd: PowerNow Daemon v1.00, (c) 2003-2008 John Clemens
powernowd: Found 32 scalable units:  -- 1 'CPU' per scalable unit
powernowd:   cpu0: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu1: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu2: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu3: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu4: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu5: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu6: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu7: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu8: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu9: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu10: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu11: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu12: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu13: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu14: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu15: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu16: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu17: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu18: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu19: 800Mhz - 2400Mhz (5 steps)
powernowd:   cpu20: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Success
powernowd:   cpu21: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu22: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu23: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu24: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu25: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu26: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu27: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu28: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu29: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu30: 800Mhz - 2400Mhz (5 steps)
Error parsing /proc/stat: Illegal seek
powernowd:   cpu31: 800Mhz - 2400Mhz (5 steps)
# 
# cat /proc/cpuinfo | grep MHz
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 800.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000
cpu MHz         : 2400.000

Udo
 
Curious if there's any plan in NextGen proxmox to give us some webUI feedback/control over power management. That would be >nifty<