With the movements toward more environmental-awareness, is there room is software engineering to be more green, in the processes applied to a software project or the output of the project itself?


The most common interpretation of "green" is currently "low carbon footprint", which in turn means "low energy consumption". Until recently, I have worked five years with an energy efficiency consultant company, and I know that between 20 and 50 per cent of energy consumption in office environment and IT is completely expendable.

This has nothing to do with software development specifically, but there's essentially two basic rules that will definitely help to reduce energy use:

Measure, don't guess

What is really the energy consumption of your devices, your office, your machinery, your plant, your building at each time of the day / week? You wouldn't believe how much energy consulting is done based on assumptions and never verified.

Always make load patterns match usage patterns

Almost everything that uses energy has some distinct usage pattern. Offices aren't used at night (well, mostly, anyway), factories have shifts, PCs are not used when the user is at lunch etc. It's actually really fascinating to watch the load patterns in a detailed measurement and look for hints that the usage pattern might not quite match. The picture below shows two buildings which are similar in size and usage and yet differ greatly in their load pattern.

two office buildings of the same company

If you use IT resources and / or work in an office environment, the following is a very typical list for improvement:

  • Reduce standby consumption to zero. An unoccupied office at night should normally draw zero Watt. Any other number is waste. Turn off monitors and hibernate your computers when you go to lunch. There's a lot more.
  • HVAC (Heating, Ventilation and Air Conditioning) is typically not well adjusted. Load patterns don't match usage patterns at all (offices are cooled on weekends and at night), threshold values are poorly chosen or set to factory defaults. Actual demand (how cold do you really like your office) is more guessed than verified. This is especially bad, since these units are large energy consumers and many are already very inefficient in themselves. One centigrade higher room temperature means 6% less energy for cooling. That's an easy way to reduce carbon emissions.
  • In server rooms, check the airflow in the racks. Many server rooms are kept at very low temperatures (21 C) to counteract inefficient air transport. The hardware will be happy with 40 or 50 C, and it's the temperature on the boards that counts. Measure that and see how far you can take your hardware. I know of a company in Bremen, Germany, that runs its server room without any cooling (just ventilation) at 40 C. It's awfully hot and noisy in there, like the machine room of a ship or submarine, and usually, nobody ever goes in. For scheduled work, the cooling is switched on two days before the admins go in. For emergencies, they put on their ear plugs and swimming trunks (this is absolutely no joke). It's machine territory. The energy bill is down 80% (they also use the excess heat for heating the offices in the winter).

If you write software that influences machinery or the way people act (resource planning, plant operation), think about how you have an impact on energy use. For example, you could write something like PowerNap.

Edit: One area where the load pattern is normally totally decoupled from the usage pattern is data centers. At least in the data centers we monitored back at my last company, the (electric) load pattern was just a flat, straight line, while for example the network load had very clear peaks and long stretches of almost no load at all. This is because all servers run 24/7, and it's not that easy to really shutdown and boot servers according to load. If anyone knows of data centers that do this, or of cluster operating software that can be used to do this, please post a comment. I'll also ask that stuff on the IT version of StackOverflow once it's up.

  • Switch off your monitor when not in use
  • Switch off your computer when not in use
  • Buy a OneClick gang socket
  • Use standby or hibernate more often
  • Don't use a screen saver (see bullet 1)
  • Switch off your second/third/fourth screen when not in use
  • Declock your GPU or processor
  • Don't print stuff
  • Buy more ebooks
  • Get Jon Skeet to null your carbon footprint
  • carve your own bits out of wood - they're organic, all-natural, and reduce the deleterious effects on the Earth's precious magnetic field
  • don't destroy electrons, recycle them instead
  • remove bounds-checking, validation, and other unnecessary code - less clock cycles means less energy consumed
  • breathe half as much - the CO2 output of humans is extensive and most of it is wasted
  • never recycle paper, plastic, or metal - recycling requires far more energy than creating a new one
  • garbage-collect memory only once per week, to cut down on transportation costs
  • believe every green thing you read on the internet, and party like it's 1499

