CPU frequency and voltage tuning

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

CPU frequency and voltage tuning

Postby zugunder » Jun 2nd, '12, 00:08

Hi,
Recently I bumped into a set of tools for CPU frequency scaling (I suppose), but I could not find any simple description of their differences/applications.
So in Mageia's repository there are:
Code: Select all
cpufreq
cpufreqd
cpudyn

I have cpufreq installed and running, but I am not sure it is necessary, as everything (voltage and frequency) is controlled by the kernel. Is there any need it any of these tools for a Core2Duo CPU? And if yes, what is (if any) a key difference between them?

Thank you.
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: CPU frequency and voltage tuning

Postby doktor5000 » Jun 2nd, '12, 17:00

cpudyn is an userspace program which tries to save as much power, and AFAIK it's only for older processors, the description mentions Intel Speedstep, Pentium 4 Mobile, AMD Powernow and PowerPC cpu's, which are quite old and got superseded with newer technologies, like EIST (enhanced intel speedstep technology) or Centrino 2 (which is a collective name for some technologies related to powersaving).
cpufreqd is the service, cpufreq the package name, and actually cpufreq is only a small init script to set the default cpu governor (and the other settings in /etc/sysconfig/cpufreq ) at bootup. What you should do is check if there the default governor is set to ondemand or pwersave. But what do you actually want to achieve or what is your goal? To save energy?

Also "voltage tuning" is a totally different category and not possible that easily. I assume you mean undervolting?
For that you may want to have a look over at http://www.linux-phc.org/

Also which desktop environment are you using?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: CPU frequency and voltage tuning

Postby zugunder » Jun 2nd, '12, 19:27

Thank you, Doctor,

I have 64bit Mageia 1 with KDE, cpufreq is started at boot, set as ondemand.
So, as far as I understood, cpudyn will not support modern CPUs, so may question is what is the difference between cpufreq (which is a simple script) and cpufreqd (which is a service)? Does cpufreqd add anything to cpufreq (or allows more flexible settings)? Does cpufreqd is capable of changing CPU governors in response to some triggers, like external power on/off?
I have an impression that my laptop battery drains much faster under Linux compared to Win with balanced settings (it lasts 30-45min more in Win). It is mostly browsing and no movies or any other CPU-intensive things... I can see my CPU frequency dropped to its minimum of 1.2GHz, but I am not sure if CPU voltage is also dropped automatically when CPU is idle. It should be done by BIOS I suppose, but I can't check the actual voltage from Linux.
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: CPU frequency and voltage tuning

Postby doktor5000 » Jun 3rd, '12, 19:53

You should have a look at powertop which does exactly what you want, and show you the C-states of the processor and many more power-related informations.

For cpufreq, you makeit more complicated than it is. Maybe i was unclear, cpufreqd is the init script, and cpufreq is only the package name. Actually that's the same thing.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: CPU frequency and voltage tuning

Postby zugunder » Jun 4th, '12, 04:55

I have 2 questions now.

1. I do not find governor "conservative" in the list of available governors in /etc/sysconfig/cpufreq. However, cpufreq-ifo says it is available. I guess, it is an error? Or maybe conservative is not considered to be of any use anymore?

2. Please, correct me if I am not right, here is what I understood after reading some manuals. Cpufreq enables manual access to kernel governors via cpufreq-utils and sets the default CPU governor at system startup. Cpufreqd is a daemon which is capable of automatic switching governors depending on certain preset triggers (like loss of power, low battery, etc) and is essentially the same as was pre-4.5 KDE power management tool (before they dropped KDE support of user-defined cpu governors switching):
http://www.linux.it/~malattia/wiki/index.php/Cpufreqd

Thank you.
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: CPU frequency and voltage tuning

Postby doktor5000 » Jun 5th, '12, 17:56

Well, did you try to use conservative governor? http://kernel.org/doc/Documentation/cpu ... ernors.txt Still lists it ...

For the second questions, actually i've got no clue. Actually i didn't like it when KDE removed all those profiles, and basically they said,
no those missing profiles and that you can't configure power management properly anymore is not our fault, the kernel should nowadays be responsible for that.
That's quite a regression, and a serious one, as they removed functionality, which the user has to add himself now.
But as i normally don't run on battery, i've had no need to look into that more intensely.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest