Announcement

Collapse
No announcement yet.

The Linux Kernel Power Problems On Older Desktop Hardware

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #41
    Originally posted by deanjo View Post
    When you give an absolute answer saying something "doesn't exist" the burden of proof does become yours as well. If you were to say something like "I doubt that it exists", "I haven't seen any iron clad proof it exists", etc then you have no burden of proof as you are just giving an opinion which does still allow for the possibility to be there even though you have not seen any satisfactory evidence to prove otherwise.
    And when someone gives an absolute that it does exist? Phoronix has a burden that it's not living up to with this article. That graph makes UFO sightings look like sound science in comparison. Credibility is being lost here.

    I think it's odd that you're going to such great lengths to ask fewt to justify his absolutes but turn a bind eye toward Phoronix, which is well known for sensationalist headlines and articles that frequently contain unjustified absolutes. IMO it's fair turnaround to use unjustified absolutes to refute unjustified absolutes. (Perhaps not productive, but fair none the less.)

    I predict more silence from the Phoronix side which is usually what happens when someone makes a valid point.

    Comment


    • #42
      As someone said before, it seems to me that the "big kernel power problem" is
      due to the a different implementation of the cpufreq ondemand governor.

      If you do a git log drivers/cpufreq/cpufreq_ondemand.c
      you can see how many changes have been done on the cpu governor that is the default for many distros.

      Just to mention one (more or less in the 2.6.36 release cycle):

      Wed, 6 Oct 2010 20:54:24 +0000 (16:54 -0400)
      commit 3f78a9f7fcee0e9b44a15f39ac382664e301fad5
      [CPUFREQ] add sampling_down_factor tunable to improve ondemand performance

      Adds a new global tunable, sampling_down_factor. Set to 1 it makes no
      changes from existing behavior, but set to greater than 1 (e.g. 100)
      it acts as a multiplier for the scheduling interval for reevaluating
      load when the CPU is at its top speed due to high load. This improves
      performance by reducing the overhead of load evaluation and helping
      the CPU stay at its top speed when truly busy, rather than shifting
      back and forth in speed. This tunable has no effect on behavior at
      lower speeds/lower CPU loads.

      This patch is against 2.6.36-rc6.
      This patch should help solve kernel
      bug
      19672
      "ondemand is slow".
      You could test with another cpufreq governor to see if bug "magically"
      appears (such as powersave that as not been modified since
      2008-10-09).

      Another test could be the "cpufreq-utils" package which is choosing
      the "wrong" cpufreq governor.

      Bye
      Marco

      Comment


      • #43
        Originally posted by fewt View Post
        Unable to replicate across many systems and many use cases, remember I have 0 bug reports and a few thousand users. This in itself is evidence against this "bug".

        What you fail to realize though is that the burdon of proof is not on me. It is not my responsibility to disprove that the bug exists, it is on Phoronix who initiated and continued these same baseless claims for months. I don't think that it is too much to ask for Phoronix to actually prove their theory after all this time by showing us the commit since the claim was made in the first article that it would be found "quickly".

        Instead all we have seen is more sensationalist journalism proclaiming that the sky is falling.

        Give us the commit.
        fewt,

        Have you noticed any difference when moving from 10.10 to 11.04 on the settings affecting power management. How do you explain the results Tom's Hardware got when comparing the two in terms of battery life ?

        Comment


        • #44
          I'm just a noob, and can't reproduce the problem (I'm using 2.6.39-ck2), but why not give a try to a non smp kernel, other processes scheduler, kernel parameters (disabling all power management capabilities), etc.

          Is it really impossible to reproduce the same power consumption between a pre- and post- bug kernel ?

          It could exclude a lot of tracks, and help to fill a useful bug report.

          In example, there's a scheduler parameter for power management on an smp system :
          http://www.kernel.org/doc/Documentat...ces-system-cpu

          What: /sys/devices/system/cpu/sched_mc_power_savings
          /sys/devices/system/cpu/sched_smt_power_savings
          Date: June 2006
          Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
          Description: Discover and adjust the kernel's multi-core scheduler support.

          Possible values are:

          0 - No power saving load balance (default value)
          1 - Fill one thread/core/package first for long running threads
          2 - Also bias task wakeups to semi-idle cpu package for power
          savings

          Comment


          • #45
            Originally posted by ioannis View Post
            fewt,

            Have you noticed any difference when moving from 10.10 to 11.04 on the settings affecting power management. How do you explain the results Tom's Hardware got when comparing the two in terms of battery life ?
            I haven't tested Ubuntu 10.10 vs 11.04, as I haven't been involved with that distribution for some time. I wouldn't be surprised though that 11.04 was power hungry, as Unity is still in active development and is most likely not optimized for low power use.

            Comment


            • #46
              NMI Watchdog! That rings a bell, gotta test that tonight!

              Comment


              • #47
                Originally posted by fewt View Post
                I haven't tested Ubuntu 10.10 vs 11.04, as I haven't been involved with that distribution for some time. I wouldn't be surprised though that 11.04 was power hungry, as Unity is still in active development and is most likely not optimized for low power use.
                Fair enough. As for Unity, if you check that article, you'll see that Unity is not the culprit, since the 'classic' Gnome desktop is even worse.

                Comment


                • #48
                  Originally posted by ioannis View Post
                  Fair enough. As for Unity, if you check that article, you'll see that Unity is not the culprit, since the 'classic' Gnome desktop is even worse.
                  The best way to figure it out would be to use powertop and let it collect statistics over around 15 minutes of idle time (no apps open, no mouse or keyboard input). Then do the same for 10.10 and compare the list of applications to see if one is chattier in 11.04. It could also be something kernel related, that powertop would notify you of (as I indicated there is no dynamic tuning in the kernel so if you shift to battery it won't change the kernel to be battery friendly without a helper application).

                  Comment


                  • #49
                    Originally posted by Scullder View Post
                    I'm just a noob, and can't reproduce the problem (I'm using 2.6.39-ck2), but why not give a try to a non smp kernel, other processes scheduler, kernel parameters (disabling all power management capabilities), etc.

                    Is it really impossible to reproduce the same power consumption between a pre- and post- bug kernel ?

                    It could exclude a lot of tracks, and help to fill a useful bug report.

                    In example, there's a scheduler parameter for power management on an smp system :
                    http://www.kernel.org/doc/Documentat...ces-system-cpu
                    That is a valid point, that parameter is used in Laptop-mode for those that have laptop-mode-tools enabled to conserve power on battery.

                    something to point out though, the -ck2 source kernel version is Con Colivas' creation, and does not use most of the scheduler pieces that the CFS scheduler does. I tried out that kernel as an option - I patched BFS into the Natty kernel, I didn't really find any benefits to the power consumption at low/idle, but the IPI process that really generates a lot of interrupts in the kernel in 2.6.37-3.0.0 (I think it handles the softirq 'kicks' to wake up cores in C states) isn't in the -ck code.

                    I have been comparing kernels a lot lately and checking them out for how they fare on power, I'm a bit surprised that no one has mentioned the main changes of power usage post 2.6.34.

                    Linux Devs were working out a way to implement the power management stuff that google was trying to put back into the kernel from the development of Android. It really didn't work out, they yanked it all out in 2.6.34 or 35 - I forget which..

                    but right after the PM- features got put in, it tells devices to turn off, (think stuff OTHER than the CPU) like USB, PCI cards, etc. if they are not in use, and adds a power save mode API for the drivers to hook into.

                    You can see this for yourself if you boot up a lucid kernel (2.6.34) in Natty, then reboot into the natty kernel (or maverick - 2.6.35) and run powertop 1.98.

                    the lucid kernel will only have 5-6 devices listed in powertop, in the maverick and natty kernels, you should see almost all hardware in your PC. This allows the kernel to put unused usb ports into power save, sata links to the hard drive and cdrom and more.

                    You would think that this would result in lower power usage, and it does on some hardware in the Maverick kernel - but in Natty, it takes a huge nosedive.

                    This is just speculation on my part, but what I see suggests that something they did made a dramatic change in interrupt usage in the scheduler, on 2.6.38 - 3.0.0, if you look at the powertop results (easier to see in 1.13) and note the line that says "extra kernel interrupt" and look at the number of them, then compare that to the total other interrupts on all the other processes combined, they run very close to even on my Core2 duo.

                    On the other hand, 2.6.35 stock, usage is lower, the extra kernel interrupts are still there, but they are about 1/3 of the total of the other processes combined instead of even.

                    As this all concerns the sleep states of the processors (interrupt handling) and the other high running process in the later kernels is the load balance or IPI process, it looks like a standard Interrupt to the kernel is causing additional interrupts in the scheduler, as it 'kicks' the other cores to wake up. the less time the cores can run in a low sleep state - more power usage..

                    Comment


                    • #50
                      Well just installed gentoo on my brand new laptop
                      ( i7-2630QM, 8gb of ram, 7200rpm 640 gb, amd 6770m 1gb gddr5 )

                      with every power management option I can think of, on idle I get 2.6 wakeups pre second in intervals of 45 seconds.

                      kernel is 2.6.39-pf2.

                      I really can't see the problem ( at least not on my system ).

                      Comment

                      Working...
                      X