AMD Phenom II C3 frequency scaling under Linux
This is my first post on Phoronix. A quick introduction: I'm running a home Linux server 24/7 with openSUSE. Recently I upgraded to a 965 BE (C3 stepping) processor and I'm trying to get the most out of it. Performance wise, but also with the lease amount of power consumption as possible.
I want to start this thread to discuss cpu frequency scaling issues (in combination with under/overvolting and underclocking/overvolting with the AMD Phenom II C3 stepping (because of the C1E hardware implementation and indepedent frequency scaling of the cores).
My aim: lowest idle power consumption as possible, highest overclock when needed (without reboot).
To give it a headstart, some of my findings:
1) I see that the bogomips are not recalculated when doing a cat /proc/cpuinfo when a core is in a different powerstate - with my AMD 4850e it was... Does anybody know why?
2) With k10ctl you can change the frequency and voltage of each core independently. It also support changing the NB voltage and divider. But according to an AMD whitepaper it cannot be changed after booting, behaviour after changing it anyway is unspecified. By the way I wrote a wrapper script for k10ctl.
3) Tip: in a server you can clock the GPU speed and HT speed down to save some considerable amount of watts. All my BIOS setting (I've got an Asus M3A78 Pro) can be found here. It doesn't seem to affect harddisk throughput.
4) Tip: you can use cpufreqd (this is a daemon that uses cpufreq) to set cpufreq governors on different conditions (eg. CPU load or a specific process that is running). You can even use scripts. I used it to overclock my system - with k10ctl - when mencoder is running.
5) cpufreq speeds are not updated when overclocked or underclocked, until a core is disabled and enabled again.
6) Disabling cores (from Linux or BIOS) does not improve power consumption, does anybody know why?
Currently I'm running an underclock script for each multiplier to see what the lowest voltage is for each CPU frequency. Mail me if you want to try it yourself.
Real dynamic frequency scaling?
I did some more tests. Currently I'm collecting the bottom voltages of each frequency with Cool n Quiet (CnQ) enabled. I found out that CnQ can lockup the system if the voltage is incremented with too great steps.
From 800 MHz @ 0.775V (0.7V measured) to 3.2 GHz @ 1.275V (0.125V measured) will not work. Smaller increments are needed.
My aim is to get my server running on anything beteen 400 and 4000 MHz, incrementing the frequency when needed, lowering when it's too hot, etc. I made a first start with cpufreqd, see my story.
However, I'm now facing the problem when the voltage is bumped in too great steps. I'm thinking of these solutions.
1. Stil use cpufreqd, but wrap k10ctl with a script and check if the voltage increment. If it is too big (I think > 0.1V?) that increment voltage and speed in steps
2. Or writing a different governor (userspace or kernel space) that selects any frequency between 400 and 4000 MHz in 100 MHz steps (that's 36 P-states). Dunno if it's possible to have this much P-states. This will allow almost a full dynamical speed. So much P-states will probably slow things down, but I can always lower the number to an optimal (where voltage increments are within limits)
I think I start with 1) to see if it solves my problems and to find the maximum voltage increments.