Skip to contentSkip to conversation

Power consumption HZ100, HZ250, HZ1000: new numbers

DISCUSSION Marc Ballarin 30 participants 80 messages Jul 29, 2005 – Aug 11, 2005

lore
Share & tools
lore
#0 lore raw

Hi,
I was finally able to get C3 state working. It seems that my BIOS is leaving USB controllers in an active state(?). Without any USB drivers loaded, C3 is not possible. With drivers loaded, but no device plugged in C3 works fine. Kernel is 2.6.13-rc3-mm3 + acpi-sbs.

With working C3 there are indeed differences:

Voltage is 16.5 V

HZ=100:  ~460 mA => 7.59 W
HZ=250:  ~468 mA => 7.72 W
HZ=1000: ~494 mA => 8.15 W

Results are quite stable.

Test environment:
- Pentium M 1.60GHz, model 13, stepping 6
- ondemand governor with acpi-cpufreq (idle at 600MHz)
- no daemons running
- no external devices attached, except display
- WLAN disabled via kill switch
- internal display disabled
- hard disk in sleep mode (hdparm -Y), data dumped to ramfs
- kernel configuration attached

Regards

#1 lore raw
Quoted 1 line · Marc Ballarin

- no daemons running

What kind of results do you get with a more realistic setup, like running KDE or Gnome OOTB?

Lee

#2 lore raw
Quoted 4 lines · On Fri, 29 Jul 2005 19:15:42 -0400 Lee Revell <[email protected]> wrote:

What kind of results do you get with a more realistic setup, like running KDE or Gnome OOTB?

Here are results with KDE running.

- no peripherals attached, i.e. truly mobile setup.
- all modules loaded
- klaptopdaemon disabled in order to eliminate competition in polling the already slow battery controller
- furthermore, I found that artsd prevents entering C3 and generally increases power consumption (ALSA, snd_intel8x0)
- voltage is 16.5V

Since the results aren't as stable as in the minimal setup (especially with HZ=1000), I'll post raw numbers and averages:

HZ=100: HZ=1000: DIFF:

1) averages:

backlight on, artsd off:
765.00 812.12 42.12

backlight off, arstd off:
637.17 679.67 42.5

backlight on, artsd on:
927.60 933.33 5.73

backlight off, artsd on:
799.46 806.13 6.67

2) raw numbers:

771 mA <= backlight on   801 mA <= backlight on
764 mA                   818 mA
763 mA                   832 mA
763 mA                   817 mA
764 mA                   796 mA
766 mA                   828 mA
764 mA                   831 mA
635 mA <= backlight off  824 mA
635 mA                   795 mA
635 mA                   801 mA
636 mA                   816 mA
636 mA                   797 mA
646 mA                   816 mA
638 mA                   799 mA
637 mA                   817 mA
639 mA                   801 mA
634 mA                   817 mA
637 mA                   668 mA <= backlight off
636 mA                   690 mA
637 mA                   671 mA
764 mA <= backlight on   692 mA
771 mA                   668 mA
929 mA <= artsd started  689 mA
924 mA                   673 mA
942 mA                   711 mA
927 mA                   668 mA
925 mA                   668 mA
926 mA                   689 mA
925 mA                   672 mA
926 mA                   677 mA
923 mA                   672 mA
929 mA                   689 mA
797 mA <= backlight off  672 mA
800 mA                   687 mA
800 mA                   669 mA
813 mA                   687 mA
799 mA                   673 mA
797 mA                   688 mA
798 mA                   668 mA
799 mA                   722 mA <= backlight on
800 mA                   833 mA <= artsd started
797 mA                   929 mA
799 mA                   928 mA
797 mA                   943 mA
797 mA                   929 mA
932 mA <= backlight on   947 mA
                         929 mA
                         929 mA
                         935 mA
                         928 mA
                         945 mA
                         929 mA
                         929 mA
                         809 mA  <= backlight off
                         799 mA
                         814 mA
                         799 mA
                         816 mA
                         799 mA
                         817 mA
                         799 mA
                         805 mA
                         799 mA
                         813 mA
                         800 mA
                         813 mA
                         800 mA
                         817 mA
                         799 mA
                         947 mA <= backlight on
#3 lore raw
Quoted 20 lines · Marc Ballarin
Quoted 4 lines · On Fri, 29 Jul 2005 19:15:42 -0400 Lee Revell <[email protected]> wrote:

What kind of results do you get with a more realistic setup, like running KDE or Gnome OOTB?

Here are results with KDE running.

- no peripherals attached, i.e. truly mobile setup.
- all modules loaded
- klaptopdaemon disabled in order to eliminate competition in polling the already slow battery controller
- furthermore, I found that artsd prevents entering C3 and generally increases power consumption (ALSA, snd_intel8x0)
- voltage is 16.5V

HZ=100: HZ=1000: DIFF:

Quoted 7 lines

1) averages:

backlight off, arstd off:
637.17 679.67 42.5

backlight off, artsd on:
799.46 806.13 6.67

So it looks like artsd wastes way more power DMAing a bunch of silent pages to the sound card than HZ=1000.

There's nothing the ALSA layer can do about this, it's a KDE bug.

I think this is a good argument for leaving HZ at 1000 until some of these userspace bugs are fixed.

Lee

#4 lore raw
Quoted 7 lines · Lee Revell

So it looks like artsd wastes way more power DMAing a bunch of silent pages to the sound card than HZ=1000.

There's nothing the ALSA layer can do about this, it's a KDE bug.

I think this is a good argument for leaving HZ at 1000 until some of these userspace bugs are fixed.

It's already 'fixed' just set artsd to release the sound device after some idle time. It's in the "Auto-Suspend" seection of the KDE sound system control module.

#5 lore raw
Quoted 5 lines · Zwane Mwaikambo
Quoted 3 lines · Lee Revell

So it looks like artsd wastes way more power DMAing a bunch of silent pages to the sound card than HZ=1000.

Quoted 9 lines
Quoted 4 lines

There's nothing the ALSA layer can do about this, it's a KDE bug.

I think this is a good argument for leaving HZ at 1000 until some of these userspace bugs are fixed.

It's already 'fixed' just set artsd to release the sound device after some idle time. It's in the "Auto-Suspend" seection of the KDE sound system control module.

It's useless if not enabled by default.

Lee

#6 lore raw
In reply to Zwane Mwaikambo
Quoted 5 lines · Zwane Mwaikambo
Quoted 3 lines · Lee Revell

So it looks like artsd wastes way more power DMAing a bunch of silent pages to the sound card than HZ=1000.

Quoted 8 lines
Quoted 4 lines

There's nothing the ALSA layer can do about this, it's a KDE bug.

I think this is a good argument for leaving HZ at 1000 until some of these userspace bugs are fixed.

It's already 'fixed' just set artsd to release the sound device after some idle time. It's in the "Auto-Suspend" seection of the KDE sound system control module.

I suspect that the failure to enable this by default is a relic of the pre-dmix era, when access to the sound device was exclusive, to prevent another app from grabbing it in the interim.

Of course this behavior is completely unnecessary with ALSA 1.0.9 or later, as the default PCM uses dmix so the above scenario would not block the sound card.

Anyway, KDE does not need to release the sound device to prevent this. Simply stopping the PCM should be enough.

Lee

#7 lore raw
In reply to Zwane Mwaikambo
Quoted 7 lines · Zwane Mwaikambo
Quoted 1 line · Lee Revell

So it looks like artsd wastes way more power DMAing a bunch of silent

It's already 'fixed' just set artsd to release the sound device after some idle time. It's in the "Auto-Suspend" seection of the KDE sound system control module.

Just to verify that this option works:

1. Using a non hardware mixing device intel8x0, set it to release the sound device after 5 seconds.

2. In 10 seconds, use aplay or xmms (in ALSA mode, not artsd) to play a sound.

3. Then, while the sound is playing, do something that would make KDE play a sound.

#2 should fail with -EBUSY and you should hear the #3 sound. If #2 succeeds and #3 fails then KDE is broken IMHO.

Lee

#8 lore raw
In reply to Lee Revell

Hi!

Quoted 24 lines
Quoted 16 lines
Quoted 3 lines

