Skip to contentSkip to conversation

battery life with cpufreq

DISCUSSION Fred Blaise 6 participants 15 messages Sep 19, 2005 11 messages not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

Hello all

I have an dell inspiron 5150, 3Ghz. I have loaded p4_clockmod, and my CPU frequency now changes with powernowd. It seems to work well.

`--> cat /proc/cpufreq

          minimum CPU frequency  -  maximum CPU frequency  -  policy
CPU  0       383323 kHz ( 12 %)  -    3066590 kHz (100 %)  -  userspace

`--> cat throttling

state count:             8
active state:            T0
states:
   *T0:                  00%
    T1:                  12%
    T2:                  25%
    T3:                  37%
    T4:                  50%
    T5:                  62%
    T6:                  75%
    T7:                  87%

However, I am not seeing any battery life improvement.

Any ideas?

Thanks

fred

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): 9cfa150205091902116057595e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#2 lore raw

Hi,

Quoted 6 lines · Fred Blaise

I have an dell inspiron 5150, 3Ghz. I have loaded p4_clockmod, and my CPU frequency now changes with powernowd. It seems to work well.

However, I am not seeing any battery life improvement.

Any ideas?

Yes. In general, throttling doesn't improve battery life, only CPU frequency scaling does:

"In contrast to CPU frequency scaling, where the operating frequency is constantly modulated, throttling means the CPU is forced to a halt for short periods of time. If throttled, the CPU [enters] into a physical and electrical state comparable to the idling states mentioned above, so it can be described as an enforced idling of the CPU.

As certain CPU power state typically utilize similar hardware implementations, and as throttling does not have a positive effect on the energy consumption during CPU power states, throttling the CPU by a given rate is only useful if the CPU is less idle than the throttling rate."

Dominik

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 6 lines · Dominik Brodowski

Hi,

Quoted 3 lines · Fred Blaise

I have an dell inspiron 5150, 3Ghz. I have loaded p4_clockmod, and my CPU frequency now changes with powernowd. It seems to work well.

Quoted 6 lines
Quoted 3 lines

However, I am not seeing any battery life improvement.

Any ideas?

Yes. In general, throttling doesn't improve battery life, only CPU frequency scaling does:

ok.. So the fact that my CPU goes down to 383Mghz instead of the normal 3Ghz is not frequency scaling? (pardon the noob that I am if this question doesn't make sense)

Quoted 7 lines

"In contrast to CPU frequency scaling, where the operating frequency is constantly modulated, throttling means the CPU is forced to a halt for short periods of time. If throttled, the CPU [enters] into a physical and electrical state comparable to the idling states mentioned above, so it can be described as an enforced idling of the CPU.

Quoted 7 lines

As certain CPU power state typically utilize similar hardware implementations, and as throttling does not have a positive effect on the energy consumption during CPU power states, throttling the CPU by a given rate is only useful if the CPU is less idle than the throttling rate."

Dominik

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): 9cfa150205091902354d5b4c43-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw

Hi,

On Mon, 2005-09-19 at 11:35 +0200, Fred Blaise wrote:

[...]

Quoted 3 lines

ok.. So the fact that my CPU goes down to 383Mghz instead of the normal 3Ghz is not frequency scaling? (pardon the noob that I am if this question doesn't make sense)

This is frequency scaling. But it has nothing in common with throttling.

Are you saying that you're stepping down from 3 GHz to 300 MHz and do not see any improvements regarding battery life time?

[...]

See you,

Timo

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): 1127123139.11913.2.camel-dCxI//[email protected]

#8 lore raw
Quoted 10 lines · Timo Hoenig

Hi,

On Mon, 2005-09-19 at 11:35 +0200, Fred Blaise wrote:

[...]

Quoted 3 lines

