Facebook Could Eliminate 75% of Its Servers by Changing Their Programming Code
Photo via cambodia4kidsorg via Flickr CC
Or at least that's the argument of one programmer, who writes that by switching from PHP to C++, Facebook could move from 30,000 servers down to just 7,500 servers, and trim 49,000 tons of carbon dioxide emissions from its footprint. But as you can guess, this statement doesn't go without debate. I'm not a programmer, and if you try to get me reading or writing past some simple HTML, my eyes will glaze over. I promise. However, I do hang around with some programmers which is why even though this whole Facebook server notion sounds like efficiency heaven, the idea of being able to switch off about 75% of their servers just by switching code sounds like something to be skeptical about.
Posted in "Facebook (PHP) is not very Kopenhagen" by koen on Webtoolkit :
We do not yet know what the outcome (if any!) of Kopenhagen will be, but what do these 30000 servers mean in terms of CO2? And what would be the impact of a more sane language instead of PHP?
Since an average server consumes about 200 Watt, and with an average SI EER (Site Infrastructure Energy Efficiency Ratio) of 2 this translates to around 400 Watt including cooling and other overhead. In the USA, an average of 560 grams CO2 is emitted per generated Killo Watt hour, and this brings us to a total CO2 emission by the Facebook server park of about 59 000 ton of CO2 per year...As they only say that "the bulk" is running PHP... let's assume this to be 25 000 of the 30 000... If C++ would have been used instead of PHP, then 22 500 servers could be powered down (assuming a conservative ratio of 10 for the efficiency of C++ versus PHP code ), or a reduction of 49 000 ton.
The assumptions are broad, and several programmers take the writer to task in the post's comments about exactly what (re)writing Facebook in C++ would actually mean.
Looking Towards Programmers for Energy Efficient IT
Because I'm not a programmer and don't even vaguely pretend to be one, I'm not going into the finer details on the validity of the statement. But what is important to note about the post is that it brings up the idea of how choice of programming language and how the code is written has a literal impact on our carbon budgets.
The majority of users (as in, everyone accessing a computer, smart phone, etc) forget that code does more than dictate how a website looks; it also dictates how it runs, which in turn dictates the amount and type of hardware it needs to be run, which in turn dictates electricity consumption, infrastructure requirements, and other details that add up to greenhouse gas emissions, e-waste, toxic materials in our landfills and conflict minerals being mined to build more IT equipment...
In other words, while switching from PHP to C++ may or may not have an impact on Facebook's number of servers to the tune of being able to shut off 75% of them, the fact that the company spends about $1 million on their electricity bill per month is enough for us to stop and consider just what kind of impact their code - and the code of other major websites and IT services - has on actual carbon footprints.
Green IT Is About More Than Hardware and Infrastructure
As the mobile phone app PowerTutor points out as it illustrates the energy efficiency of your smart phone apps, programming code is vastly important in determining the environmental footprint of our IT industry. It's more than just creating super efficient data centers, or working with companies that help reduce power consumption - it's also about using data super efficiently.
So back to the writer's original question - what would the CO2 impact be if Facebook were to focus on (literally) efficient code? That is a question well worth asking.
Oh, and if you're like me and have no idea what the difference between PHP and C++ really is, but you still want to make a difference when it comes to Facebook's energy efficiency, check out 10 Ways to Be an Energy-Efficient Facebook User.