* Which cpufreq driver is best for ...
@ 2003-09-03 5:57 Norbert Preining
2003-09-03 11:37 ` Bas Mevissen
2003-09-03 19:27 ` Dominik Brodowski
0 siblings, 2 replies; 18+ messages in thread
From: Norbert Preining @ 2003-09-03 5:57 UTC (permalink / raw)
To: cpufreq
Hi!
Which cpufreq driver is best for
Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz
I can use the
p4-clockmod
and the
speedstep-ich
With the p4-clockmod I can adapt the freq between 274MHz and 2.2GHz,
while with speedstep-ich I can only go between 1.2GHz and 2.2GHz. So I
guess p4-clockmod is superior for my chip/cpu.
In the same line - are there any new governors with `intelligent'
scaling techniques. ATM I am using cpudyn, which switches between min
and max frequences.
Best wishes
Norbert
-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Technische Universität Wien
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
NACTION (n.)
The 'n' with which cheap advertising copywriters replace the word
'and' (as in 'fish 'n' chips', 'mix 'n' match', 'assault 'n'
battery'), in the mistaken belief that this is in some way chummy or
endearing.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 5:57 Which cpufreq driver is best for Norbert Preining
@ 2003-09-03 11:37 ` Bas Mevissen
2003-09-03 14:32 ` Norbert Preining
2003-09-03 19:30 ` Dominik Brodowski
2003-09-03 19:27 ` Dominik Brodowski
1 sibling, 2 replies; 18+ messages in thread
From: Bas Mevissen @ 2003-09-03 11:37 UTC (permalink / raw)
To: Norbert Preining; +Cc: cpufreq
Norbert Preining wrote:
> Hi!
>
> Which cpufreq driver is best for
> Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz
> I can use the
> p4-clockmod
> and the
> speedstep-ich
> With the p4-clockmod I can adapt the freq between 274MHz and 2.2GHz,
> while with speedstep-ich I can only go between 1.2GHz and 2.2GHz. So I
> guess p4-clockmod is superior for my chip/cpu.
>
It depends on what you want. If you want to get battery life to the max
(and power consumption/heat production as low as possible), you need
p4-clockmod.
I just use speedstep-ich on mu P4@2.0G (Dell Inspiron 8500) only to
switch between 1.2GHz and 2.0GHz. My main use is lowering the
temperature and rising the battery life when I'm working with my labtop
litterly as lab-top (and no longer getting heated up too much by the
notebook :-) ).
So I'm happy with the "heat control" only, you might want to have more
than that.
> In the same line - are there any new governors with `intelligent'
> scaling techniques. ATM I am using cpudyn, which switches between min
> and max frequences.
>
If you use speedstep-ich, you might only want to switch speeds depending
on AC or battery power, eventually with manual override. That should be
possible with e.g. acpid and some scripts, while using cpufreq in
userspace governer mode.
If you really want the best battery life, you can use/write a governor
that depends on e.g. load. (I've seen something about that somewhere.)
Regards,
Bas.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 11:37 ` Bas Mevissen
@ 2003-09-03 14:32 ` Norbert Preining
2003-09-03 15:52 ` Mattia Dongili
2003-09-03 19:30 ` Dominik Brodowski
1 sibling, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2003-09-03 14:32 UTC (permalink / raw)
To: cpufreq
On Mit, 03 Sep 2003, Bas Mevissen wrote:
> >Which cpufreq driver is best for
> > Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz
> >I can use the
> > p4-clockmod
> >and the
> > speedstep-ich
> >With the p4-clockmod I can adapt the freq between 274MHz and 2.2GHz,
> >while with speedstep-ich I can only go between 1.2GHz and 2.2GHz. So I
> >guess p4-clockmod is superior for my chip/cpu.
> >
>
> It depends on what you want. If you want to get battery life to the max
> (and power consumption/heat production as low as possible), you need
> p4-clockmod.
This is what I think too, because with p4-clockmod I can set the frq as
low as 274MHz, while with speedstep-ich only down to 1200MHz, this makes
a big difference, in heat and battery life, I guess.
> If you really want the best battery life, you can use/write a governor
> that depends on e.g. load. (I've seen something about that somewhere.)
I have this one running, it it called
cpudyn(d)
and is in debian/sid. Adapts to the load quite fast. Normallz the laptop
is in 274MHz mode, but is going up to 2200MHz immediately when I start
latex-ing or gcc-ing.
Now, what would be nice, is a cpudyn2 that steps the processor dependend
on the load to different speeds.
But for now I will adjust the lowest/highest allowed freq with acpi
events so that on battery not even 2200 is used, but less.
Best wishes
Norbert
-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Technische Universität Wien
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
YADDLETHORPE (vb.)
(Of offended pooves.) To exit huffily from a boutique.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 14:32 ` Norbert Preining
@ 2003-09-03 15:52 ` Mattia Dongili
0 siblings, 0 replies; 18+ messages in thread
From: Mattia Dongili @ 2003-09-03 15:52 UTC (permalink / raw)
To: cpufreq
On Wed, Sep 03, 2003 at 04:32:50PM +0200, Norbert Preining wrote:
> On Mit, 03 Sep 2003, Bas Mevissen wrote:
[...]
> I have this one running, it it called
> cpudyn(d)
> and is in debian/sid. Adapts to the load quite fast. Normallz the laptop
> is in 274MHz mode, but is going up to 2200MHz immediately when I start
> latex-ing or gcc-ing.
>
> Now, what would be nice, is a cpudyn2 that steps the processor dependend
> on the load to different speeds.
you could try the CVS version of cpufreqd from
www.sf.net/projects/cpufreqd that support cpu load monitoring in it's
soon to be released version or
http://www.goop.org/~jeremy/speedfreq
or see this old thread:
http://www.linux.org.uk/mailman/private/cpufreq/2003-March/001862.html
hth
--
mattia
:wq!
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 5:57 Which cpufreq driver is best for Norbert Preining
2003-09-03 11:37 ` Bas Mevissen
@ 2003-09-03 19:27 ` Dominik Brodowski
2003-09-04 12:36 ` Bas Mevissen
1 sibling, 1 reply; 18+ messages in thread
From: Dominik Brodowski @ 2003-09-03 19:27 UTC (permalink / raw)
To: Norbert Preining; +Cc: cpufreq
On Wed, Sep 03, 2003 at 07:57:49AM +0200, Norbert Preining wrote:
> Hi!
>
> Which cpufreq driver is best for
> Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz
> I can use the
> p4-clockmod
> and the
> speedstep-ich
> With the p4-clockmod I can adapt the freq between 274MHz and 2.2GHz,
> while with speedstep-ich I can only go between 1.2GHz and 2.2GHz. So I
> guess p4-clockmod is superior for my chip/cpu.
No, speedstep-ich is "superior". p4-clockmod only "throttles" the CPU, i.e.
it scales down the frequency but not the voltage. This results in an
approximately linear saving of energy. speedstep-ich also scales the
voltage, which causes much better saving of energy.
And as long as ACPI C-States "idling" or APM "hlt" instructions work, the
CPU is "throttled"[*] if there is no work to do anyway, so the p4-clockmod
driver doesn't save you anything. The p4-clockmod driver almost only is
useful where ACPI or APM "idling" is borken.
> In the same line - are there any new governors with `intelligent'
> scaling techniques.
Not yet. Stay tuned, please.
Dominik
[*] I know, this isn't technically true. But it's a good approximation...
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 11:37 ` Bas Mevissen
2003-09-03 14:32 ` Norbert Preining
@ 2003-09-03 19:30 ` Dominik Brodowski
2003-09-03 19:50 ` Norbert Preining
2003-09-04 12:25 ` Bas Mevissen
1 sibling, 2 replies; 18+ messages in thread
From: Dominik Brodowski @ 2003-09-03 19:30 UTC (permalink / raw)
To: Bas Mevissen; +Cc: cpufreq
On Wed, Sep 03, 2003 at 01:37:05PM +0200, Bas Mevissen wrote:
> Norbert Preining wrote:
>
> >Hi!
> >
> >Which cpufreq driver is best for
> > Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz
> >I can use the
> > p4-clockmod
> >and the
> > speedstep-ich
> >With the p4-clockmod I can adapt the freq between 274MHz and 2.2GHz,
> >while with speedstep-ich I can only go between 1.2GHz and 2.2GHz. So I
> >guess p4-clockmod is superior for my chip/cpu.
> >
>
> It depends on what you want. If you want to get battery life to the max
> (and power consumption/heat production as low as possible), you need
> p4-clockmod.
Well, if you run CPU hogs, the p4-clockmod driver indeed prolongs battery
life and reduces heat production. But less work is done, also. So the ratio
amount of energy
----------------
amount of work
is better (lower) for the speedstep-ich driver than for the p4-clockmod
driver.
Dominik
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 19:30 ` Dominik Brodowski
@ 2003-09-03 19:50 ` Norbert Preining
2003-09-03 21:01 ` Dominik Brodowski
2003-09-04 12:25 ` Bas Mevissen
1 sibling, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2003-09-03 19:50 UTC (permalink / raw)
To: cpufreq
Dear Dominik!
On Mit, 03 Sep 2003, Dominik Brodowski wrote:
> Well, if you run CPU hogs, the p4-clockmod driver indeed prolongs battery
> life and reduces heat production. But less work is done, also. So the ratio
>
> amount of energy
> ----------------
> amount of work
>
> is better (lower) for the speedstep-ich driver than for the p4-clockmod
> driver.
On Mit, 03 Sep 2003, Dominik Brodowski wrote:
> No, speedstep-ich is "superior". p4-clockmod only "throttles" the CPU, i.e.
> it scales down the frequency but not the voltage. This results in an
> approximately linear saving of energy. speedstep-ich also scales the
> voltage, which causes much better saving of energy.
Sorry for the stupid questions, but why there are 8 different cpu
frequencies possible with p4-clockmod, while there are only 2 with
speedstep-ich?
> And as long as ACPI C-States "idling" or APM "hlt" instructions work, the
> CPU is "throttled"[*] if there is no work to do anyway, so the p4-clockmod
> driver doesn't save you anything. The p4-clockmod driver almost only is
> useful where ACPI or APM "idling" is borken.
Does this mean, that with speedstep-ich I do *not* need a
cpufreq/speedstep/cpudyn/(insert your favorite) daemon and this is done
automatically?
More detailed: linux-2.4.23-pre2 with cpufreq from cvs: What is the best
way to:
* reduce heat
* increase battery life
(and still do some work, but I normally do not have big long cpu intense
applications running, besides kernel compiling)?
I found for now that having p4-clockmod saves more energy/produces less
heat since most of the time the laptop is running in 275MHz (with
cpudynd), while with speedstep-ich it is running at 1200MHz.
Finally: If p4-clockmod only scales down cpu freq, and speedstep-ich
scaled down cpu freq *AND* voltage, are there any statistics or other
ways to compare battery life/heat production between the two,
assuming that for the former the minimal cpu freq is 274MHz and for the
later 1200MHz.
Concise: Does the speedstep-ich voltage reduction decrease the amount of
energy used by a factor 4 (~ 1200/274) so that it is comparable to
p4-clockmod?
Anyway, thanks for all the information and help and I really appreciate
your great work.
Best wishes
Norbert
-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Technische Universität Wien
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
HEATON PUNCHARDON (n.) A violent argument which breaks out in the car
on the way home from a party between a couple who have had to be
polite to each other in company all evening.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 19:50 ` Norbert Preining
@ 2003-09-03 21:01 ` Dominik Brodowski
2003-09-04 7:09 ` Norbert Preining
2003-09-04 9:57 ` Norbert Preining
0 siblings, 2 replies; 18+ messages in thread
From: Dominik Brodowski @ 2003-09-03 21:01 UTC (permalink / raw)
To: Norbert Preining; +Cc: cpufreq
Dear Norbert,
> On Mit, 03 Sep 2003, Dominik Brodowski wrote:
> > No, speedstep-ich is "superior". p4-clockmod only "throttles" the CPU, i.e.
> > it scales down the frequency but not the voltage. This results in an
> > approximately linear saving of energy. speedstep-ich also scales the
> > voltage, which causes much better saving of energy.
>
> Sorry for the stupid questions, but why there are 8 different cpu
> frequencies possible with p4-clockmod, while there are only 2 with
> speedstep-ich?
The difference is the following:
A.) SpeedStep I: The Front Side Bus (FSB) of your CPU is,
most likely, 100 MHz. Within the kernel this is multiplied by a certain
factor to get the CPU frequency. On SpeedStep-capable CPUs there are not one
but _two_ such multipliers -- with two different factors. This is controlled
by _one_ input pin to the CPU, and thus offers only two different operating
frequencies.
B.) Throttling [p4-clockmod]: The CPU only "works" if the clock signal (which
is produced externally and then modified in the mutliplier) is propagated
throughout the CPU. It is possible to block this clock signal for certain
periods of time -- so if each char represents a clock tick, the following is
done when 50% throttling is active:
xxxx----xxxx----xxxx----xxxx----
where x denotes the CPU "works" and - denotes where the CPU doesn't do
anything usefull at all.
And probably it's easy to stop every eigth or so CPU clock signal, so you
get 8 different throttling states.
[For informational purposes only:]
C.) SpeedStep II [what you can find on the "Centrino" Pentium-M processor]:
It is not an input pin which steers the frequency multiplier, but a "Model
Specific Register" (MSR), and thus more different frequency multiplier ==
speed settings are possible.
> > And as long as ACPI C-States "idling" or APM "hlt" instructions work, the
> > CPU is "throttled"[*] if there is no work to do anyway, so the p4-clockmod
> > driver doesn't save you anything. The p4-clockmod driver almost only is
> > useful where ACPI or APM "idling" is borken.
>
> Does this mean, that with speedstep-ich I do *not* need a
> cpufreq/speedstep/cpudyn/(insert your favorite) daemon and this is done
> automatically?
No, with the _p4-clockmod_ driver you don't need a cpudyn daemon [except -
see below...]. With _speedstep-ich_ it'd be very usefull.
> More detailed: linux-2.4.23-pre2 with cpufreq from cvs: What is the best
> way to:
> * reduce heat
> * increase battery life
both aims are effectively the same: the less energy you use, the less heat
is produced, and the longer the battery lasts.
> (and still do some work, but I normally do not have big long cpu intense
> applications running, besides kernel compiling)?
If you don't mind that the CPU heats up during kernel compiles, the
speedstep-ich driver is better for your usage.
> I found for now that having p4-clockmod saves more energy/produces less
> heat since most of the time the laptop is running in 275MHz (with
> cpudynd), while with speedstep-ich it is running at 1200MHz.
But as the agressive idling done by ACPI or APM saves as much energy as
throttling, this shouldn't be a valid assumption.
> Finally: If p4-clockmod only scales down cpu freq, and speedstep-ich
> scaled down cpu freq *AND* voltage, are there any statistics or other
> ways to compare battery life/heat production between the two,
> assuming that for the former the minimal cpu freq is 274MHz and for the
> later 1200MHz.
Unfortunately, I don't have the information for your CPU. But, as a good
example, let's take the 1.0 GHz Pentium-III-M.
100% CPU-usage, 1.0 GHz, Speedstep-High, no throttling: 34.0 W
and let's say the CPU consuming task takes 1 minute to complete.
==> for the task you'll need 2.0 kWs [=kJ?] of energy.
100% CPU-usage, 700 MHz, Speedstep-Low, no throttling: 16.1 W
--> the CPU consuming task will take 1.43 minutes to complete.
==> for the task you'll need 1.4 kWs of energy.
100% CPU usage, 125 MHz, throttling to 12.5%: [*] 6.2 W
--> the CPU consuming task will take 8 minutes to complete.
==> for the task you'll need 3.0 kWs of energy.
0% CPU usage, 1.0 GHz, SpeedStep-High, throttling doesn't matter: 2.2 W
0% CPU usage, 700 MHz, SpeedStep-Low, throttling doesn't matter: 1.2 W
and now let's assume the "needed" CPU capacity is 100 MHz for one second:
10% CPU usage, 1.0 GHz [SpeedStep-High, no throttling, no dynamic switching]:
34.0 * 1/10 + 2.2 * 9/10 = 5.38 Ws
14% CPU usage, 700 MHz [SpeedStep-Low, no throttling, no dynamic switching]:
16.1 * 1/7 + 1.2 * 6/7 = 3.33 Ws
80% CPU usage, 125 MHz [throttling to 12.5%]
2.2 + ([34.0 - 2.2] * 1/8 * 8/10) = 5.38 Ws
==> you don't save anything at all.
10% CPU usage at 1.0GHz for 100ms, then the CPU is dynamically switched to
the SpeedStep-Low state. No throttling:
34.0 * 1/10 + 1.2 * 9/10 = 4.48 Ws
==> this doesn't buy you much, either. This result surprised me too,
by the way.
[*] 2.2 + ([34.0 - 2.2] * 1/8)
> Concise: Does the speedstep-ich voltage reduction decrease the amount of
> energy used by a factor 4 (~ 1200/274) so that it is comparable to
> p4-clockmod?
Wrong question: Mostly you do care about "energy needed for certain amount
of work". There throttling doesn't save you anything if idling works, but
"speedstepping" does.
The only two reasons for CPUfreq drivers which "only" do throttling are:
a) The idling mechansim is broken.
b) Reduce the heat. If the CPU only takes 6.2 W instead of 34.0 W, this is
much. This is a good approach to avoid a burning feeling on your lap when
your notebook is compiling, and you don't need the compiled program ASAP.
But: you won't save any _energy_/battery power [see above].
Best wishes to the wonderful city of Vienna,
Dominik
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 21:01 ` Dominik Brodowski
@ 2003-09-04 7:09 ` Norbert Preining
2003-09-04 9:46 ` Dominik Brodowski
2003-09-04 9:57 ` Norbert Preining
1 sibling, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2003-09-04 7:09 UTC (permalink / raw)
To: cpufreq
Good morning Dominik!
First of all: Thanks for the time you take!!!
On Mit, 03 Sep 2003, Dominik Brodowski wrote:
> A.) SpeedStep I: The Front Side Bus (FSB) of your CPU is,
>
> B.) Throttling [p4-clockmod]: The CPU only "works" if the clock signal (which
Ok, I see the difference.
> No, with the _p4-clockmod_ driver you don't need a cpudyn daemon [except -
> see below...]. With _speedstep-ich_ it'd be very usefull.
Using p4-clockmod the normal ACPI idle will reduce the CPU frequency?
Interesting, I have to try this.
> > (and still do some work, but I normally do not have big long cpu intense
> > applications running, besides kernel compiling)?
>
> If you don't mind that the CPU heats up during kernel compiles, the
> speedstep-ich driver is better for your usage.
Ok, will try it.
> Unfortunately, I don't have the information for your CPU. But, as a good
> example, let's take the 1.0 GHz Pentium-III-M.
I have to think about this and do my own calculation, otherwise I won't
understand it.
> Wrong question: Mostly you do care about "energy needed for certain amount
> of work". There throttling doesn't save you anything if idling works, but
> "speedstepping" does.
You are right. Thanks for pointing this out.
> The only two reasons for CPUfreq drivers which "only" do throttling are:
>
> a) The idling mechansim is broken.
How can I check this?
> Best wishes to the wonderful city of Vienna,
Thanks a lot, now that the rain has come back to Vienna after months of
heat we are all quite happy.
Thanks again for the explanations, probably I have to disturb you again ;-)
Best wishes
Norbert
-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Technische Universität Wien
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
KENTUCKEY (adv.)
Fitting exactly and satisfyingly. The cardboard box that slides neatly
into an exact space in a garage, or the last book which exactly fills
a bookshelf, is said to fit 'real nice and kentuckey'.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-04 7:09 ` Norbert Preining
@ 2003-09-04 9:46 ` Dominik Brodowski
2003-09-04 9:59 ` Norbert Preining
0 siblings, 1 reply; 18+ messages in thread
From: Dominik Brodowski @ 2003-09-04 9:46 UTC (permalink / raw)
To: Norbert Preining; +Cc: cpufreq
Good morning Norbert,
> > No, with the _p4-clockmod_ driver you don't need a cpudyn daemon [except -
> > see below...]. With _speedstep-ich_ it'd be very usefull.
>
> Using p4-clockmod the normal ACPI idle will reduce the CPU frequency?
> Interesting, I have to try this.
Not really "reduce" it, but "stop" it for certain periods of time.
> > a) The idling mechansim is broken.
>
> How can I check this?
a) Do nothing on your notebook for a while. Does it heat up much?
b) check /proc/acpi/processor/*/power whether C1 and C2 are used. C3 would
be even better.
> Thanks again for the explanations, probably I have to disturb you again ;-)
You're welcome, and ask again if you have any questions.
Dominik
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 21:01 ` Dominik Brodowski
2003-09-04 7:09 ` Norbert Preining
@ 2003-09-04 9:57 ` Norbert Preining
2003-09-07 19:12 ` Dominik Brodowski
1 sibling, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2003-09-04 9:57 UTC (permalink / raw)
To: cpufreq
OK, me again. Just for completeness, I now see the point and want to add
some comments:
On Mit, 03 Sep 2003, Dominik Brodowski wrote:
> Unfortunately, I don't have the information for your CPU. But, as a good
> example, let's take the 1.0 GHz Pentium-III-M.
>
> 100% CPU-usage, 1.0 GHz, Speedstep-High, no throttling: 34.0 W
> and let's say the CPU consuming task takes 1 minute to complete.
> ==> for the task you'll need 2.0 kWs [=kJ?] of energy.
>
> 100% CPU-usage, 700 MHz, Speedstep-Low, no throttling: 16.1 W
> --> the CPU consuming task will take 1.43 minutes to complete.
> ==> for the task you'll need 1.4 kWs of energy.
I guess these two values have been taken from some specification (the
values 34.0 and 16.1)?
I want to show that you are right ;-)
Assume that we are running cpuXXX daemon which switches the cpu to the
highest frequency as soon as the load is reasonable high, i.e. someting
is done. So the power consumption in the times where cpu is used is the
same in p4-clockmod and speedstep. I will call this T and S (for
throttling and SpeedStep from now on). Thus, only the `idle' times make
a difference.
Let t be the throttling factor, in our case 0.125, and s be the
speedstep factor (top to low), in our case 0.7. For idle times
let c_t the cpu usage level in throttling state, and c_s the cpu usage
level in speedstep low state. In our case, we would have
(1) c_t : c_s = s : t = 700 : 125 = 5.6
obviously, because in T we have a lower frequency, thus the cpu usage
will be higher (is this wrong?) compared to the S state with higher
frequency.
Now for the energy in S and T states:
S (speedstep low): W_s = 1.2 + ((16.1-1.2)*s*c_s)
T (throttling): W_t = 2.2 + ((34.0-2.2)*t*c_t)
From (1) we know that
s*c_s = t*c_t
which gives for W_s:
W_s = 1.2 + ((16.1-1.2)*t*c_t)
Now we compare W_t with W_s. First note that
t*c_t always is in [0,1]
since both of them are in [0,1], thus for the border cases
t*c_t = 0 and = 1, we obtain:
W_t : W_s [0] = 2.2 : 1.2 = 1.833
and
W_t : W_s [1] = 34.0 : 16.1 = 2.111
which gives, that the power consumption is indeed much higher in
throttling state compared to speedstep low state.
Reason for all this, to make it short: SpeedStep reduces the voltage and
the power consumption of the processor, which saves more energy than
letting the processor run at lower frequency but on the full
voltage/power consumption.
Now one last question: Is this computation complete rubbish? And where
did you get the values for your processor?
Best wishes
Norbert
-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Technische Universität Wien
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SLOGARIE (n.)
Hillwalking dialect for the seven miles of concealed rough moorland
which lie between what you though was the top of the hill and what
actually is.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-04 9:46 ` Dominik Brodowski
@ 2003-09-04 9:59 ` Norbert Preining
2003-09-04 10:04 ` Dominik Brodowski
0 siblings, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2003-09-04 9:59 UTC (permalink / raw)
To: cpufreq
On Don, 04 Sep 2003, Dominik Brodowski wrote:
> > Using p4-clockmod the normal ACPI idle will reduce the CPU frequency?
> > Interesting, I have to try this.
>
> Not really "reduce" it, but "stop" it for certain periods of time.
So I cannot observe this, or? cat /proc/cpuinfo usually shows me the
current cpu freq. With this behaviour it is just a thing of `feeling'
cooler.
> > > a) The idling mechansim is broken.
> >
> > How can I check this?
>
> a) Do nothing on your notebook for a while. Does it heat up much?
> b) check /proc/acpi/processor/*/power whether C1 and C2 are used. C3 would
> be even better.
Hmmm:
[~] cat /proc/acpi/processor/CPU0/power
active state: C1
default state: C1
bus master activity: 00000000
states:
*C1: promotion[--] demotion[--] latency[000] usage[00000000]
C2: <not supported>
C3: <not supported>
Anything I can do to make C2 (and C3) work?
Best wishes
Norbert
-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Technische Universität Wien
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
LUDLOW (n.)
A wad of newspaper, folded tablenapkin or lump of cardboard put under
a wobbly table or chair to make it stand-up straight. It is perhaps
not widely known that air-ace Sir Douglas Bader used to get about on
an enormous pair of ludlows before he had his artificial legs fitted.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-04 9:59 ` Norbert Preining
@ 2003-09-04 10:04 ` Dominik Brodowski
0 siblings, 0 replies; 18+ messages in thread
From: Dominik Brodowski @ 2003-09-04 10:04 UTC (permalink / raw)
To: Norbert Preining; +Cc: cpufreq
On Thu, Sep 04, 2003 at 11:59:35AM +0200, Norbert Preining wrote:
> On Don, 04 Sep 2003, Dominik Brodowski wrote:
> > > Using p4-clockmod the normal ACPI idle will reduce the CPU frequency?
> > > Interesting, I have to try this.
> >
> > Not really "reduce" it, but "stop" it for certain periods of time.
>
> So I cannot observe this, or? cat /proc/cpuinfo usually shows me the
> current cpu freq. With this behaviour it is just a thing of `feeling'
> cooler.
Yes, you cannot observe this.
> > > > a) The idling mechansim is broken.
> > >
> > > How can I check this?
> >
> > a) Do nothing on your notebook for a while. Does it heat up much?
> > b) check /proc/acpi/processor/*/power whether C1 and C2 are used. C3 would
> > be even better.
>
> Hmmm:
> [~] cat /proc/acpi/processor/CPU0/power
> active state: C1
> default state: C1
> bus master activity: 00000000
> states:
> *C1: promotion[--] demotion[--] latency[000] usage[00000000]
> C2: <not supported>
> C3: <not supported>
> Anything I can do to make C2 (and C3) work?
please send me a dmesg and /proc/pci [off-list].
Dominik
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 19:30 ` Dominik Brodowski
2003-09-03 19:50 ` Norbert Preining
@ 2003-09-04 12:25 ` Bas Mevissen
1 sibling, 0 replies; 18+ messages in thread
From: Bas Mevissen @ 2003-09-04 12:25 UTC (permalink / raw)
To: Dominik Brodowski; +Cc: cpufreq
Dominik Brodowski wrote:
> On Wed, Sep 03, 2003 at 01:37:05PM +0200, Bas Mevissen wrote:
>
>>It depends on what you want. If you want to get battery life to the max
>>(and power consumption/heat production as low as possible), you need
>>p4-clockmod.
>
> Well, if you run CPU hogs, the p4-clockmod driver indeed prolongs battery
> life and reduces heat production. But less work is done, also. So the ratio
>
> amount of energy
> ----------------
> amount of work
>
> is better (lower) for the speedstep-ich driver than for the p4-clockmod
> driver.
>
Yes, I should have mentioned that my remark only applied to wall time
battery life without taking CPU idleing into account.
Regards,
Bas.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-03 19:27 ` Dominik Brodowski
@ 2003-09-04 12:36 ` Bas Mevissen
2003-09-04 23:27 ` Dominik Brodowski
0 siblings, 1 reply; 18+ messages in thread
From: Bas Mevissen @ 2003-09-04 12:36 UTC (permalink / raw)
To: Dominik Brodowski; +Cc: cpufreq
Dominik Brodowski wrote:
>
> No, speedstep-ich is "superior". p4-clockmod only "throttles" the CPU, i.e.
> it scales down the frequency but not the voltage. This results in an
> approximately linear saving of energy.
I think the confusion about clockmod workings (and hence the savings
that can be gained from it) comes from the fact that "mod" in clockmod
is misinterpreted as "modification" (but it stands for modulation).
> And as long as ACPI C-States "idling" or APM "hlt" instructions work, the
> CPU is "throttled"[*] if there is no work to do anyway, so the p4-clockmod
> driver doesn't save you anything. The p4-clockmod driver almost only is
> useful where ACPI or APM "idling" is borken.
>
Maybe this (together with your extensive explanation in this thread) can
be FAQ-ed. With a good explanation of the power saving models (clock
modulation, clock modification&voltage scaling, cpu idling) a lot of
questions can be answered.
Regards,
Bas.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-04 12:36 ` Bas Mevissen
@ 2003-09-04 23:27 ` Dominik Brodowski
2003-09-05 8:15 ` Bas Mevissen
0 siblings, 1 reply; 18+ messages in thread
From: Dominik Brodowski @ 2003-09-04 23:27 UTC (permalink / raw)
To: Bas Mevissen; +Cc: cpufreq
On Thu, Sep 04, 2003 at 02:36:45PM +0200, Bas Mevissen wrote:
> Maybe this (together with your extensive explanation in this thread) can
> be FAQ-ed. With a good explanation of the power saving models (clock
> modulation, clock modification&voltage scaling, cpu idling) a lot of
> questions can be answered.
Have you got some spare time? If so, a patch / file with such a FAQ /
summary would be greatly appreciated.
Dominik
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-04 23:27 ` Dominik Brodowski
@ 2003-09-05 8:15 ` Bas Mevissen
0 siblings, 0 replies; 18+ messages in thread
From: Bas Mevissen @ 2003-09-05 8:15 UTC (permalink / raw)
To: Dominik Brodowski; +Cc: cpufreq
Dominik Brodowski wrote:
> On Thu, Sep 04, 2003 at 02:36:45PM +0200, Bas Mevissen wrote:
>
>>Maybe this (together with your extensive explanation in this thread) can
>>be FAQ-ed. With a good explanation of the power saving models (clock
>>modulation, clock modification&voltage scaling, cpu idling) a lot of
>>questions can be answered.
>
> Have you got some spare time? If so, a patch / file with such a FAQ /
> summary would be greatly appreciated.
>
I don't really have much spare time, but it is a matter of priority :-)
So I'll write something in the next week. I hope people are willing to
review it.
Regards,
Bas.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Which cpufreq driver is best for ...
2003-09-04 9:57 ` Norbert Preining
@ 2003-09-07 19:12 ` Dominik Brodowski
0 siblings, 0 replies; 18+ messages in thread
From: Dominik Brodowski @ 2003-09-07 19:12 UTC (permalink / raw)
To: Norbert Preining; +Cc: cpufreq
Hi,
On Thu, Sep 04, 2003 at 11:57:04AM +0200, Norbert Preining wrote:
> OK, me again. Just for completeness, I now see the point and want to add
> some comments:
>
> On Mit, 03 Sep 2003, Dominik Brodowski wrote:
> > Unfortunately, I don't have the information for your CPU. But, as a good
> > example, let's take the 1.0 GHz Pentium-III-M.
> >
> > 100% CPU-usage, 1.0 GHz, Speedstep-High, no throttling: 34.0 W
> > and let's say the CPU consuming task takes 1 minute to complete.
> > ==> for the task you'll need 2.0 kWs [=kJ?] of energy.
> >
> > 100% CPU-usage, 700 MHz, Speedstep-Low, no throttling: 16.1 W
> > --> the CPU consuming task will take 1.43 minutes to complete.
> > ==> for the task you'll need 1.4 kWs of energy.
>
> I guess these two values have been taken from some specification (the
> values 34.0 and 16.1)?
Yes: they are taken from Table 33 "Power Specifications for Mobile Pentium
III Processor With Intel SpeedStep Technology" on page 64 of Datasheet
283653 rev. 002 "Mobile Intel Pentium III Processor in BGA2 and Micro- PGA2
Packages", available at developer.intel.com.
> Assume that we are running cpuXXX daemon which switches the cpu to the
> highest frequency as soon as the load is reasonable high, i.e. someting
> is done. So the power consumption in the times where cpu is used is the
> same in p4-clockmod and speedstep. I will call this T and S (for
> throttling and SpeedStep from now on). Thus, only the `idle' times make
> a difference.
>
> Let t be the throttling factor, in our case 0.125, and s be the
> speedstep factor (top to low), in our case 0.7. For idle times
> let c_t the cpu usage level in throttling state, and c_s the cpu usage
> level in speedstep low state. In our case, we would have
> (1) c_t : c_s = s : t = 700 : 125 = 5.6
> obviously, because in T we have a lower frequency, thus the cpu usage
> will be higher (is this wrong?) compared to the S state with higher
> frequency.
This is right.
> Now for the energy in S and T states:
> S (speedstep low): W_s = 1.2 + ((16.1-1.2)*s*c_s)
> T (throttling): W_t = 2.2 + ((34.0-2.2)*t*c_t)
> >From (1) we know that
> s*c_s = t*c_t
> which gives for W_s:
> W_s = 1.2 + ((16.1-1.2)*t*c_t)
> Now we compare W_t with W_s. First note that
> t*c_t always is in [0,1]
> since both of them are in [0,1], thus for the border cases
> t*c_t = 0 and = 1, we obtain:
> W_t : W_s [0] = 2.2 : 1.2 = 1.833
> and
> W_t : W_s [1] = 34.0 : 16.1 = 2.111
> which gives, that the power consumption is indeed much higher in
> throttling state compared to speedstep low state.
>
> Reason for all this, to make it short: SpeedStep reduces the voltage and
> the power consumption of the processor, which saves more energy than
> letting the processor run at lower frequency but on the full
> voltage/power consumption.
Indeed. But I think its worth adding that
a) if proper idling is done and CPU usage is below the throttling level, no
power is saved at all.
b) the voltage and thus the power usage needed for "idling" is lower when
the processor is in speedstep_low state than if it is in
speedstep_high state.
> Now one last question: Is this computation complete rubbish? And where
> did you get the values for your processor?
In the datasheet above. For pentium4-ms I couldn't find as complete
documentation, but maybe I didn't look hard enough.
Dominik
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2003-09-07 19:12 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-03 5:57 Which cpufreq driver is best for Norbert Preining
2003-09-03 11:37 ` Bas Mevissen
2003-09-03 14:32 ` Norbert Preining
2003-09-03 15:52 ` Mattia Dongili
2003-09-03 19:30 ` Dominik Brodowski
2003-09-03 19:50 ` Norbert Preining
2003-09-03 21:01 ` Dominik Brodowski
2003-09-04 7:09 ` Norbert Preining
2003-09-04 9:46 ` Dominik Brodowski
2003-09-04 9:59 ` Norbert Preining
2003-09-04 10:04 ` Dominik Brodowski
2003-09-04 9:57 ` Norbert Preining
2003-09-07 19:12 ` Dominik Brodowski
2003-09-04 12:25 ` Bas Mevissen
2003-09-03 19:27 ` Dominik Brodowski
2003-09-04 12:36 ` Bas Mevissen
2003-09-04 23:27 ` Dominik Brodowski
2003-09-05 8:15 ` Bas Mevissen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.