Using virtualisation to reduce power consumption. Will it work?
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Using virtualisation to reduce power consumption. Will it work?
In my home network the principle file server does not run permanently as it draws a lot of power, primarily as it has a lot of hard disks. This is inconvenient and I'm wondering if I can use VMware ESXi based virtual machines to control the power consumption by only mounting the disks that are needed but leave the host running 24/7.
The 'server' is a Core2 Duo machine based around a Linux software raid array (mdadm RAID5) with four Samsung F1 1Gb eco-green active disks and one spare, with yet another 1Gb disk for backups of the important data. The machine boots from yet another disk. The plan is to have one 'NAS' VM that mounts the 4+1 RAID5 array, another backup VM that mounts the backup disk, and then have only the boot disk permanently mounted. The host will run permanently and the virtual machines will boot when needed and shut down when not. The RAID and backup disks will only be mounted by the virtual machines that 'own' them.
My questions are - will this save any power? ie. will the disks sleep if not mounted? Normally I use SUSE Linux but is another distribution better, Debian always seems to be the Server distribution of choice but possibly not because it has the best power saving possibilities. With virtual machines it's possible to run scripts on startup/shutdown but is it possible to force disks in and out of sleep?
I have a moderate understanding of Linux, mdadm and VMware but no idea if this plan can be made to work. Thanks in advance for any suggestions.
Perhaps I am not understanding what you are trying to do, but I can't see any way that VMs would help you or have anything to do with this. Why can't you simply put the drives to sleep from the primary OS?
Are you sure "the principle file server ... draws a lot of power, primarily as it has a lot of hard disks"?
When idle, a typical single HDD computer uses ~100 W of which each HDD is using ~5 W so ~95 W are being used, mostly by chipset, CPU, memory, GPU -- doing nothing!
In the case of your file server, 6 "green" HDDs are using ~20 W when idle. Let's assume the chipset, CPU, memory and GPU are using the same ~95 W doing nothing. Even if you completely removed power from the HDDs you would only save ~20 W. Considering environmental impact, powering off the drives might actually be worse because:
Power/thermal cycling reduces the life of HDDs
Most environmental impact associated with computer components is in manufacture and distribution (Wikipedia); power consumption during active life is a relatively small part of it; the best environmental impact minimisation strategy is therefore to prolong component life.
So yes -- virtualising your file server can save electricity and reduce environmental impact, not by switching HDDs on and off but by using only one instead of two computer's power-hungry chipset, CPU, memory and GPU.
Thanks for the information - it's true that the disks are only a part of the power consumption total but it's a part that's controllable. The rest is largely up to the BIOS and there I have to work with what I've got. We can separate environmental impact (in the entirety of the topic) from power consumption and at the moment I'm concerned with power. Hard disk life is also measured in hours of use and running disks 24/7 also degrades them.
To other points: the machine sits in the cellar so there's no easy access to the power button. Currently it wakes on LAN and this works well enough in simple cases, but it is still inconvenient and a bit clunky.
The reasons I'm thinking about virtualisation is first and foremost I will have ESXi running on the machine anyway to virtualise an IPCop firewall that must run 24/7. Secondly I'd like to cleanly separate the various different tasks the machine will do - classic virtualisation.
My question is about how this could assist saving power. If the disks are only mounted when the VM to which they are attached is running will they shut off automatically when the VM shuts down? If not automatically how is it done manually?
I've no experience with Linux power saving measures, I just remember hearing they're a bit stone age when compared to some other operating systems. Google searches throw up a lot of noise but perhaps I'm just searching for the wrong stuff.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.