One of the company projects that we partially own, support and develop is a online dating/community/social network site. We run it on several 1U boxes and at one point during analyzing our statistics, the metrics showed that we have "rush hours" on the site, but most of the time, specifically during the night and the morning hours there weren't that many 'hits'. So what we decided to do is to optimize our CPU frequency scaling so that we can decrease the power consumption of the machines and the total heat dissipated (ergo less need of air-conditioning) and by doing that we decreased our polluting impact on the environment.
We have done this for 2 of the 3 machines we run the site on. One is 1 x Quad Core Xeon X3330 and the other is a Dual Opteron 250 box. We decided to use the ondemand cpufrequency governor in Linux so what we achieved is this:
During the period of 01:00 am. to 04:00 pm, our Quad Core Xeon operates @ 2Ghz (instead of the stock 2.66Ghz) and our Dual Opteron 250 box operates @ 1Ghz (the default is 2.4Ghz). Of course during "rush hours" for our site, we set up a cronjob to switch to the performance cpufrequency governor so we operate at full power. We could have used the ondemand or conservative governor still, but it is not the best solution because the processor goes up and down in speed and cycles through different ACPI "C" states, which has an actual impact on the performance of php, so we decided to stick with full power during that time.
Here is snip of what we did in crontab (for our Opteron 250 box):
01 01 * * * for i in 0 1; do echo "ondemand" > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor; done
00 16 * * * for i in 0 1; do echo "performance" > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor; done
What we haven't done yet is optimize the power consumption of our database server, another Quad Core Xeon machine.
What we did is not something revolutionary or new, but it is something most people do not do. We know that there are companies out there like Google that follow the environmental policy of "Follow the Moon" for shifting loads to their datacenters. There are even more environmentally friendly approaches, however for every company that cares there are at least 100 that don't, and that is in the IT sector only. I personally have worked at companies that not only use way to much servers, but most of the time those machines are not only underused (could have been easily merged in a few Xen VM Containers), but the owners, managers and system administrators have never thought of a policy to scale the cpu frequency so that they can decrease their carbon footprint and also their monthly electricity bills.
The EvilPuppy bites, and it bites everyone that doesn't really care what happens with the world around us


