Announcement

Collapse
No announcement yet.

Linux vs. Windows Power Usage

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

  • Linux vs. Windows Power Usage

    Phoronix: Linux vs. Windows Power Usage

    Since publishing our Ubuntu power tests, where we had monitored the power consumption of the past six Ubuntu releases going back two years on a laptop, we've had repeated requests for a power comparison between Windows and different Linux distributions. Well, in this article are the first set of results from that testing. We've compared the power consumption of Microsoft Windows XP, Windows Vista, Fedora 7, and Ubuntu 7.10.

    http://www.phoronix.com/vr.php?view=11248

  • #2
    tests procedure suggestions

    You might try testing with:
    1. idle + folding@home
    2. idle + playing the same video and/or audio file
    3. idle + scripted FTP activity with a server on your LAN (for more controlled latencies)
    4. idle + grep on a file

    You'll probably want to test each of these plenty of times and have a little bit of idle time before and after the action is added to the idle state. Measure a constant amount of time that fully contains the action ie. type out "grep [Pp]attern file.txt" on a com.exe or terminal window, wait a minute, start power consumption measurement, and then hit enter and wait for just a little longer than the greatest amount of time it could take before stopping the measurement.
    Also since different machines have different power saving abilities testing on multiple machines would be good.

    Comment


    • #3
      fix the bugs!

      Did your testing reveal any particular reasons for the results? I bet your machine is generating a lot of spurious interrupts in Linux, just like mine does.

      I think a better job should be done in hunting down and patching the programs that don't let the processor sleep. My poor laptop is still chewing 1-2% CPU even when it's doing nothing at all.

      Powertop shows many culprits, the powertop folks know what the offenders are, and they submit bug reports, but the bugs languish for months. Why? I recently submitted a Fedora bug with a patch, and it was fixed and pushed to production in just a few days. What gives?

      Comment


      • #4
        Useless?

        Originally posted by phoronix View Post
        Phoronix: Linux vs. Windows Power Usage

        Since publishing our Ubuntu power tests, where we had monitored the power consumption of the past six Ubuntu releases going back two years on a laptop, we've had repeated requests for a power comparison between Windows and different Linux distributions. Well, in this article are the first set of results from that testing. We've compared the power consumption of Microsoft Windows XP, Windows Vista, Fedora 7, and Ubuntu 7.10.

        http://www.phoronix.com/vr.php?view=11248
        Aren't these benchmarks rather pointless? Running laptops on AC means automatic power saving won't kick in. This means that you cannot gauge how long one OS will take to run down the battery vs. another.

        Comment


        • #5
          Frankly, I believe the desktop users are the last group of people who are concerning about the power usage of their machine. The power consumption has a much larger impact on servers or laptops. I am not saying that testing the power consumption difference between Linux and Windows on a Northwood machine is completely useless, but I just think most desktop user won't care if their desktop is consuming 58watt or 61watt of power under normal usage.

          90% of the time I boot into Ubuntu Gutsy on my Thinkpad T61p. However during traveling, I always boot into Windows XP instead of Ubuntu because XP gives me one additional hour of battery life than Ubuntu. I heard that the 2.6.22 kernel has some feature to reduce the CPU power consumption by reduce the number of CPU wakeups, but I have never noticed the difference. When considering battery life, XP eats Linux for breakfast.

          Comment


          • #6
            This Test Is Meaningless

            Testing the power usage of Linux vs Windows is futile at best. First of all, you could have optimised either platform to use less power. Assuming that you turn off all services, and underclock and undervolt the CPU. Linux ( any distro you choose ) has the advantage of being able to separate the GUI, so you can run it in a non-graphical runlevel and with no services, use a different kernel CPU governor ... and Windows will not be able to compete. However what is the purpose of this machine? Where are the real world tests or did this entire idea come to you while sitting on the porcelean throne after this mornings breakfast?

            What is the point of this test? Are you just trying to compare default installation power usages or what?

            Also, I would recommend using a method that gives you ( when dealing with watts ) at least 3 decimal places of accuracy.

            Comment


            • #7
              hack an ammeter in between the battery and laptop and run your test off ac.

              Actually don't bother:
              $ cat /proc/acpi/battery/C175/state
              present: yes
              capacity state: ok
              charging state: discharging
              present rate: 1376 mA
              remaining capacity: 3669 mAh
              present voltage: 12114 mV

              That's from a hp nx6125.

              There's your data, can you get the same in windoze?

              Comment


              • #8
                Originally posted by lewis View Post
                hack an ammeter in between the battery and laptop and run your test off ac.

                Actually don't bother:
                $ cat /proc/acpi/battery/C175/state
                present: yes
                capacity state: ok
                charging state: discharging
                present rate: 1376 mA
                remaining capacity: 3669 mAh
                present voltage: 12114 mV

                That's from a hp nx6125.

                There's your data, can you get the same in windoze?
                Don't trust any power data the laptop tells you. There's no way to verify its accuracy. Use a meter attached to the mains.

                Comment


                • #9
                  Good But Still a Little Whimpish

                  Good for first start but still a little whimpish.... It's really sad when people are afraid of seeing their favorite distro performing badly.

                  The whole point is to compare the two similar setups (as much as possible). In Ubuntu's case, Compiz should be enabled, as most users will want Vista's 3D effects... Also, whatever services that provide a similar Windows service should be left running...like cups, etc. The idea is also to compare a "sane" setup---a system that the average user would want.

                  I would imagine power usage gives a hint of what to expect performance wise. The more power usage the slower...I imagine that that's usually true...

                  Comment


                  • #10
                    accurately measure battery current

                    If you really want to get an accurate reading of how much current is drawn from the battery, you'll have to get between the battery and the laptop. The best way I can think of to do that is to get an extra battery, rip out its guts, solder wires to the terminals inside the battery pack, and run the wires out to another battery. Now you can get in there with an ammeter and measure the true current draw. You have to at least verify what the laptop's internal current sensor is telling you. Otherwise it could be wildly inaccurate and you'd have no way of knowing.

                    Comment


                    • #11
                      better benchmarking

                      Originally posted by ikaruga View Post
                      Good for first start but still a little whimpish.... It's really sad when people are afraid of seeing their favorite distro performing badly.

                      The whole point is to compare the two similar setups (as much as possible). In Ubuntu's case, Compiz should be enabled, as most users will want Vista's 3D effects... Also, whatever services that provide a similar Windows service should be left running...like cups, etc. The idea is also to compare a "sane" setup---a system that the average user would want.

                      I would imagine power usage gives a hint of what to expect performance wise. The more power usage the slower...I imagine that that's usually true...
                      You don't necessarily want all that whizzy crap turned on to make a representative test. When I'm really trying to get work done on my computer, I turn off all that silly stuff, no matter what OS I'm running, even on my high-powered desktop. It's also not representative to run a test with the CPU at 100%. Nobody actually works with their laptop running flat out. Most laptops get really loud, hot and unpleasant when you run them like that. Like I said earlier, I like the DVD movie benchmark because it runs the screen, the GPU, the DVD drive, and a relatively small amount of CPU. It's also a very easy test to run.

                      Comment


                      • #12
                        Originally posted by narf View Post
                        If you really want to get an accurate reading of how much current is drawn from the battery, you'll have to get between the battery and the laptop. The best way I can think of to do that is to get an extra battery, rip out its guts, solder wires to the terminals inside the battery pack, and run the wires out to another battery. Now you can get in there with an ammeter and measure the true current draw. You have to at least verify what the laptop's internal current sensor is telling you. Otherwise it could be wildly inaccurate and you'd have no way of knowing.
                        Why are you obsessed with accuracy?
                        We're not sending robots to mars here, just trying to get a bit of objectivity into OS efficiency.
                        Test the ammeter by seeing how accurate it's battery life predictions are, that'll rule out "wildly inaccurate" easy enough.
                        If it can tell me that one kernel/config/whatever is using less juice than another then it's good enough, certainly not worth ripping batteries up for.

                        Comment


                        • #13
                          Originally posted by lewis View Post
                          Why are you obsessed with accuracy?
                          We're not sending robots to mars here, just trying to get a bit of objectivity into OS efficiency.
                          Test the ammeter by seeing how accurate it's battery life predictions are, that'll rule out "wildly inaccurate" easy enough.
                          If it can tell me that one kernel/config/whatever is using less juice than another then it's good enough, certainly not worth ripping batteries up for.
                          1. Use a dead battery. You can get them on eBay.
                          2. The current sensors they use in laptops are not designed to be accurate, they are designed to give some guidance to the power saving system. Your average DVM has a much better circuit.
                          3. If you want to break down your testing and try to see where individual components of the power usage are coming from, you'll want an accurate current measurement.
                          4. If you use a repeatable, constant load test, you wear the battery all the way down, and you have some faith in the battery's specifications, you can use some math instead of an ammeter and bypass the whole current measuring process.
                          5. If you really want to know where the power is going, you should determine the efficiency of the charging circuit, and you'll need a meter for that.

                          If you want answers that you have some confidence in and feel good about defending, then you should back them up with proper testing procedure. Don't let people accuse you of being sloppy.

                          Comment


                          • #14
                            Ok, you do that, that sounds like the basis of an article, meanwhile I'll scratch up a script to collect similar data from acpi on any laptop and an OO spreadsheet to graph it, who knows, maybe it'll be useful or sumfink.

                            Comment

                            Working...
                            X