What kind of results do you get with a more realistic setup, like running KDE or Gnome OOTB?

Here are results with KDE running.

- no peripherals attached, i.e. truly mobile setup.
- all modules loaded
- klaptopdaemon disabled in order to eliminate competition in polling the already slow battery controller
- furthermore, I found that artsd prevents entering C3 and generally increases power consumption (ALSA, snd_intel8x0)
- voltage is 16.5V

HZ=100: HZ=1000: DIFF:

Quoted 7 lines

1) averages:

backlight off, arstd off:
637.17 679.67 42.5

backlight off, artsd on:
799.46 806.13 6.67

Quoted 7 lines

So it looks like artsd wastes way more power DMAing a bunch of silent pages to the sound card than HZ=1000.

There's nothing the ALSA layer can do about this, it's a KDE bug.

I think this is a good argument for leaving HZ at 1000 until some of these userspace bugs are fixed.

WTF? HZ=1000 eats energy like crazy. artsd eats energy like crazy. And you advocate breaking kernel because artsd is broken?!
Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#9 lore raw
Quoted 5 lines · Pavel Machek
Quoted 2 lines

I think this is a good argument for leaving HZ at 1000 until some of these userspace bugs are fixed.

WTF? HZ=1000 eats energy like crazy. artsd eats energy like crazy. And you advocate breaking kernel because artsd is broken?!

Maybe I am showing my ignorance as a non-laptop user. Is 6.67mW a really big difference?

Lee

#10 lore raw

Hi!

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I think this is a good argument for leaving HZ at 1000 until some of these userspace bugs are fixed.

WTF? HZ=1000 eats energy like crazy. artsd eats energy like crazy. And you advocate breaking kernel because artsd is broken?!

Maybe I am showing my ignorance as a non-laptop user. Is 6.67mW a really big difference?

First numbers were 0.5W on idle system; that shows what kind of powersaving can be done. Powersaving is no longer possible when artsd is not running, but that should not be used as argument against it.

Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#11 lore raw
Quoted 3 lines · Pavel Machek

First numbers were 0.5W on idle system; that shows what kind of powersaving can be done. Powersaving is no longer possible when artsd is not running, but that should not be used as argument against it.

It was an idle system with no display, zero daemons running, and the hard drive off. In other words, a machine that nobody could use which might as well be hibrinating. While it was an important test to find out the most one could hope to save, its unrealistic for an actual usage case. The later test was more realistic, and not suprisingly showed quite a bit less power savings.

I really like having 250HZ as an _option_, but what I don't see is why it should be the _default_. I believe this is Lee's position as well. Last I checked, ACPI and CPU speed scaling were not enabled by default; If users are willing to change all those other options, why can't we expect them to select 250HZ/100HZ? Instead, we are quadrupling latency for desktop users (for little or no power savings), just so that laptop users can save enabling one option out of the many they already need to change.

I have a fixed-framerate app that had to busywait in the days of 2.4.x.
It was nice in 2.6.x to not have to busywait, but with 250HZ that code
will be coming back again. And unfortunately this app can't be made variable-framerate, as it is simulating video hardware. The same goes for apps playing movies/animations; Sometimes programs just need a semi-accurate sleep, and can't demand root priveledges to get it.

I remember that 1000HZ was chosen in part so that fewer people would complain about the need for the Posix highres timers. Well now that 1000HZ is going away, can we have our highres timers or not? My guess is no. Thus we've predictably come back out here to complain. All we're asking is that the default value be left alone until tick-skipping approaches and/or highres timers are given a chance to work. That way we can see if we can find a solution that truly makes everyone happy.

In a sense I feel this whole thing boils down to the fact that we don't have something like "make laptop-config" and "make server-config". I'm glad we could save 5.2% of the power for a laptop user by changing the defaults (as long as you remember to change other options too). However I'm not sure it should come at the expense of those doing video or audio on a desktop. Right now with the one-size-fits-all defaults, we end up having to make that tradeoff.

- Jim Bruce

#12 lore raw

Hi!

Quoted 10 lines
Quoted 3 lines

First numbers were 0.5W on idle system; that shows what kind of powersaving can be done. Powersaving is no longer possible when artsd is not running, but that should not be used as argument against it.

It was an idle system with no display, zero daemons running, and the hard drive off. In other words, a machine that nobody could use which might as well be hibrinating. While it was an important test to find out the most one could hope to save, its unrealistic for an actual usage case. The later test was more realistic, and not suprisingly showed quite a bit less power savings.

Then the second test was probably flawed, possibly because we have some more work to do. No display is irrelevant, HZ=100 will still save 0.5W with running display. Spinning disk also does not produce CPU load (and we *will* want to have disk spinned down). No daemons... if some daemon wakes every msec, we want to fix the daemon.

Quoted 3 lines

I really like having 250HZ as an _option_, but what I don't see is why it should be the _default_. I believe this is Lee's position as Last I checked, ACPI and CPU speed scaling were not enabled by default;