ok.. So the fact that my CPU goes down to 383Mghz instead of the normal 3Ghz is not frequency scaling? (pardon the noob that I am if this question doesn't make sense)

Quoted 5 lines

This is frequency scaling. But it has nothing in common with throttling.

Are you saying that you're stepping down from 3 GHz to 300 MHz and do not see any improvements regarding battery life time?

Yes.
`--> cat cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Mobile Intel(R) Pentium(R) 4 CPU 3.06GHz
stepping : 9
cpu MHz : 382.040
[...]

Quoted 8 lines

[...]

See you,

Timo

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#9 lore raw
In reply to a message not in the archive

Hi,

Quoted 6 lines · Timo Hoenig
Quoted 3 lines

ok.. So the fact that my CPU goes down to 383Mghz instead of the normal 3Ghz is not frequency scaling? (pardon the noob that I am if this question doesn't make sense)

This is frequency scaling. But it has nothing in common with throttling.

No, p4-clockmod is frequency throttling or frequency modulation, but definitely not scaling.

Dominik

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw
Quoted 7 lines · Dominik Brodowski

Hi,

Quoted 4 lines · Timo Hoenig
Quoted 3 lines

ok.. So the fact that my CPU goes down to 383Mghz instead of the normal 3Ghz is not frequency scaling? (pardon the noob that I am if this question doesn't make sense)

Quoted 5 lines
Quoted 2 lines

This is frequency scaling. But it has nothing in common with throttling.

No, p4-clockmod is frequency throttling or frequency modulation, but definitely not scaling.

Ok.. well.. speedstep* do not work here (my frequency will remain stuck where it last was). On the other hand, p4_clockmod, i can see in cpuinfo the frequency going up and down.

Here are the relevant modules loaded:
`--> lsmod
[...]

speedstep_lib           3940  1 p4_clockmod
cpufreq_powersave       1632  0 
cpufreq_userspace       4348  0 
cpufreq_ondemand        6140  0
freq_table              4004  1 p4_clockmod

[...]

So you would be saying that even though I can see the frequency change in cpuinfo, it is kind of "lying" to me? I can feel the difference too, when I use the laptop. It definitly has the speed of a 383Mghz when the cpuinfo shows it at that frequency..
Thanks

Quoted 1 line

Dominik

fred

Quoted 1 line

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): 9cfa1502050919025331a15ad0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#13 lore raw

Hi,

Quoted 3 lines · Fred Blaise

Ok.. well.. speedstep* do not work here (my frequency will remain stuck where it last was). On the other hand, p4_clockmod, i can see in cpuinfo the frequency going up and down.

Yes, the "frequency" which is reported here is how it "feels", kind of a normalized variant of
x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x x x x x x x x
------------------------------------------------>t

As these "stops" don't last for long periods of time, it is quite correct to say that the CPU only executes half as much instructions during one second, so it runs at "half frequency".

Dominik

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw
Quoted 10 lines

Yes, the "frequency" which is reported here is how it "feels", kind of a normalized variant of
x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x x x x x x x x
------------------------------------------------>t

As these "stops" don't last for long periods of time, it is quite correct to say that the CPU only executes half as much instructions during one second, so it runs at "half frequency".

Hi,
ok, it's clear. But isn't it true that in the periods with clock stopped
the CPU consumes much less power than in those with clock running ? Why there is no at least slight power saving effect then?
BTW I'm experiencing the same. p4-clockmod also doesn't save power on my
Clevo D610SU notebook.
With regards, Pavel Troller

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): [email protected]

#17 lore raw
Quoted 3 lines

Hi,
ok, it's clear. But isn't it true that in the periods with clock stopped
the CPU consumes much less power than in those with clock running ?

Yes, indeed. However, it consumes exactly the same amount of energy as if it were in an "idle state" (ACPI C-States). And that's entered automatically if there is nothing for the CPU to do. As a typical CPU in a typical notebook only has something to do for 5% of the time, throttling to 75%, for example, means the CPU is:

	working		 5%
	idling		20%
	throttling	75%