The single biggest point of contact between the software you write and being Green is people on notebooks. When the owner is running on battery: they want you to be as energy efficient as possible.

This means your software should detect when you're running on battery and take steps to cut energy usage:

  • disable animations
  • disable background spell-checking
  • disable background printing
  • turn off gradients
  • use graphics.SmoothingMode = SmoothingMode.HighSpeed;
  • use graphics.InterpolationMode = InterpolationMode.Low;
  • use graphics.CompositingQuality = CompositingQuality.HighSpeed;
  • minimize hard drive access - to avoid spin up
  • minimize network access - to save WiFi power

And in all cases (especially if you're writing software to run on hand-helds) write efficient code. Efficient code runs faster, which means it stops running sooner. And the computer is using the least energy when it is idle.

Which brings up another point: don't poll. Don't use busy loops. Use events to get woken up when something happens. Use timers. Use callbacks. etc.


You can host sites using solar power @ http://www.aiso.net


I think this question is being posed to the wrong side of the process.

Software engineering is just an enabling tool. The product it's applied to is where the environmental friendliness comes in. e.g. requirements that allow PDF rather than hard-copy reports for a financial system.

It's similar to asking "can we make chemistry more green?". A better query on the applied side: can we make rocket propellant less environmentally damaging.


I think the ideas that most people put forward about turning off the monitor etc are really good. But to be honest I think the most effective ways to reduce your carbon footprint are those that are available for everyone, including IT-people.

  • Take the bike, or walk to work, if possible.
  • ... otherwise use public transportation or car pooling.
  • Turn off the lights in rooms where there are no people.
  • Turn off electrical devices that you don't currently use. Don't just put it in standby!
  • Use telecommunication instead of physical meetings if the latter means you have to travel far.
  • Avoid flying. Use trains if possible.

Use less computers and servers by virtualizing. That way I still get all the perceived toys I need, and it's really not a problem.


Telecommute. Or live within walking/biking distance of work. If you drive 45 minutes to work, how much do you really save by undervolting your processor?


Looking more specifically at process improvements, I think the development communities have made great "green" strides in how projects and processes are managed.

Our organization no longer carries huge three-ring binders of project plans, portfolios, and versions around--everything is electronic. All of our brainstorming is either done through electronic whiteboards, physical whiteboards (though Etch-e-sketch markers may not be the most 'green'), or online. I honestly can't think of the last time we printed out our project information or proposals (beyond a signing sheet for the legal team).

Developers (and IT in general) also have better tools for virtualization available to them--a test environment no longer requires a handful (or room full) of physical machines to prototype, test, and roll out new products. This saves organizations both in the cost of the hardware, the space and resources to operate it (air flow, energy, manpower), and the environmental effect of the creation of the machine.

These little steps for process improvement will add up along with the physical energy savings that others have mentioned (low power devices, etc).


  • Focus on removing 'paper' from the process flow. Almost all project management practices have an electronic means--explore and find one that fits your organization.

  • Co-locate project teams when possible. If not, try electronic communications (video conferencing, etc) rather than driving. Our organization has 100+ sites around the area (public K-12 school district) and we've had great luck at "webcasting" to our own staff for interactive trainings and continue to investigate these technologies.

  • Virtualize environments where possible to save hardware resources and enable reuse among machine images.

  • Work with HVAC technicians in your organization and find out what technology THEY need to better do their job. We built a system for our HVAC technicians that they use to manage schedules, environmental settings, and pre-program our HVAC units in the schools to ensure that they are properly cooled/heated (only when the building is populated, etc) and that lighting is also reduced when unnecessary.


Spinning hard drives, powering screens, and using processes are the biggest energy consumers. Programmers have control over how often a hard drive is accessed and how much CPU their programs take to run. You can focus on reducing theses two activities if you want to decrease your power consumption. Keep in mind though, that humans are by far the biggest users of energy, so if you make a program that reduces labor needs you are being quite green.


Things you can do yourself are all very well, but for mass savings you need to think about the code you're writing.

An important factor in reducing power usage for programs is to let the processor spend as much time as possible idleing in the C1 or lower power states, and avoid constantly transitioning to awake. This is particularly important for laptops where battery time can be conserved, but is also applicable to desktop PCs.

The key is to avoid many short wakeups and instead either remove things that wake the processor (eg. getting an idle event 50 times a second just to animate a blinking cursor,), or at least to batch all your processing together. It's better to spend a chunk of time using the processor hard, and then sleeping than to use the processor at a constant low rate over this time (often called the "Race to idle" approach)

The down-side is that this really needs to be applied to all applications used. Its no good making app A super efficient if app B still wakes the processor every few milliseconds. There are some OS level things that can be done to help though - eg. firing timer events lower precision so that lots of events close together can be batched, resulting in only a single wakeup.

On Linux and Solaris, A great tool for analysing what is going on wrt sleep states, and what applications are doing to wake the processor up is PowerTop.


No one seems to have mentioned them yet, so I'll give AMEE a plug.

AMEE is an acronym for ?Avoiding Mass Extinctions Engine?. We believe that by measuring, monitoring and acting on energy efficiency on a mass scale, we can substantially affect issues such as Climate Change, Peak Oil, Sustainability and Globalisation (all of which are closely inter-related).

I'm not yet entirely convinced as to its utility, but they seem to have some interesting ideas.


Most things listed are things a developer can active directly apply to his environment. But a developer has far more power: He can enforce it on the other by putting it in his products. Of course not all products qualify for something like this.

If you programm gui/os enviroments (e.g. for some embedded stuff) actually dont programm a screen saver in (I had just an embedded project where the corporation name scrolled through the lcd display), but instead switch the machine into a power saving state. Also as OS developer you have sometimes the chance to tradeoff between different aspects: security vs. speed, space vs. versatility, ... and sometimes you have energy on your list => give priority to it.

As a guy who works much with hardware, esp. FPGA, there is often the chance to make a design more greener on the cost of speed or latency. There are even now some compiler/synthesetools which are energy/power aware, you just have to use them.


Conserve and Plan your Google searches [2 searches=1cup of tea]:P

Use more power efficient lighting at your office. Since i think the lights are on most of the day if you're office is pretty dark. Best would be to have natural light.

But since we're only contributing up to 2%, it would be better if we can do something about that other 98%.

As unbelievable as this sounds, it seems that research has shown that two Google searches generate about the same amount of CO2 as you would get from boiling a cup of tea. It's also a rising cause of concern for greenies as the IT industry now generates 2% of the world's CO2 emission. This is similar to what the aviation industry generates. I don't know about you guys, but 2% is quite a small pittiance compared to what the 98% of the other industries are doing. When it becomes to something like 10% of the CO2 emissions in the world, then we probably have a cause for worry.

timesonline.co.uk - While millions of people tap into Google without considering the environment, a typical search generates about 7g of CO2 Boiling a kettle generates about 15g. ?Google operates huge data centres around the world that consume a great deal of power,? said Alex Wissner-Gross, a Harvard University physicist whose research on the environmental impact of computing is due out soon. ?A Google search has a definite environmental impact.?

Get more stats here.


How about some more controversial ideas. 1) Program in efficient languages instead of a productive ones. Sure it is going to take twice as long to code in C as in Python but since your app is 10x faster, you can buy 1/10 the machines. Big win from both a power consumption and a resource usage model but you will spend more energy developing your app.