Kernel defaults are irelevant; distros change them anyway. [But we probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

Quoted 6 lines

I have a fixed-framerate app that had to busywait in the days of 2.4.x.
It was nice in 2.6.x to not have to busywait, but with 250HZ that code
will be coming back again. And unfortunately this app can't be made variable-framerate, as it is simulating video hardware. The same goes for apps playing movies/animations; Sometimes programs just need a semi-accurate sleep, and can't demand root priveledges to get it.

I really don't think default HZ in kernel config is such a big deal. You'll want to support HZ=100 on 2.6.X, anyway...

Quoted 4 lines

In a sense I feel this whole thing boils down to the fact that we don't have something like "make laptop-config" and "make server-config". I'm glad we could save 5.2% of the power for a laptop user by changing the

defconfig on i386 is Linus' configuration. Maybe server-config and laptop-config would be good idea...
Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#13 lore raw
Quoted 3 lines · Pavel Machek

[But we
probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

Sorry, this is just ridiculous. You're saying 99% of Linux installations are laptops? Bullshit.

Lee

#14 lore raw
Quoted 7 lines · Lee Revell
Quoted 3 lines · Pavel Machek

[But we
probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

Sorry, this is just ridiculous. You're saying 99% of Linux installations are laptops? Bullshit.

I believe he's talking about the future (he did said "will"). All the new AMD64 desktop chips have powersaving now, and Intel chips either have it now or will soon. With the power that desktop chips draw nowadays (some are 80+ watts at idle), it is an important consideration.
As for uptake, a realistic number would be probably be 90% in three years.

Of course regardless of that I'd still like to keep the 1msec sleep resolution...

- Jim

#15 lore raw
In reply to Lee Revell

Hi!

Quoted 6 lines
Quoted 3 lines

[But we
probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

Sorry, this is just ridiculous. You're saying 99% of Linux installations are laptops? Bullshit.

No, I'm saying that 99% users enable ACPI and cpufreq. ACPI is needed on new machines, and cpufreq is usefull to keep your desktop cold, too.

Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#16 lore raw
Quoted 3 lines · In article <[email protected]> you wrote:

No, I'm saying that 99% users enable ACPI and cpufreq. ACPI is needed on new machines, and cpufreq is usefull to keep your desktop cold, too.

And with the recent ongoing packing of CPU cores into racks, it is even more so important for Servers.

Gruss
Bernd

#17 lore raw
In reply to Pavel Machek
Quoted 2 lines · Pavel Machek

and cpufreq is usefull to keep your desktop cold, too.

But I don't want my desktop cold!!! That would ruin its usefulness as a 400W dorm space-heater!!! :-D

*starts boinc client running in the background*

Cheers,
Kyle Moffett

--
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.
-- C.A.R. Hoare

#18 lore raw
In reply to Lee Revell
Quoted 7 lines · Lee Revell
Quoted 3 lines · Pavel Machek

[But we
probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

Sorry, this is just ridiculous. You're saying 99% of Linux installations are laptops? Bullshit.

I'm not a laptop user, yet I'm using cpufreq on my Sempron 2500+.
cpufreq-nforce2 switching between 1,23 and 1,75 GHz makes 8-10 Celsius' degrees difference on CPU temperature.

Signature · 2 lines
Tomasz Torcz            There exists no separation between gods and men:
[email protected]   one blends softly casual into the other.
#19 lore raw
In reply to Pavel Machek
Quoted 5 lines · Pavel Machek
Quoted 3 lines

I really like having 250HZ as an _option_, but what I don't see is why it should be the _default_. I believe this is Lee's position as Last I checked, ACPI and CPU speed scaling were not enabled by default;

Kernel defaults are irelevant; distros change them anyway.

OK, so HZ should be left at 1000 so "make oldconfig" continues to do the right thing. It is supposed to give me my old config, right?

Lee

#20 lore raw
In reply to Pavel Machek
Quoted 2 lines · Pavel Machek

defconfig on i386 is Linus' configuration. Maybe server-config and laptop-config would be good idea...

Um, what about those things called "desktops"? They're like a laptop but with reasonable hard drive speeds and adult-sized keyboards?

Lee

#21 lore raw
Quoted 6 lines · Lee Revell
Quoted 2 lines · Pavel Machek

defconfig on i386 is Linus' configuration. Maybe server-config and laptop-config would be good idea...

Um, what about those things called "desktops"? They're like a laptop but with reasonable hard drive speeds and adult-sized keyboards?

Pavel picked up that (incomplete) list up from my email, and I was just assuming defconfig to be the desktop config. If that feature were done cleanly though, we could have any number of blah-configs, and maybe even split desktops into low-latency or low-resources options. It'd be neat to get preempt and everything on just by saying:
make desktop-lowlatency-config
Then again, maybe that idea will fly like pigs; we'll see.

- Jim Bruce

#22 lore raw
In reply to Pavel Machek
Quoted 9 lines · Pavel Machek
Quoted 4 lines

I really like having 250HZ as an _option_, but what I don't see is why it should be the _default_. I believe this is Lee's position as Last I checked, ACPI and CPU speed scaling were not enabled by default;

Kernel defaults are irelevant; distros change them anyway. [But we probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

If the kernel defaults are irrelevant, then it would make more sense to leave the default HZ as 1000 and not to enable the cpufreq and ACPI in order to keep with the principle of least surprise for people who do use kernel.org kernels.

Jim.

#23 lore raw

Hi!

Quoted 9 lines
Quoted 8 lines
Quoted 3 lines

I really like having 250HZ as an _option_, but what I don't see is why it should be the _default_. I believe this is Lee's position as Last I checked, ACPI and CPU speed scaling were not enabled by default;

Kernel defaults are irelevant; distros change them anyway. [But we probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

Quoted 4 lines

If the kernel defaults are irrelevant, then it would make more sense to leave the default HZ as 1000 and not to enable the cpufreq and ACPI in order to keep with the principle of least surprise for people who do use kernel.org kernels.

Well, I'd say you want ACPI enabled. New machine do not even boot without that. Default config should be usefull; set ACPI off, and you'll not be able to even power machine down.
Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#24 lore raw
Quoted 11 lines · Pavel Machek

Hi!

Quoted 9 lines
Quoted 8 lines
Quoted 3 lines

I really like having 250HZ as an _option_, but what I don't see is why it should be the _default_. I believe this is Lee's position as Last I checked, ACPI and CPU speed scaling were not enabled by default;

Kernel defaults are irelevant; distros change them anyway. [But we probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

Quoted 8 lines
Quoted 4 lines

If the kernel defaults are irrelevant, then it would make more sense to leave the default HZ as 1000 and not to enable the cpufreq and ACPI in order to keep with the principle of least surprise for people who do use kernel.org kernels.

Well, I'd say you want ACPI enabled. New machine do not even boot without that. Default config should be usefull; set ACPI off, and you'll not be able to even power machine down.

While it's good to be future proof, I don't think it's valid to assume that new kernels usually run on new hardware.

Lee

#25 lore raw
In reply to Pavel Machek
Quoted 8 lines · Pavel Machek
Quoted 4 lines

If the kernel defaults are irrelevant, then it would make more sense to leave the default HZ as 1000 and not to enable the cpufreq and ACPI in order to keep with the principle of least surprise for people who do use kernel.org kernels.

Well, I'd say you want ACPI enabled. New machine do not even boot without that. Default config should be usefull; set ACPI off, and you'll not be able to even power machine down.

And there are older machines that won't boot with it enabled. The machine I'm typing this on has a really shitty ACPI implementation, I don't remember the details because it's been so long but I know that I have to disable ACPI for it to work right.

I'm not saying defconfig should never be changed, but changing what can and will cause noticeable breakage should be avoided if possible. And in this case it doesn't seem to me that the benefits of changing HZ in the middle of a "stable" series outweigh the added latency.

Quoted 1 line

Pavel

Jim.

#26 lore raw

Hi!

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

If the kernel defaults are irrelevant, then it would make more sense to leave the default HZ as 1000 and not to enable the cpufreq and ACPI in order to keep with the principle of least surprise for people who do use kernel.org kernels.

Quoted 8 lines
Quoted 3 lines

Well, I'd say you want ACPI enabled. New machine do not even boot without that. Default config should be usefull; set ACPI off, and you'll not be able to even power machine down.

And there are older machines that won't boot with it enabled. The machine I'm typing this on has a really shitty ACPI implementation, I don't remember the details because it's been so long but I know that I have to disable ACPI for it to work right.

If it was long ago, you probably want to try again and file a bug report if still broken.

Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#27 lore raw
Quoted 8 lines · Pavel Machek
Quoted 5 lines

And there are older machines that won't boot with it enabled. The machine I'm typing this on has a really shitty ACPI implementation, I don't remember the details because it's been so long but I know that I have to disable ACPI for it to work right.

If it was long ago, you probably want to try again and file a bug report if still broken.

I may do that, but I don't need ACPI on the machine so I've just always disabled it and figured it was a BIOS problem that won't be fixed since there have been no BIOS updates for this board since '03.

Quoted 1 line

Pavel

Jim.

#28 lore raw
In reply to Jim Crilly
Quoted 11 lines · Jim Crilly
Quoted 7 lines · Pavel Machek
Quoted 2 lines

I really like having 250HZ as an _option_, but what I don't see is why it should be the _default_. I believe this is Lee's position as Last I checked, ACPI and CPU speed scaling were not enabled by default;

Kernel defaults are irelevant; distros change them anyway. [But we probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

Quoted 6 lines

If the kernel defaults are irrelevant, then it would make more sense to leave the default HZ as 1000 and not to enable the cpufreq and ACPI in order to keep with the principle of least surprise for people who do use kernel.org kernels.

Jim.

Thank you Jim, Plauger's "law of least astonishment."

#29 lore raw
In reply to Pavel Machek
Quoted 5 lines · Pavel Machek

Then the second test was probably flawed, possibly because we have some more work to do. No display is irrelevant, HZ=100 will still save 0.5W with running display. Spinning disk also does not produce CPU load (and we *will* want to have disk spinned down). No daemons... if some daemon wakes every msec, we want to fix the daemon.

I was talking about percentage saved; That 5.2% easily drops below 2% once other things start sucking up power. I was thinking that way since the percentage saved is what determines the overall battery life increase. You're right in that the absolute power draw difference should stay the same, and that seems to be the case is Marc's tests (ignoring the brokenness of artsd).

Quoted 3 lines

Kernel defaults are irelevant; distros change them anyway. [But we probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

True, but I think a lot of distros treat the values as recommendations.
I guess we'll find out what they do with this option soon enough.

Quoted 4 lines
Quoted 1 line

I have a fixed-framerate app that had to busywait in the days of 2.4.x. It was nice in 2.6.x to not have to busywait, but with 250HZ that code will be coming back again. And unfortunately this app can't be made variable-framerate, as it is simulating video hardware. The same goes for apps playing movies/animations; Sometimes programs just need a semi-accurate sleep, and can't demand root priveledges to get it.

I really don't think default HZ in kernel config is such a big deal. You'll want to support HZ=100 on 2.6.X, anyway...

Yeah, but if its only the default value for servers and laptops they won't normally be running my app. I'll be truly happy the day I can delete all the busy-waiting code, as I think its about the ugliest workaround in modern computing.

Quoted 2 lines

defconfig on i386 is Linus' configuration. Maybe server-config and laptop-config would be good idea...

Well maybe if we can get enough people who agree then it could happen. I think a "laptop-config" and "server-config" file could fit nicely into the current arch/*/config/ directory structure. I'm not sure how those defconfig files are kept up to date though.

- Jim

#30 lore raw

Hi!

Quoted 6 lines
Quoted 5 lines

Then the second test was probably flawed, possibly because we have some more work to do. No display is irrelevant, HZ=100 will still save 0.5W with running display. Spinning disk also does not produce CPU load (and we *will* want to have disk spinned down). No daemons... if some daemon wakes every msec, we want to fix the daemon.

Quoted 6 lines

I was talking about percentage saved; That 5.2% easily drops below 2% once other things start sucking up power. I was thinking that way since the percentage saved is what determines the overall battery life increase. You're right in that the absolute power draw difference should stay the same, and that seems to be the case is Marc's tests (ignoring the brokenness of artsd).

You are right at that, but .5W is still about as much as hard disk spinning. And newer CPUs are likely to benefit more from HZ=100.

Quoted 6 lines
Quoted 3 lines

Kernel defaults are irelevant; distros change them anyway. [But we probably want to enable ACPI and cpufreq by default, because that matches what 99% of users will use.]

True, but I think a lot of distros treat the values as recommendations.
I guess we'll find out what they do with this option soon enough.

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#31 lore raw
Quoted 3 lines · Pavel Machek

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

Lee

#32 lore raw

Hi!

Quoted 7 lines
Quoted 3 lines

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

So you busy wait for 1msec, big deal. Some machines can't even keep time properly with HZ=1000. Official recommendation is likely "help us with CONFIG_NO_IDLE_HZ" or "get over it".
Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#33 lore raw
Quoted 11 lines · Pavel Machek

Hi!

Quoted 7 lines
Quoted 3 lines

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

So you busy wait for 1msec, big deal.

Which requires changing all those apps. I thought we tried not to break userspace with minor kernel version upgrades.

Quoted 1 line

Some machines can't even keep time properly with HZ=1000.

If your workaround for broken hardware involves screwing over people with good hardware, it might be the wrong workaround.

Quoted 2 lines

Official recommendation is likely "help us
with CONFIG_NO_IDLE_HZ" or "get over it".

IOW, "if you don't like it, get another distro, or compile your own kernel".

Lee

#34 lore raw

Hi!

Quoted 11 lines
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

So you busy wait for 1msec, big deal.

Which requires changing all those apps.

...which you have to do anyway for 2.4 compatibility.
Pavel

Signature · 1 line
if you have sharp zaurus hardware you don't need... you know my address
#35 lore raw
In reply to Lee Revell
Quoted 13 lines · Lee Revell
Quoted 11 lines · Pavel Machek

Hi!

Quoted 7 lines
Quoted 3 lines

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

Quoted 5 lines
Quoted 1 line

So you busy wait for 1msec, big deal.

Which requires changing all those apps. I thought we tried not to break userspace with minor kernel version upgrades.

Sounds like you were wrong.

This whole thing is silly, I'm very aware of battery life issues, but in real ues we are talking about maybe 3% more battery life. People who are totally anal about it will build their own kernel, or use a vendor kernel with varioble tick rate, but saving <2BTU/hr is not going to let anyone buy a smaller A/C unit. The computer user gives off way more than that.

I would leave it at 1k and push for variable tick, which should make everyone happy.

Quoted 18 lines
Quoted 3 lines

Some machines can't even keep time properly with HZ=1000.

If your workaround for broken hardware involves screwing over people with good hardware, it might be the wrong workaround.

Quoted 2 lines

Official recommendation is likely "help us
with CONFIG_NO_IDLE_HZ" or "get over it".

IOW, "if you don't like it, get another distro, or compile your own kernel".

Lee

#36 lore raw
In reply to Lee Revell
Quoted 8 lines · Lee Revell
Quoted 3 lines · Pavel Machek

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

MPlayer is using /dev/rtc and was running smooth for me since the good old 2.4 days.

Signature · 1 line
Stefan Seyfried
#37 lore raw
Quoted 6 lines · Stefan Seyfried
Quoted 3 lines

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

MPlayer is using /dev/rtc and was running smooth for me since the good old 2.4 days.

MPlayer cares more about unbroken sound drivers, since the video needs to run at the speed of your sound boards oscillator if you don't want sound and video to run at different rates.
Unfortunately people use an almost random mix of alsa, alsa-lib and .asoundrc setups, including me, mplayer through dmix is one jitter-fest, mplayer straight to the alsa pcm device works better, but of course using the oss emulation seems to work best of all :-)

I never noticed any difference during 2.4 between using rtc and not using rtc.

#38 lore raw
Quoted 7 lines · Jan Knutar

MPlayer cares more about unbroken sound drivers, since the video needs to run at the speed of your sound boards oscillator if you don't want sound and video to run at different rates.
Unfortunately people use an almost random mix of alsa, alsa-lib and .asoundrc setups, including me, mplayer through dmix is one jitter-fest, mplayer straight to the alsa pcm device works better, but of course using the oss emulation seems to work best of all :-)

Because mplayer's ALSA code is broken.

Lee

#39 lore raw
In reply to Stefan Seyfried
Quoted 6 lines · Stefan Seyfried
Quoted 5 lines · Lee Revell
Quoted 3 lines · Pavel Machek

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Quoted 6 lines
Quoted 3 lines

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

MPlayer is using /dev/rtc and was running smooth for me since the good old 2.4 days.

VMware also uses /dev/rtc. So is NTP, which is needed when time drifts.
But they can't use /dev/rtc simultanously, as it's single-open device. So running ntpd denies vmware and mplayer access to RTC. Bummer.

Signature · 2 lines
Tomasz Torcz            There exists no separation between gods and men:
[email protected]   one blends softly casual into the other.
#40 lore raw
Quoted 11 lines · Tomasz Torcz
Quoted 10 lines · Stefan Seyfried
Quoted 8 lines · Lee Revell
Quoted 3 lines · Pavel Machek

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

Quoted 7 lines
Quoted 2 lines

MPlayer is using /dev/rtc and was running smooth for me since the good old 2.4 days.

VMware also uses /dev/rtc. So is NTP, which is needed when time drifts.
But they can't use /dev/rtc simultanously, as it's single-open device. So running ntpd denies vmware and mplayer access to RTC. Bummer.

You could work around this to some extent by using the ALSA timer API with the RTC timer. I think this allows multiple open by setting the RTC to tick based on the lowest common denominator. It won't help vmware and NTP though.

Lee

#41 lore raw
In reply to Lee Revell
Quoted 8 lines · Lee Revell
Quoted 3 lines · Pavel Machek

I'm pretty sure at least one distro will go with HZ<300 real soon now ;-).

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

Calm down. Any argument along the lines of the change of a default value in the defconfig screwing people over equally applies the other way around; by not changing the defconfig, you're screwing laptop users (and others that want less power consumption) over. The world is not black and white, it's a very boring gray (or a very sadening bloody red; but I hope we won't come to that point just because of a silly argument on lkml...)

In the end, Linus will decide this anyway. I can understand that you don't want to change your application. Help developing the dynamic tick patch, and maybe you won't have to =)

Regards: David Weinehall

Signature · 3 lines
 /) David Weinehall <[email protected]> /) Northern lights wander      (\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\)  http://www.acc.umu.se/~tao/    (/   Full colour fire           (/
#42 lore raw
Quoted 6 lines · David Weinehall
Quoted 3 lines · Lee Revell

Any idea what their official recommendation for people running apps that require the 1ms sleep resolution is? Something along the lines of "Get bent"?

Calm down.

Yes, Lee needs to chill a bit. I'll hopefully explain our position calmly enough below.

Quoted 7 lines

Any argument along the lines of the change of a default value in the defconfig screwing people over equally applies the other way around; by not changing the defconfig, you're screwing laptop users (and others that want less power consumption) over. The world is not black and white, it's a very boring gray (or a very sadening bloody red; but I hope we won't come to that point just because of a silly argument on lkml...)

The tradeoff is a realistic 4.4% power savings vs a 300% increase in the minimum sleep period. A user will see zero power savings if they have a USB mouse (probably 99% of desktops). On top of that, we can throw in Con's disturbing AV benchmark results (1). As a result, some of us don't think 250HZ is a great tradeoff to make _for_the_default_value_.

(1) http://article.gmane.org/gmane.linux.kernel/319124/

Quoted 3 lines

In the end, Linus will decide this anyway. I can understand that you don't want to change your application. Help developing the dynamic tick patch, and maybe you won't have to =)

From what I can tell, tick skipping works fine right now, it just needs some cleanup. Thus I'd expect something like it will get integrated into 2.6.14. If it gets in, the default HZ should go back up to 1000. In that case why decrease it for exactly one patchlevel?

As an app programmer, it'd be nice not to have to support 2.6.13 differently from 2.6.(x!=13). For my app, busy waiting means a ~12% load increase for 2.6.13 compared to (probably) all other 2.6 kernel versions. That's certainly violating the principle of least surprise. Up to now, it was easy enough to tell people "upgrade from 2.4.x and it'll work better". Now it gets more complicated.

Finally, as a conspiracy theorist, I wonder if Linus is just playing us to get more people working on the tick skipping and highres timer patches. Someone with the ability to herd cats obviously has to be sneaky. As an impressive demonstration of my free will I'm going to go test dyntick on my VIA Epia board...

- Jim Bruce

#43 lore raw
Quoted 2 lines · James Bruce

Yes, Lee needs to chill a bit. I'll hopefully explain our position calmly enough below.

I am a bit frustrated because when I first objected to 250HZ as the default, I was told to come up with some numbers. Now we have the numbers, and they overwhelmingly show that 250HZ WILL hurt interactivity and WILL NOT save anyone any power in real life. But now the 250HZ people have changed their position to "yes, we KNOW we're screwing over multimedia users for the sake of laptop users, and we DON'T CARE about your numbers."

Lee

#44 lore raw
In reply to James Bruce
Quoted 6 lines · James Bruce

The tradeoff is a realistic 4.4% power savings vs a 300% increase in the minimum sleep period. A user will see zero power savings if they have a USB mouse (probably 99% of desktops). On top of that, we can throw in Con's disturbing AV benchmark results (1). As a result, some of us don't think 250HZ is a great tradeoff to make _for_the_default_value_.

Most laptops (including mine, a Thinkpad T40) use a PS/2 mouse. So in the places where power consumption savins matters most, it's usually quite possible to function without needing any USB devices. The 90% figure isn't at all right; in fact, it may be that over 90% of the laptops still use PS/2 mice and keyboards.

- Ted

#45 lore raw
Quoted 4 lines · Theodore Ts'o
Quoted 3 lines · James Bruce

The tradeoff is a realistic 4.4% power savings vs a 300% increase in the minimum sleep period. A user will see zero power savings if they have a USB mouse (probably 99% of desktops). On top of that, we can

                                    ^^^^^^^^
Quoted 5 lines

Most laptops (including mine, a Thinkpad T40) use a PS/2 mouse. So in the places where power consumption savins matters most, it's usually quite possible to function without needing any USB devices. The 90% figure isn't at all right; in fact, it may be that over 90% of the laptops still use PS/2 mice and keyboards.

Yes, laptops are mostly PS/2, which is why I only claimed a statistic for desktops. Desktops pretty much all use USB mice now. If 250Hz were only being sold as an option for laptops, we could leave it at that, yet its being pushed as a default that's "good for everyone". For desktops this is not currently true at all. By the time USB is fixed to do power saving, we'll probably have a working tick-skipping patch which makes the whole HZ argument moot.

- Jim Bruce

#46 lore raw
Quoted 13 lines · James Bruce
Quoted 4 lines · Theodore Ts'o
Quoted 3 lines · James Bruce

The tradeoff is a realistic 4.4% power savings vs a 300% increase in the minimum sleep period. A user will see zero power savings if they have a USB mouse (probably 99% of desktops). On top of that, we can

                                    ^^^^^^^^
Quoted 5 lines

Most laptops (including mine, a Thinkpad T40) use a PS/2 mouse. So in the places where power consumption savins matters most, it's usually quite possible to function without needing any USB devices. The 90% figure isn't at all right; in fact, it may be that over 90% of the laptops still use PS/2 mice and keyboards.

Quoted 6 lines

Yes, laptops are mostly PS/2, which is why I only claimed a statistic for desktops. Desktops pretty much all use USB mice now. If 250Hz were only being sold as an option for laptops, we could leave it at that, yet its being pushed as a default that's "good for everyone". For desktops this is not currently true at all. By the time USB is fixed to do power saving, we'll probably have a working tick-skipping patch which makes the whole HZ argument moot.

- Jim Bruce

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Steve

#47 lore raw
Quoted 3 lines · Stephen Clark

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Does anyone really give a shit about saving power on the desktop anyway? This is basically a laptop issue.

Lee

#48 lore raw
Quoted 7 lines · Lee Revell
Quoted 3 lines · Stephen Clark

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Does anyone really give a shit about saving power on the desktop anyway? This is basically a laptop issue.

Eh yes, very much.

Signature · 1 line
Jens Axboe
#49 lore raw
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Does anyone really give a shit about saving power on the desktop anyway? This is basically a laptop issue.

Eh yes, very much.

Indeed. Safe the environment etc.

Folkert van Heusden

Signature · 5 lines
Auto te koop, zie: http://www.vanheusden.com/daihatsu.php
--------------------------------------------------------------------
Get your PGP/GPG key signed at www.biglumber.com!
--------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE
#50 lore raw
Quoted 6 lines · Folkert van Heusden
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Does anyone really give a shit about saving power on the desktop anyway? This is basically a laptop issue.

Quoted 6 lines
Quoted 1 line

Eh yes, very much.

Indeed. Safe the environment etc.

Folkert van Heusden

Computers are nearly 100% efficient as heaters. A computer that consumes 100 watts of power puts out a few milliwatts over a network connection. The rest is heat. For every watt of heat, it takes about 1/8th watt to carry the heat away with modern air-conditioners.

So, just my 100 watt "heater" will cost me about US$18.00 per month if I leave it on continuously. I read somewhere, I think in "Communications", that at any one time there are 40 million personal computers "connected" to the Internet. That's 40,000,000 * 18.00 = US$720,000,000.00 per month being consumed, plus the 720,000,000 / 8 = US$90,000,000 to keep them cool.

It's a MONEY problem, something everybody can understand. It's not an environmental problem at all. The environment can certainly sink the 40,000,000 * 100 = 4,000,000,000 (4 billion) watts of power. That's about the sun's energy falling on a 10 km^2 area of land near the equator, a drop in the bucket.

Ideally, a computer that's not doing any work should not consume any power. However, even if you use static RAM and a low-power CPU, computers have always been power sinks. Recent GHz "advances" have upped the power loss to unprecedented amounts. Anything that can help ameliorate the problem will certainly be appreciated by "the masses".

Cheers,
Dick Johnson
Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips). Warning : 98.36% of all statistics are fiction.
.
I apologize for the following. I tried to kill it with the above dot :

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

#51 lore raw
Quoted 2 lines · linux-os (Dick Johnson)

It's a MONEY problem, something everybody can understand. It's not an environmental problem at all.

It is a huge environmental problem if you're burning fossil fuels to generate that power.

Anyway I didn't mean there's no point trying to save power on the desktop, just that it doesn't seem to be a big concern on LKML. 100% of the arguments I've heard (before posting the above comment) were from the laptop perspective.

Now that it's clear that dynamic tick will be ready soon, this thread has outlived its usefulness, I'd like to let it die.

Lee

#52 lore raw
In reply to Lee Revell
Quoted 6 lines · Lee Revell
Quoted 2 lines · Stephen Clark

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Does anyone really give a shit about saving power on the desktop anyway? This is basically a laptop issue.

Heat has become for Prescott, and will be for every upcoming chipset of the future, a major issue. So yes it will be relevant to everyone.

Cheers,
Con

#53 lore raw
In reply to Lee Revell
Quoted 4 lines · Lee Revell
Quoted 2 lines

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Does anyone really give a shit about saving power on the desktop anyway? This is basically a laptop issue.

Desktops? Screw desktops. (Unless of course you're one of those environmental friendly guys, but then you probably are simply too cheap to buy a SUV too!)

But rather think "data center".

Those guys want maximum cycles per watt. One way of getting there is using less watts when we don't use all cycles. This bring down power consumption, which directly brings down heat production, which brings down A/C needs.

Everyone wants to save power.

Signature · 4 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"
#54 lore raw
Quoted 2 lines · Lars Marowsky-Bree

then you probably are simply too cheap
to buy a SUV too

I have not driven a car since 2001.

Lee

#55 lore raw
In reply to Lars Marowsky-Bree
Quoted 2 lines · Lars Marowsky-Bree

But rather think "data center".

The difference between using our idle cpu cycles for seti@home or just leaving the xeons and opterons idle when they're not crunching away is around $1300 a month (yes, I know it's a big datacenter) slightly more than half that, is the cooling used to remove the heat generated by the machines. the rest is the machines themselves.

Quoted 4 lines

Those guys want maximum cycles per watt. One way of getting there is using less watts when we don't use all cycles. This bring down power consumption, which directly brings down heat production, which brings down A/C needs.

Why pay for power you don't need to use. Why pay for a ups thats bigger then it has to be. Why pay for more hvac then you need. Even now an idle rack of dual opterons 244s is something like 4-5kw, busy is more like 6.8-8kw.

Quoted 1 line

Everyone wants to save power.

or lower their costs, or both.

Quoted 2 lines
Signature · 3 lines
--------------------------------------------------------------------------
Joel Jaeggli  	       Unix Consulting 	       [email protected]
GPG Key Fingerprint:     5C6E 0104 BAF0 40B0 5BD3 C38B F000 35AB B67F 56B2
#56 lore raw
In reply to Lars Marowsky-Bree

Am Dienstag, 2. August 2005 16:20 schrieben Sie:

Quoted 10 lines · Lee Revell
Quoted 5 lines
Quoted 3 lines

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Does anyone really give a shit about saving power on the desktop anyway? This is basically a laptop issue.

Desktops? Screw desktops. (Unless of course you're one of those environmental friendly guys, but then you probably are simply too cheap to buy a SUV too!)

Not fully true. To many desktop people power control means noise control. And that is important.

Regards
Oliver

#57 lore raw
In reply to Lee Revell
Quoted 9 lines · Lee Revell
Quoted 3 lines · Stephen Clark

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Does anyone really give a shit about saving power on the desktop anyway? This is basically a laptop issue.

Power consumption matters to server, desktop, and laptop.

Assuming this is a laptop issue is wildly incorrect.

Jeff

#58 lore raw
Quoted 8 lines · Jeff Garzik
Quoted 7 lines · Lee Revell
Quoted 3 lines · Stephen Clark

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

Quoted 7 lines
Quoted 2 lines

Does anyone really give a shit about saving power on the desktop anyway? This is basically a laptop issue.

Power consumption matters to server, desktop, and laptop.

Assuming this is a laptop issue is wildly incorrect.

I would think you'd get the best power/performance ration from a desktop by just having it suspend after 5 or 10 minutes of idle time.

Oh well, I'll shut up, I've already demonstrated a complete ignorance of new hardware.

Lee

#59 lore raw
Quoted 9 lines · Lee Revell
Quoted 3 lines

Power consumption matters to server, desktop, and laptop.

Assuming this is a laptop issue is wildly incorrect.

I would think you'd get the best power/performance ration from a desktop by just having it suspend after 5 or 10 minutes of idle time.

Oh well, I'll shut up, I've already demonstrated a complete ignorance of new hardware.

Lee, that is a very impressive statement to make in public, and not many people are capable of admitting that they were wrong, or that their focus has been too narrow. It's great to see this discussion has proven instructing to you.

Sincerely,
Lars Marowsky-Brée <[email protected]>

Signature · 4 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"
#60 lore raw
In reply to Stephen Clark
Quoted 1 line · Stephen Clark

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

If it's an old system, it probably doesn't have working ACPI C-states though. Without that, low HZ does not save you anything. I should have said: 99% of desktops with the capability to do ACPI sleep have at least one USB device attached (usually a mouse).

I do like saving power, which is why I run cpu frequency scaling on every machine I have that supports it. I'm happy because it does its savings without negatively impacting latency or high-load performance. By 2.6.14 dyntick should give us the same thing for HZ, which is why I think changing the maximum value now doesn't make sense.

- Jim Bruce

#61 lore raw
Quoted 2 lines · James Bruce

I do like saving power, which is why I run cpu frequency scaling on every machine I have that supports it.

My Athlon XP desktop doesn't support frequency scaling but has working ACPI C-states (at least under Windows) so will run as cool as 31C when idle (with the CPUIdle utility). Most of the heat comes from the hard drives anyway, but that's a different story.

This seems pretty cool to me, how much more power does frequency scaling save over that, assuming you suspend after 5-10 minutes of inactivity anyway?

Lee

#62 lore raw
Quoted 6 lines · Lee Revell
Quoted 2 lines · James Bruce

I do like saving power, which is why I run cpu frequency scaling on every machine I have that supports it.

Quoted 8 lines

My Athlon XP desktop doesn't support frequency scaling but has working ACPI C-states (at least under Windows) so will run as cool as 31C when idle (with the CPUIdle utility). Most of the heat comes from the hard drives anyway, but that's a different story.

This seems pretty cool to me, how much more power does frequency scaling save over that, assuming you suspend after 5-10 minutes of inactivity anyway?

I am a gentoo user an compile a lot of things. I also use freq scaling with my Athlon XP on nforce2 with cpu disconnect enabled.

idle at ~1400MHz: ~135 WATT used by system
full load at ~1400MHz: ~150 WATT
full load at ~2200MHz: ~230 WATT

So, if I don't need something very quickly, so can guess that I prefer to do compiling at low clock speeds... (Suspend won't work for me.)

Cheers,

Prakash

#63 lore raw
In reply to James Bruce
Quoted 6 lines · James Bruce
Quoted 1 line · Stephen Clark

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

If it's an old system, it probably doesn't have working ACPI C-states though. Without that, low HZ does not save you anything. I should have said: 99% of desktops with the capability to do ACPI sleep have at least one USB device attached (usually a mouse).

rainbow@pentium:~$ cat /proc/acpi/processor/CPU0/power
active state:            C2
max_cstate:              C8
bus master activity:     00000000
states:
    C1:                  type[C1] promotion[C2] demotion[--] 
latency[000] usage[00052470]
   *C2:                  type[C2] promotion[--] demotion[C1] 
latency[090] usage[02699149]

This is PCPartner TXB820DS motherboard (Socket 7, i430TX) with 1998 Award BIOS and C-states seem to work fine. I've tested it in Windows 98 some time ago - the CPU is almost cold when idle with ACPI enabled and hot with ACPI disabled (that's partly caused by the fact that Windows 9x does not HLT the CPU when idle). With Pentium 100MHz in the socket and ACPI enabled, I could even touch the CPU (without heatsink) without burning my fingers.

Signature · 1 line
Ondrej Zary
#64 lore raw
Quoted 16 lines · Ondrej Zary
Quoted 4 lines · James Bruce
Quoted 1 line · Stephen Clark

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

If it's an old system, it probably doesn't have working ACPI C-states though. Without that, low HZ does not save you anything. I should have said: 99% of desktops with the capability to do ACPI sleep have at least one USB device attached (usually a mouse).

rainbow@pentium:~$ cat /proc/acpi/processor/CPU0/power
active state:            C2
max_cstate:              C8
bus master activity:     00000000
states:
    C1:                  type[C1] promotion[C2] demotion[--] 
latency[000] usage[00052470]
   *C2:                  type[C2] promotion[--] demotion[C1] 
latency[090] usage[02699149]
Quoted 1 line

This is PCPartner TXB820DS motherboard (Socket 7, i430TX) with 1998 Award BIOS and C-states seem to work fine. I've tested it in Windows 98 some time ago - the CPU is almost cold when idle with ACPI enabled and hot with ACPI disabled (that's partly caused by the fact that Windows 9x does not HLT the CPU when idle). With Pentium 100MHz in the socket and ACPI enabled, I could even touch the CPU (without heatsink) without burning my fingers.

Ok I stand corrected, I had no idea there were machines that old where ACPI worked correctly in Linux.

Do you see the same kind of heat reduction in Linux as Win98? What HZ value are you using, as the latency for entering C2 on your machine looks pretty substantial (Your C2 almost looks like a new machine's C3 state, which is supposedly the first level where substantial power savings occur on a new machines).

- Jim Bruce

#65 lore raw
Quoted 22 lines · James Bruce
Quoted 20 lines · Ondrej Zary
Quoted 6 lines · James Bruce
Quoted 1 line · Stephen Clark

Maybe new desktop systems - but what about the tens of millions of old systems that don't.

If it's an old system, it probably doesn't have working ACPI C-states though. Without that, low HZ does not save you anything. I should have said: 99% of desktops with the capability to do ACPI sleep have at least one USB device attached (usually a mouse).

rainbow@pentium:~$ cat /proc/acpi/processor/CPU0/power
active state:            C2
max_cstate:              C8
bus master activity:     00000000
states:
    C1:                  type[C1] promotion[C2] demotion[--] 
latency[000] usage[00052470]
   *C2:                  type[C2] promotion[--] demotion[C1] 
latency[090] usage[02699149]
Quoted 7 lines
Quoted 1 line

This is PCPartner TXB820DS motherboard (Socket 7, i430TX) with 1998 Award BIOS and C-states seem to work fine. I've tested it in Windows 98 some time ago - the CPU is almost cold when idle with ACPI enabled and hot with ACPI disabled (that's partly caused by the fact that Windows 9x does not HLT the CPU when idle). With Pentium 100MHz in the socket and ACPI enabled, I could even touch the CPU (without heatsink) without burning my fingers.

Ok I stand corrected, I had no idea there were machines that old where ACPI worked correctly in Linux.

Do you see the same kind of heat reduction in Linux as Win98? What HZ value are you using, as the latency for entering C2 on your machine looks pretty substantial (Your C2 almost looks like a new machine's C3 state, which is supposedly the first level where substantial power savings occur on a new machines).

I did some tests:
1. disconnected CPU fan power
2. booted 2.6.12 (compiled with HZ=100) with init=/bin/sh
3. left it idling on the shell prompt and checked CPU heatsink temperature (by hand) - only warm
4. rebooted the same kernel with acpi=off init=/bin/sh
5. left it idling on the shell prompt and checked CPU heatsink temperature - warm and slowly getting hot
6. rebooted the same kernel with init=/bin/sh again
7. left it idling on the shell prompt and checked CPU heatsink temperature - temperature went back to "warm" :)

Result: ACPI C2 state reduces CPU consumption here

#66 lore raw
In reply to James Bruce
Quoted 13 lines · James Bruce
Quoted 4 lines · Theodore Ts'o
Quoted 3 lines · James Bruce

The tradeoff is a realistic 4.4% power savings vs a 300% increase in the minimum sleep period. A user will see zero power savings if they have a USB mouse (probably 99% of desktops). On top of that, we can

                                     ^^^^^^^^
Quoted 5 lines

Most laptops (including mine, a Thinkpad T40) use a PS/2 mouse. So in the places where power consumption savins matters most, it's usually quite possible to function without needing any USB devices. The 90% figure isn't at all right; in fact, it may be that over 90% of the laptops still use PS/2 mice and keyboards.

Quoted 7 lines

Yes, laptops are mostly PS/2, which is why I only claimed a statistic for desktops. Desktops pretty much all use USB mice now. If 250Hz were only being sold as an option for laptops, we could leave it at that, yet its being pushed as a default that's "good for everyone". For desktops this is not currently true at all. By the time USB is fixed to do power saving, we'll probably have a working tick-skipping patch which makes the whole HZ argument moot.

Most new laptops are moving away from PS/2 ports, for example my shining (literally) new Acer Ferrari 4005 only has USB2 ports for mice and keyboard inputs (unless in the optional pcie docking station maybe). So my suggestion would be to fix USB power management.

The mouse that comes with the ferrari 4005 is actually a bluetooth mouse, but for some reason it is the worst thing I've ever used.

So, what I'm currently using is a usb -> ps/2 converter. I can't imagine this to be any good for power consumption at all.

(OT:Bad mouse)
-It will overcharge battery so the whole mouse becomes HOT -Occasionally it will stop working for ~5sec
-The optical sensor takes a while to focus on the pad when lifted and
put down again.

BTW: The laptop itself is _really_ good, just the mouse is a total
failure.

-HK

#67 lore raw
Quoted 22 lines · Hans Kristian Rosbach
Quoted 13 lines · James Bruce
Quoted 4 lines · Theodore Ts'o
Quoted 3 lines · James Bruce

The tradeoff is a realistic 4.4% power savings vs a 300% increase in the minimum sleep period. A user will see zero power savings if they have a USB mouse (probably 99% of desktops). On top of that, we can

                                     ^^^^^^^^
Quoted 5 lines

Most laptops (including mine, a Thinkpad T40) use a PS/2 mouse. So in the places where power consumption savins matters most, it's usually quite possible to function without needing any USB devices. The 90% figure isn't at all right; in fact, it may be that over 90% of the laptops still use PS/2 mice and keyboards.

Quoted 7 lines

Yes, laptops are mostly PS/2, which is why I only claimed a statistic for desktops. Desktops pretty much all use USB mice now. If 250Hz were only being sold as an option for laptops, we could leave it at that, yet its being pushed as a default that's "good for everyone". For desktops this is not currently true at all. By the time USB is fixed to do power saving, we'll probably have a working tick-skipping patch which makes the whole HZ argument moot.

Quoted 5 lines

Most new laptops are moving away from PS/2 ports, for example my shining (literally) new Acer Ferrari 4005 only has USB2 ports for mice and keyboard inputs (unless in the optional pcie docking station maybe). So my suggestion would be to fix USB power management.

You are talking about external ports. I am pretty sure that installed keyboard and touchpad (or whattever pointing device it has) are plain old PS/2.

Signature · 1 line
Dmitry
#68 lore raw
Quoted 29 lines · Dmitry Torokhov
Quoted 22 lines · Hans Kristian Rosbach
Quoted 13 lines · James Bruce
Quoted 4 lines · Theodore Ts'o
Quoted 3 lines · James Bruce

The tradeoff is a realistic 4.4% power savings vs a 300% increase in the minimum sleep period. A user will see zero power savings if they have a USB mouse (probably 99% of desktops). On top of that, we can

                                     ^^^^^^^^
Quoted 5 lines

Most laptops (including mine, a Thinkpad T40) use a PS/2 mouse. So in the places where power consumption savins matters most, it's usually quite possible to function without needing any USB devices. The 90% figure isn't at all right; in fact, it may be that over 90% of the laptops still use PS/2 mice and keyboards.

Quoted 7 lines

Yes, laptops are mostly PS/2, which is why I only claimed a statistic for desktops. Desktops pretty much all use USB mice now. If 250Hz were only being sold as an option for laptops, we could leave it at that, yet its being pushed as a default that's "good for everyone". For desktops this is not currently true at all. By the time USB is fixed to do power saving, we'll probably have a working tick-skipping patch which makes the whole HZ argument moot.

Quoted 5 lines

Most new laptops are moving away from PS/2 ports, for example my shining (literally) new Acer Ferrari 4005 only has USB2 ports for mice and keyboard inputs (unless in the optional pcie docking station maybe). So my suggestion would be to fix USB power management.

Quoted 3 lines

You are talking about external ports. I am pretty sure that installed keyboard and touchpad (or whattever pointing device it has) are plain old PS/2.

Well, yes..

But as I _never_ use the touchpad, it is quite necessary to keep USB enabled for me at any time as an external PS2 mouse is not possible.

-HK

#69 lore raw
In reply to James Bruce
Quoted 6 lines · James Bruce

Finally, as a conspiracy theorist, I wonder if Linus is just playing us to get more people working on the tick skipping and highres timer patches. Someone with the ability to herd cats obviously has to be sneaky. As an impressive demonstration of my free will I'm going to go test dyntick on my VIA Epia board...

Yeah, I've been running dyntick on my VIA Epia home server for a while now:

# uname -r
2.6.12-rc4
# uptime
 23:39:46 up 76 days,  9:10,  5 users,  load average: 0.00, 0.01, 0.00
# pmstats 5
Current: 0mA Voltage: 0.00mV Power: 0.00W 0mAh Time: 00:00h Ticks: 0HZ
Current: 0mA Voltage: 0.00mV Power: 0.00W 0mAh Time: 00:00h Ticks: 33HZ
Current: 0mA Voltage: 0.00mV Power: 0.00W 0mAh Time: 00:00h Ticks: 32HZ
Current: 0mA Voltage: 0.00mV Power: 0.00W 0mAh Time: 00:00h Ticks: 34HZ
Current: 0mA Voltage: 0.00mV Power: 0.00W 0mAh Time: 00:00h Ticks: 35HZ

My server is mostly idle, and the average HZ is around 35HZ.

This is still with the max HZ set to 1000. With dyntick, the max HZ should be set to something that provides best performance under heavy load on the system. Or least latency or whatever.

But AFAIK, it does not make any sense to limit the max HZ because of power savings. That's just a bad compromise.

Regards,

Tony

#70 lore raw
In reply to James Bruce

Hi!

Quoted 8 lines
Quoted 7 lines

Any argument along the lines of the change of a default value in the defconfig screwing people over equally applies the other way around; by not changing the defconfig, you're screwing laptop users (and others that want less power consumption) over. The world is not black and white, it's a very boring gray (or a very sadening bloody red; but I hope we won't come to that point just because of a silly argument on lkml...)

Quoted 6 lines

The tradeoff is a realistic 4.4% power savings vs a 300% increase in the minimum sleep period. A user will see zero power savings if they have a USB mouse (probably 99% of desktops). On top of that, we can throw in Con's disturbing AV benchmark results (1). As a result, some of us don't think 250HZ is a great tradeoff to make _for_the_default_value_.

As I said, I do not care about default value. And you should not care, too, since distros are likely to pick their own defaults.

Quoted 4 lines

From what I can tell, tick skipping works fine right now, it just needs some cleanup. Thus I'd expect something like it will get integrated into 2.6.14. If it gets in, the default HZ should go back up to 1000. In that case why decrease it for exactly one patchlevel?

I am afraid that CONFIG_NO_IDLE_HZ will be ready for 2.6.14...

Pavel

Signature · 1 line
teflon -- maybe it is a trademark, but it should not be.
#71 lore raw
Quoted 2 lines · Pavel Machek

As I said, I do not care about default value. And you should not care, too, since distros are likely to pick their own defaults.

If the default value does not matter then the default should remain at 1000 so as to not violate the principle of least surprise for people who run "make oldconfig". Why is this so hard for people to understand?

Lee

#72 lore raw

Hi,

Quoted 7 lines · Lee Revell
Quoted 2 lines · Pavel Machek

As I said, I do not care about default value. And you should not care, too, since distros are likely to pick their own defaults.

If the default value does not matter then the default should remain at 1000 so as to not violate the principle of least surprise for people who run "make oldconfig". Why is this so hard for people to understand?

Because people who run "make oldconfig" are expected to have some clue about how to read help texts. Please get some, thanks.

bye, Roman

#73 lore raw
In reply to James Bruce

Hi!

Quoted 9 lines
Quoted 3 lines

In the end, Linus will decide this anyway. I can understand that you don't want to change your application. Help developing the dynamic tick patch, and maybe you won't have to =)

From what I can tell, tick skipping works fine right now, it just needs some cleanup. Thus I'd expect something like it will get integrated into 2.6.14. If it gets in, the default HZ should go back up to 1000. In that case why decrease it for exactly one patchlevel?

Quoted 6 lines

As an app programmer, it'd be nice not to have to support 2.6.13 differently from 2.6.(x!=13). For my app, busy waiting means a ~12% load increase for 2.6.13 compared to (probably) all other 2.6 kernel versions. That's certainly violating the principle of least surprise. Up to now, it was easy enough to tell people "upgrade from 2.4.x and it'll work better". Now it gets more complicated.

BTW I think many architectures have HZ=100 even in 2.6, so it is not as siple as "go 2.6"...
Pavel

Signature · 1 line
teflon -- maybe it is a trademark, but it should not be.
#74 lore raw
Quoted 2 lines · Pavel Machek

BTW I think many architectures have HZ=100 even in 2.6, so it is not as siple as "go 2.6"...

Does not matter. An app that only ever worked on 2.6 + x86 will break on 2.6.13.

Lee

#75 lore raw
Quoted 11 lines · Lee Revell
Quoted 2 lines · Pavel Machek

BTW I think many architectures have HZ=100 even in 2.6, so it is not as siple as "go 2.6"...

Does not matter. An app that only ever worked on 2.6 + x86 will break on 2.6.13.

Lee

But then isn't that app broken? What if the user running it selects something other than HZ=1000?

Stephen

#76 lore raw
Quoted 7 lines · Stephen Ray
Quoted 6 lines · Lee Revell
Quoted 2 lines · Pavel Machek

BTW I think many architectures have HZ=100 even in 2.6, so it is not as siple as "go 2.6"...

Quoted 8 lines
Quoted 5 lines

Does not matter. An app that only ever worked on 2.6 + x86 will break on 2.6.13.

Lee

But then isn't that app broken? What if the user running it selects something other than HZ=1000?

Then they changed the setting from the defaults, so they get what they deserve. If kernel defaults are irrelevant, the only issue is whether or not we choose to violate the principle of least surprise for people who run kernel.org kernels. The technical merits of different HZ settings are completely irrelevant.

Lee

#77 lore raw
In reply to Pavel Machek
Quoted 5 lines · Pavel Machek
Quoted 2 lines

I think this is a good argument for leaving HZ at 1000 until some of these userspace bugs are fixed.

WTF? HZ=1000 eats energy like crazy. artsd eats energy like crazy. And you advocate breaking kernel because artsd is broken?!

Also as Con's numbers demonstrate, from the interactivity POV it is you who are breaking the kernel.

Lee

#78 lore raw
In reply to Marc Ballarin

Hi!

Quoted 5 lines

I was finally able to get C3 state working. It seems that my BIOS is leaving USB controllers in an active state(?). Without any USB drivers loaded, C3 is not possible. With drivers loaded, but no device plugged in C3 works fine. Kernel is 2.6.13-rc3-mm3 + acpi-sbs.

Quoted 7 lines

With working C3 there are indeed differences:

Voltage is 16.5 V

HZ=100:  ~460 mA => 7.59 W
HZ=250:  ~468 mA => 7.72 W
HZ=1000: ~494 mA => 8.15 W

0.55W difference, wow. And that's 7% difference to overall system consumption.
Pavel

Signature · 1 line
teflon -- maybe it is a trademark, but it should not be.
#79 lore raw
Quoted 12 lines · Pavel Machek

Hi!

Quoted 9 lines

I was finally able to get C3 state working. It seems that my BIOS is leaving USB controllers in an active state(?). Without any USB drivers loaded, C3 is not possible. With drivers loaded, but no device plugged in C3 works fine. Kernel is 2.6.13-rc3-mm3 + acpi-sbs.

With working C3 there are indeed differences:

Voltage is 16.5 V

Quoted 7 lines
Quoted 3 lines
HZ=100:  ~460 mA => 7.59 W
HZ=250:  ~468 mA => 7.72 W
HZ=1000: ~494 mA => 8.15 W

0.55W difference, wow. And that's 7% difference to overall system consumption.

But it's totally meaning less isn't it? Disable the USB, there goes the kb/mouse, turn off the LCD you can't see anything, spin down the disk, you can't do i/o, and run the CPU in idle so you can't DO anything.

At that point you might as well turn it off and save 100%.