Advertisement

Our world is heading into an ecological disaster and finally it’s not to the governments to change laws in order to stop this from happening – it’s completely our own responsibility. Everyone of us has to expend an effort and change his behavior. I’m glad there is no doubt anymore that the greenhouse effect is man-made and something has to be done.

So let’s start. But what can I change? I’m a senior IT professional like many of you are. Is there anything I can do? And is it even possible to make a profit from it?

Yes, it is! Do what you have been tought in university!

All we have to do is make computers think less. This means to simply optimize your code. We life in a time where hardware is so cheap and powerful that we usually don’t need to think in detail about the performance of the code.

Let’s have a look at an example:
If we write an enterprise application that performs poorly and uses 75% of your CPU’s processing power. The usual thing that happens first all around the world if the application scales to a bigger usergroup is that the tech staff buys a new server and clusters it to handle the load. In many cases they also buy Server running as a load balancer to balance the requests between the two machines. If you have a look at the current specifications of smaller servers. They start with a 350 Watt power adapter. To calculate the energy costs of this example, I take this formula:

W = p \cdot t \Rightarrow W = 350W \cdot 24h
\Rightarrow W = 8.400\frac{Wh}{day} = 8.4\frac{ kWh}{day} (for one server!)

Because you now have to servers to handle the load, we need to double this amount of work.

W_{final} = 2 \cdot 8.4 \frac{kWh}{day}  = 16.8\frac{ kWh}{day}

This is the same amount of energy you need to run your 1000W microwave oven 16.8 hours every day. This is much energy we waste just because our example code performs bad. I read the 1kWh is equal to 1.5L (Liter) of gas. So here’s the equivalent of gas we waste if our engine has an average efficiency of 25%:

 V=\frac{4 \cdot 16.8 kWh}{8,9 \frac{kWh}{L}} \Rightarrow V= 7.55L \text {every day }

Or 2755.75 L every year.

That’s like doing a 125 km drive every day with an average European car and that’s 7.55 \cdot 2,32 kg = 17.51 kg of CO2 every day or 6.4t CO2 a year. If it’s possible to optimize the code to run on one machine, then we could save these fumes and could save the costs for the two servers, the triple maintenance and the energy.

And we have millions of applications like that distributed around the world.

Think about it. Save money! Produce greener code.
Thank you.