2) Don't use web apps. Will go with the theory local apps use less net power. This may or may not be true.

3) Don't upgrade your hardware. If you make your app work on 5 year old technology, people will not upgrade. Of course modern hardware is more efficient in general.

In general the green software is much less of a concern than the green lifestyle and other business choices. The energy in driving to work, heating the office, shipping (or the inefficacy of not shipping) the food and other things you buy, the frequency of replacement, size of the house you choose to live in and how green it is, and so on.


I'm sure the question is sincere so it's nothing personal, but I cannot imagine caring too much about this. I think I'd rather leave my monitor on longer and my air conditioner on lower. I believe being green has more hype than all web frameworks and programming languages combined.

edit: I'd like to be more green as in greenbacks - shame on me - greedy capitalist.


These days I always get a little pissed off when I see fellow programmers showing off their "Latest" cool 3D screen saver and then leave it on all night, its so pointless.

But instead of repeating the old answers, I'd like to expand it a little.

Go Virtual:

  • Instead of running 4 different computers to test stuff on different bits of hardware, run Virtual Machines (VPC, VMware, Xen, Virtual Box etc...)

  • Remember that server rooms consume an enormous amount of power, its goes way beyond the power required to keep the server on, it takes a huge amount of power to cool down server rooms. Going virtual in the server room a lot of times means you can replace a ton of old machines with a single box AND increase performance AND improve the recoverability story AND decrease costs AND decrease emissions.


