Making our computers consume less power
Posted by Sayamindu 3 years, 2 months ago
While going through this article, I started to think about ways and methods in which we can make our computers consume less power. Usually, those of us who use Linux tend to consume more energy than our Windows counterparts, since (primarily encouraged by the lack of BSODs and crashes) we tend to leave our machine on for weeks (and sometimes, even months or years). It seems that one of the major annoyances with shutting down/starting up is the time that is wasted, and so we all tend avoid using the shutdown command. However, at present, ACPI support in Linux is slowly improving, and today, if you are lucky enough, you can enable ACPI sleep state “S3″ in your system, where all power to the cpu is shut off, and the contents of its registers are flushed to RAM, which remains on. This means that the system will be restored to its previous state within seconds of your pushing the power button. To conserve even more power, you can also try to go into state “S4″, where CPU power is shut off as in state “S3″, but RAM is written to disk and shut off as well. If ACPI sleep states do not work in your system (be sure to read /usr/src/linux/Documentation/power/tricks.txt before giving up), you can also try Software Suspend 2 which works in a manner very similar to “S4″ state, but is (usually) more reliable.
In order to make the machine “wake” up at a specific time, you can use the “alarm” feature in ACPI enabled systems. If you want your computer to automatically start up at, say, 7AM on the 17th of May, 2005, just use the command echo 2005-05-17 07:00:00 > /proc/acpi/alarm. And for automated shutdowns at a specific time, there is always cron :).
Another power saving trick is to use CPU Frequency scaling. This feature is usually available only in notebooks. However, of recent, the Linux kernel (versions 2.6.10 and above) have started supporting FSB speed scaling in Nforce based motherboards, which are usually found on desktop computers. If this feature is enabled in your kernel, your processor speed will vary according to the load on the system, and hence, when your system is sitting idle, the overall power consumption will be less.
One of the major power hogs (nothing to do with a castrated male pig) of an overall computer system is the display (especially when you are using a CRT monitor). As one of the LOSTs stated, the best screensaver for your monitor is the power switch - simply switch off the display when you are not using it. If you are using a display without a power switch (a notebook one, for instance), you can use the command xset dpms force off and it will turn off automatically. To get it back, just press some key on your keyboard, or just move your mouse. I get really pissed off when I see HUGE (17 inch or even larger) monitors attached to “servers”, merrily showing some kind of fancy screensaver. You DO NOT need to have a monitor with a server system. If you need to do something in that system, you can always log in remotely, or if you have a number of servers boxes at a same location, use a KVM Switch.
To optimize power usage of the hard disk, there is a tool called “laptop-mode”, which intelligently groups write activity on the disks, so that only reads of uncached data result in a disk spinup. More information on this tool is available here and in this Linux Journal article.
Another important method for saving power is to use older machines for less computing intensive tasks. You do not need a Pentium 4 machine with Hyper Threading to run a DHCP server or a simple firewalling/NAT system. Any old Pentium machine (or even a 486, in some cases) would do.
Using thin client setups in places like school/college laboratories, libraries can also help. Thin clients usually do not need to be very powerful systems, and one can easily use the less power hungry old Pentium/Pentium2 class systems for the nodes. Another option is to use low power systems like those based on Geode and C3 processors. A server with 2-3 GB of RAM and a sufficiently powerful processor can easily handle more than 30 nodes (especially in a laboratory or a library like scenario, where, at a given point of time, most of the users use the same application), and in such a situation, since the systems/nodes usually run for 8-9 hours at a stretch, the annual power saving would be considerable.
…and of course, using components which consume less power is always a good idea. In fact, in large deployments, using 15 inch TFT screens might turn out to be cheaper than using 15 inch CRT screens, as CRT screens utilize a lot more power than the TFT ones. So next time you go out to buy a new component for your computer, think of the long term costs – and think green :).
