May 21
I published some time ago a news regarding reducing the power consumption of my home server to 53 W. There was some open issues like how to reduce the consumption further.
Regarding this, I finally simply decided to switch off the server automatically every night using a Cron job. This is an elegant solution, as I am not hosting anything on this home server, other than stuffs I am using at home. Everything else is on my dedicated server.
This solution has the following two advantages:
It is very effective: I just need to switch on the server when I need it. It will get switched off automatically after a while. Hence the server is off most of the time.
It is handy: I don’t need to remember to log on into it just before leaving home. Just switching on the server when I need it, is fully OK for me.
What I can still improve:
Getting wake-on-lan working. That way I would not even need to switch it on. This would be really cool. I could even configure my WIFI access point to send automatically a wake-on-lan packet to the server, whenever it is accessed for the first time after a long inactivity period. I would just have a longer latency the first time I am accessing the server, whenever it gets waken up.
Will check this out.
Update: I actually activated wake-on-lan. This is really handy. I did a small script on my mac, which uses the utility ‘wakeonlan’ (installed through fink). That way I can confortably switch on the server remotely from my laptop when I need to. (The wake-on-lan option must be activated in the BIOS.)
The small script that I use (this will only work if the server is in the LAN):
#!/sw/bin/bash
/sw/bin/wakeonlan [server mac address]
Nov 04
Last week I bought a consumption measurement device for 20 bucks. I wanted to know how much current is needed for various electronic devices I use at home, some of them on a 24/7 basis. I have got a home server running Linux, that I use as a NAS, print server, slim server (for streaming mp3 files to an mp3 device) and for experimenting a bit with Xen and Ubuntu. I have got also some other devices like a wireless access point (WRT54GL running Tomato), a cable modem, an external backup hard disk, a b&W laser printer and a few other electronic devices.
Of course, one of the most energy hungry device I have is the server, which is always switched on. I was expecting a consumption of about 60 W, because I tried to choose efficient components, some of which were listed on a review regarding a green computer consuming 54 W when idle. My hardware configuration is the following:
- Processor AMD 64 x2 EE 3800+, dual core and energy efficient version (which is actually quite cheap)
- Micro-ATX Mainboard M2NPV-VM with AM2 socket
- 2 GB of RAM (DDR2 PC4300)
- 2 Seagate 7200.8 250 GB hard disks used as a software RAID-1 array
- Power supply ElanVital 500W, ATX, with 80% efficiency.
- Plextor Plexwriter DVD burner
So I shut downed my server, plugged it in the measurement device and booted it. The value I could read on the device, after the reboot was finished and the server was idle, was higher than expected: 85 W. I was not very happy with that value and began to try to optimize it.
- I first tried to remove the DVD burner, but I got just 2 W of reduction, which was not good enough.
- Then yesterday I tried to install the last stable release of Ubuntu, which is Ubuntu 7.10 gutsy 32 bits version (I add previously Ubuntu feisty with a XEN enabled kernel). I was pleased to see that the server was only consuming about 68 W (DVD burner included). I then tried to re-install XEN and after rebooting saw that I was again at 85 W. So the XEN kernel had different options enabled that were not optimized for a good power management.
- I got back to the stock kernel and tried to activate the automatic spin-down of the hard disks. I did this using the command
hdparm -S 60 /dev/sda
hdparm -S 60 /dev/sdb
which spins down the two disks after being idle for 5 minutes. I was able to grab a few watts and get down to 60 W, which is not too bad. I added the two commands in /etc/rc.local so that it gets executed automatically on boot.
- I then tried to activate the automatic CPU frequency scaling, so that when the processor has a low usage, its frequency gets automatically reduced, hence saving some energy as well. I was getting some problems using the module powernow-k8, so I updated the bios to the latest version (1201), which resolved that issue. I could then install correctly the cpu scaling daemon. I just had to run
apt-get install cpufreqd
and then edit the file /etc/default/cpufreqd and insert “powernow-k8″ in the option CPUFREQ_CPU_MODULE (you can check which module you need to use here). With these two operations, the BIOS upgrade and the cpu frequency scaling, I was able to grab a few watts, getting down, when the server is idle, to about 53 W, which is already a lot better than the 85 W I was getting without tuning.
The options I might consider now are the following:
- I could reduce significantly the power consumption if I automatically switch off the server every night. I am using it also to do a distant backup of another computer, but I could setup the BIOS to switch it on every night to do that, if it is not already the case. The only thing I would need to do is just to switch the server on, whenever I want to print something or hear mp3’s, which is not too bad. The server would then switch itself off at night, after doing the backup.
- If I want to use XEN, I should compile my own patched kernel (for XEN) and tune the power management options to get the same consumption as on the stock kernel.
- I could try to tune further the kernel options, which I am not sure that I am going to do, as it is much more convenient to use the stock kernel than to use a self compiled one (e.g. for updates).
- I could try to find a way to cut off the consumption of some other electrical devices, which are most of the time not used or in standby mode, but do consume power anyway. Like for instance the laser printer (standby 14 W), the external backup hard disk Seagate 500 GB 7200.10 (standby 12 W), the wireless access point WRT54GL (always on, 14 W) or the cable modem (always on, 12 W). Not sure how I can do that. Of course I could plug some of these devices in a multi socket with a switch, but I would need to turn it on each time I want to access the internet using my laptop and turn it off afterwards (in addition it’s not compatible with my automatic distant backup). Not very elegant. I guess I will have to think about that issue.
Additional links:
Aug 31
As a few of you probably already know, I am using a car to go to work from my home in Zurich to Baden. This for a main reason, it’s faster than using the train. By public transportation, the trip lasts 1 hour door to door, one way, while using the car it lasts just 30 minutes. At the end of the day, literally, I am gaining 1 hour. But of course, by car I am less environmental friendly than using public transportation, which I am aware of.
Browsing the net, I stumbled upon the website of a Switzerland-based company, myclimate.org, active in the domain of climate protection and CO2 compensations. The idea is quite interesting and simple: try to get environmental friendly by avoiding carbon emissions, while buying carbon credits for the emissions that cannot, for some reason, be avoided. The collected money is then invested in projects around the world, which aim at reducing the carbon emissions, e.g. the construction of a wind park in Egypt, which will avoid using a coal plant for producing electricity.
So here we go. I calculated the CO2 emission caused by my car use for going to work, which corresponds to about 11′000 Km a year with a car consuming 7 l/100 Km. This gives 2.35 tons of CO2 a year. Not kidding! Although there is just 25 Km between my home and work place, it gets to 2.35 tons! The majority of CO2 weight comes form the oxygen atoms, which come from the air. That’s the reason why 770 l of fuel produces 2.35 tons of CO2. At the end, I bought the carbon credits, which is a good thing, I think, but should not restrain from living, or trying to live, more climate neutral.

Recent Comments