I've seen suggestions that relate to the computer-level savings, most of which can be controlled via your OS' Power Management settings.

But also consider:

  • Raise awareness, with the help of your Human Resources department, about the importance of saving power and going green.
  • The company can start a campaign to turn off lights from 12PM to 1PM, which is lunch time. We are already doing this, and it works well for those who opt to take a nap during this time.

Put your laptop on battery mode even when it is plugged in to mains electricity. This will force it to use much less electricity.



Try to use a font that use less ink when printing docs, like this one

That said, avoid printing docs, off course.


As others have pointed out here, measure, don't guess. There's an interesting podcast over on IT Conversations, where the Stack Overflow podcast is hosted, about exascale computing, discussing the future of developing the next generation of super computers. A major issue is going to be power consumption - the more you cram circuits together, the more power you consume. It seems that the most efficient way to code could be to optimise to minimise memory access, maybe trading off against floating point operations. One FLOP takes 10 picojoules of energy, and that figure can probably be reduced, but a memory access takes around 60 (listen at about 10 minutes in to the podcast).

I'm guessing this rather depends on the kind of computing we're talking about here (I'm inclined to think this is more relevant for server-based computing on on multi-core machines rather than on, say, laptops, right at the moment), but I get the impression that the interviewee on the podcast would advocate recalculating a value over retrieving it from memory, at least in some cases.


Up to a point, using dark backgrounds instead of white ones.

Blackle does this, but it's very controversial because the energy they theoretically save is most likely more than consumed by the servers they had to set up to essentially proxy the google ones. Nice idea in principle though.


What about greenpeace' "cool it challenge"? IT leaders can promote their technology for more efficiency in production. This might reduce energy consumption by 15% alone. And it's fun to google bomb CEOs.



Since turning off the machines is normally not an option, I have tried to do implement the following at the office. Drinks, snacks, coffee are provided for us in plenty.

  • quit using disposable cups (both paper/styrofoam), bring a mug/glass from home
  • eat more fruits/veggies, the waste from these biodegrades or can be used as compost (instead of the foil/plastic wrapped snacks)
  • Use a projector instead of printouts all the time (notorious for printing out 5 copies of a 120 page document, from and back)
  • Get recycle bins for drink cans and paper (print outs)
  • Drink less carbonated beverages (cuts down on the number of farts/burps released into the world).

Most of these things don't really make a big difference, but it adds up eventually I would think.


There are several main uses of energy in IT and telecoms:

Obtaining raw materials for hardware:

  • for example, iPhones use Coltan, the trade for which drives the war in the Congo. Wars use a lot of energy, even if you don't care about people dying. That iPhone app you're thinking of writing is black and bloody, not green.

Manufacturing the hardware:

Running the hardware:

  • this matters most for server centres, which are too densely packed for ambient cooling, but also applies to high-end games machines.

  • the number of servers you need and their energy use depends on their load. This is one thing software engineer can do - don't use interpreted languages like Ruby which require orders of magnitude more CPU cycles ( and hence energy ) to run compare to C, at least until the various projects which are trying to improve its performance have done their work.

Disposing of the hardware:

  • lots of nasty chemicals to end up being in landfill or incinerated.

So the logical conclusion is not to hang onto your old hardware and repair it as much as possible,use desktops rather than laptops as you can replace components on failure more easily, buy higher quality servers ( both for better energy consumption and for longer life ), and only get a new mobile if your old one is beyond reasonable repair.


(deleted off topic, borderline inflammatory spam)