moving "time" around from idling to throttling or the other way around doesn't matter anything. If you use CPU frequency scaling, though, the "working" part consumes less CPU power. Also, the "idle state" typically consumes less power if the CPU frequency and voltage was scaled down.

Dominik

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): [email protected]

#19 lore raw
Quoted 13 lines · Dominik Brodowski
Quoted 3 lines

Hi,
ok, it's clear. But isn't it true that in the periods with clock stopped
the CPU consumes much less power than in those with clock running ?

Yes, indeed. However, it consumes exactly the same amount of energy as if it were in an "idle state" (ACPI C-States). And that's entered automatically if there is nothing for the CPU to do. As a typical CPU in a typical notebook only has something to do for 5% of the time, throttling to 75%, for example, means the CPU is:
working 5%
idling 20%
throttling 75%

Quoted 4 lines

moving "time" around from idling to throttling or the other way around doesn't matter anything. If you use CPU frequency scaling, though, the "working" part consumes less CPU power. Also, the "idle state" typically consumes less power if the CPU frequency and voltage was scaled down.

To sum up, I am screwed I guess :\ Since the speedstep* don't work for me... No long battery life for me...

Thanks for your explanations.

Quoted 2 lines

Dominik

fred

Quoted 1 line

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): 9cfa150205091904396e66c2ea-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#21 lore raw
Quoted 6 lines · Fred Blaise
Quoted 4 lines

moving "time" around from idling to throttling or the other way around doesn't matter anything. If you use CPU frequency scaling, though, the "working" part consumes less CPU power. Also, the "idle state" typically consumes less power if the CPU frequency and voltage was scaled down.

To sum up, I am screwed I guess :\ Since the speedstep* don't work for me... No long battery life for me...

Or find out why it doesn't work.

#22 lore raw
In reply to a message not in the archive
Quoted 2 lines · Fred Blaise

To sum up, I am screwed I guess :\ Since the speedstep* don't work for me... No long battery life for me...

Centrino cpustep didn't work for me either, but acpi-cpufreq does. Have you tried it?

-- Johan

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): m2k6hdqlyi.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/[email protected]

#24 lore raw
Quoted 7 lines · Johan Vromans
Quoted 2 lines · Fred Blaise

To sum up, I am screwed I guess :\ Since the speedstep* don't work for me... No long battery life for me...

Centrino cpustep didn't work for me either, but acpi-cpufreq does. Have you tried it?

Just did...
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.10fb/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko):
No such device

I haven't done any research on that yet, so this will be for later.

Thanks all for the time and help.

Quoted 2 lines

-- Johan

fred

Quoted 12 lines

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Acpi-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-devel

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#25 lore raw
In reply to a message not in the archive

Hi,

Quoted 9 lines · Fred Blaise
Quoted 8 lines · Dominik Brodowski

Hi,

Quoted 5 lines · Fred Blaise

I have an dell inspiron 5150, 3Ghz. I have loaded p4_clockmod, and my CPU frequency now changes with powernowd. It seems to work well.

However, I am not seeing any battery life improvement.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Any ideas?

Yes. In general, throttling doesn't improve battery life, only CPU frequency scaling does:

ok.. So the fact that my CPU goes down to 383Mghz instead of the normal 3Ghz is not frequency scaling? (pardon the noob that I am if this question doesn't make sense)

Exactly. In fact, the frequency rate is not changed, it is only stopped for short periods of time.

3 Ghz : x x x x x x x x x x x x x x x x
scaling to 1.5 GHz: x x x x x x x x
throttling to 1.5 : x x x x x x x x x

			-------------------------------> t
			[x] denotes an instruction is executed by the CPU

If either the acpi-cpufreq or one of the speedstep-* modules works, you should use that instead of p4-clockmod -- these offer (under normal circumstances) CPU frequency scaling, while p4-clockmod only offers throttling.

Dominik

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php