Reducing IT's Environmental Footprint: A Developer's Guide

High-Level Recipe for Developers to Reduce IT Carbon Footprint

Firstly, look at reducing the energy on a given platform for the problem. The following points are all important and may need some iterating between them: 

Methodology

Example

Here is an example of reduction in carbon footprint caused by the execution of matrix calculations on with use of different programming languages, libraries and simulating running it on different “greener” power source compared to local one. 

Languages tested C, Fortran, CUDA, Python with NumPy library, Python with CuPy library respectively. (Estimated emissions data gathered from electricitymaps.com, as of 27.08.2024)

Figure 1
Figure 2

Figure 1 and 2 show the results of matrix calculations, they were tested on the same data set and with acceptable accurate results. By using CUDA which runs on the GPU, the system did use more power, but a lot less energy. This was due to much lower time required to run the same calculations compared to C or Fortran, where the calculations were taken on the CPU. When using the maths library NumPy, the reduction was even higher, even when running only on the CPU. Introducing the CuPy library, which is similar to NumPy but allows the utilisation of the GPU, shows that in this scenario that using only the CPU would be the “greener” option. The data set was too small to fully utilise CuPy full potential. Therefore, the total reduction would total to 99.81%.

Additionally, Figure 2 shows the potential reduction when using a different power source, which in this scenario would be in the country of Sweden than in the UK in Figure 1. This method shows that there is a massive potential with using electricity from sources with lower CI. The reduction would come down to 92.67% when comparing to Figure 1, and to the total of 99.986%. 

Summary

In summary, we first try to find an implementation that uses the least energy, and then we attempt to use the supply with the least Carbon Impact. Combining those methods should significantly reduce the impact of your code on carbon emissions produced by energy used when running it, and contributing to producing green software.

 

References

Electricity Maps (n.d.) Available at: https://app.electricitymaps.com/zone/GB (Accessed on: 5th August 2024)

Ekkono Solutions AB (2020) Energy Efficient Algorithms. Available at: https://www.ekkono.ai/wp-content/uploads/2020/12/SWP_Energy_Efficient_Algorithms_Ekkono_Solution_May_2020-2.pdf (Accessed on: 27th August)

GeeksforGeeks (2023) Computer Organization | Locality and Cache friendly code. GeeksforGeeks. Available at: https://www.geeksforgeeks.org/computer-organization-locality-and-cache-friendly-code/.  (Accessed on: 27th August 2024)

Goekkus, F., Hilty, Prof. Dr. L. and University of Zurich (2013) Energy Efficient Programming. Available at: https://files.ifi.uzh.ch/hilty/t/examples/bachelor/Energy_Efficient_Programming_G%C3%B6kkus.pdf (Accessed on: 27th August 2024)

National Grid (n.d.) Carbon Intensity. Available at: www.carbonintensity.org.uk  (Accessed on: 4th September 2024)

Pereira, R. et al. (2021) “Ranking programming languages by energy efficiency,” Science of Computer Programming, 205. Available at: https://doi.org/10.1016/j.scico.2021.102609.