Thursday, September 20, 2012

Carbon Footprint of the Internet


Working as a postman the past two summers I come across messages like the one quite often, the sign say(roughly translated) “No advertising please, save the nature”. When delivering mail and advertisement I do my best to obey these signs, and the swedish postal-service also keeps a record of how many signs there are to not produce unnecessary amounts of printed ads that are never delivered, the signs thus have an effect. 

But that is regular mail. How about email? of course there’s a lot less resources consumed when sending an email compared to sending out printed add, but that doesn’t mean that there’s none at all. I had a conversation with a friend of mine on this topic some time ago. He was annoyed of people sending replies to emails received through email-lists saying “please take me of this list, I don’t want these emails” when its such a small task marking them as junk-email and never have to bother again, the only reason to send such a reply would be to save the energy consumed when the emails are sent, and that’s such a small amount that it’s not worth bothering, or is it? 

What do we really pay for when we pay for our broadband connection. I’m assuming that administration and infrastructure would be a big chunk of it, but some of it has to be for energy.

According to some calculations found here <http://energyzarr.typepad.com/energyzarrnationalcom/2008/08/the-true-cost-o.html> the amount of energy consumed when viewing a pretty standard webpage, wikipedia for example, is about 11.5 joules. If we make the rough approximation that sending an email consumes the same amount of energy as viewing a webpage, and the normal mailing list sends about one email per day. It’s important to note that these calculations only include the energy needed to transport the packets over the net, not the power needed to keep your computer running. According to this blog post <http://voices.yahoo.com/unplugging-cell-phone-saves-much-energy-2527431.html> the amount of energy saved from unplugging your cellphone charger for 24h instead of leaving it plugged in is about 0.0066kwh, wich is 6.6wh(of course). The amount saved from not sending an email is 11.5 Joules(ws) wich would be approximately 0.03wh, so it’s smaller. But the thing is that while you usually only have one cellphone charger, and you can’t unplug it for more than 24h a day(and most of the time less than that since you need to charge your phone), the amounts of emails we receive is scalable. What’s even more scalable is the amount of data requests we send in total, including all the cat videos we watch on youtube :)

I thought this would be interesting to test, and decided to create a carbon footprint calculator for the network card in my computer. This calculator builds on the estimates found on the energyzarr webpage cited above, where an estimate for how much energy needed for transporting 1 bit was 4.6 x 10^-6 joules. This the gives the energy for one byte as 0.0000368 joules/byte (4.6 x 10^-6 x 8). I’m no expert in energy calculations, but I believe that 1 joule could be seen as 1 Ws for practical reasons in my calculations. This would the give me 1.022222.... x 10^-7 Wh/byte.

I also found some carbon footprint estimates here: <http://www.altprofits.com/ref/widgets/co2_emission_calculator.html> saying that the carboon footprint of 1kwh is 1.37 lbs, which gives me 669.53377 g/KWh. I then get my final calculation needed to construct my carbon footprint calculator, where the footprint of one byte is: 1.0222222... x 10^-7 x 0.66853377 g(CO2)/byte.



These calculations are of course really rough, and based on the packets being sent via TCP, which is not the case when watching funny cats. But I still thought it was an eyeopener for me, and made me think about if I really need to watch that video, or update my facebook page every three minutes.
Heres the code needed to build the co2calculator in python(only works in osx):
#Gustav Rannestig co2calc.py 2012-09-20
import commands
import time

#Only works on OSX, for ubuntu the command needs to be rewritten in some clever way :)
Ibytes = commands.getstatusoutput("netstat -ib | grep -m 1 en1 | awk '{print $7}'")
InitialIBytes = Ibytes[1]

Obytes = commands.getstatusoutput("netstat -ib | grep -m 1 en1 | awk '{print $10}'")
InitialOBytes = Obytes[1]
BiteCount = 0
Co2Eq = 0

while True:
    time.sleep(5)
    Ibytes = commands.getstatusoutput("netstat -ib | grep -m 1 en1 | awk '{print $7}'")
    Obytes = commands.getstatusoutput("netstat -ib | grep -m 1 en1 | awk '{print $10}'")
    ByteCount = ((int(Ibytes[1]) - int(InitialIBytes)) + (int(Obytes[1]) -int(InitialOBytes)))
    InitialIBytes = Ibytes[1]
    InitialOBytes = Obytes[1]
    Co2Eq = Co2Eq + (1.02*(10**(-7))*0.6695377)*ByteCount
    print "Your Co2eq is" + str(Co2Eq) + " g of Co2"

2 comments:

  1. BTW, I too worked as a mailman for several summers during high school/undergraduate university studies...

    ReplyDelete