[Novalug] VirtualBox running Windows 7 on Arch lowering battery life

Bryan J. Smith b.j.smith at ieee.org
Wed Apr 21 19:44:49 EDT 2010


System Activity Reporter (sar) will capture all sorts of statistics.

There are two (2) causes ...

1.  If you have the dual-core ULV Pentium 1810T, you're making heavy
use of that 2nd core now.  That could easily eat up another 5-10Whr.

2.  If you have less than 4GiB of RAM, or are using more than your
available RAM, paging could be going through-the-roof with over-
subscription of memory from available, total virtual memory (VM).
Hitting a 2.5" hard disk or, even worse (for longevity), NAND EEPROM
will cause another 2-3Whr load, possibly more with continual transients
in heavy writes or spin-ups in the case of disc.

In either case, sar can capture and report differences.  Taking a
baseline of the system running with and without will tell a huge tale.




----- Original Message ----
From: Maxwell Spangler <maxlists at maxwellspangler.com>

On Wed, 2010-04-21 at 11:32 -0700, Brander Snaxe wrote:
> I'm running Arch Linux on my Acer 1810T. I use VirtualBox to run
> Windows 7 so that I can access Outlook and work on corporate
> documents.
> 
> It seems that running the virtual machine is killing the battery
> faster than when it is not running (acpi is showing almost a full hour
> difference). I'm sure there are plenty of good engineering/scientific
> reasons for this, but I'm no expert and right now do not have the time
> to research.

The most challenging thing in an environment running a VM is the
overhead caused by not just the VM enabler (VirtualBox) but the
overhead of the guest OS itself. 

For example, If you boot Virtualbox and let it sit at a grub menu,
you'll see your CPU pegged at 100% of its maximize speed (Mhz/Ghz).
This is because grub is running a very simple loop to monitor your
keyboard for keypresses and that loop is running unconstrained as if it
were calculating something important.  VirtualBox doesn't know this is
just a keyboard monitoring loop and enables it to do so.  This causes
your CPU to require a good deal of power and depletes the battery.

Once you boot into Linux beyond grub, Linux can provide similar
functionality in a much more sophisticated method using hardware
interrupts and do a lot more for you with a lot less CPU load.

So, even if you have all sorts of power savings features enabled in the
Linux host, if Windows is constantly waking it up with activity, it's
going to keep hard drives running, the CPU running, etc.

Start with your Windows guest VM and try to disable features that aren't
used.  Explore its power savings options and try to enable power savings
wherever you can.

Virtualbox, as far as I know, won't have much here because its job is to
run the VM and not worry about power requirements of doing so.

The host Linux OS can be tweaked to reduce power consumption with things
like PowerTop (http://www.lesswatts.org/projects/powertop/).

Do what you can but realize that virtual machines enabling software is
focused on letting you run the VMs and not constraining their power use.



More information about the Novalug mailing list