Articles

Energy efficiency of programming languages

Servers are taking an ever growing share of our electricity usage. Of course, they exist to run applications. And the energy consumption is, to a large degree, determined by the applications running on them. Ironically, servers turn electricical energy into thermal energy and thus contribute to global warming in a very concrete sense. When I look around, I don’t see a lot of discussion happening around the responsibility of application developers regarding energy usage and the impact this has on climate change.

Website tech update

It was time for several updates. This site is now hosted by Codeberg instead of GitHub, Edit: doesn’t work yet, so for now it’s still GitHub. created using Hugo instead of Jekyll, using a different template/theme. I’m also contributing a few additions to the Hugo theme.

Mit dem Mountainbike auf den Grünten? Nein.

Wer ins Oberallgäu fährt und eine Leidenschaft für das Radfahren mitbringt, wird vielleicht auf die Idee kommen, mit dem Mountainbike auf den Grünten, den “Wächter des Allgäus”, zu fahren. Spoiler: es macht keinen Sinn und ist gefährlich. Mir ging es auch so. Der Grünten ist ein alleinstehender, attraktiver Gipfel und mit 1738 m höher als viele andere Berge in der Umgebung. Außerdem gibt es (außer für Mitarbeiter_innen des Bayerischen Rundfunk) keine Bergbahn.

Gekommen, um zu bleiben: Gründe, jetzt das Fediverse zu betreten

Zuletzt aktualisiert am 22. Juli 2022 In meinem vorigen Beitrag Wir treffen uns im Fediverse habe ich über dezentrale soziale Netzwerke und das Fediverse geschrieben. Verglichen mit den großen, zentralisierten Vorbildern ist das Fediverse im Moment klein. the-federation.info listet noch nicht einmal 3 Mio Accounts. Etwa 500.000 davon waren innerhalb der letzten 30 Tage aktiv. Lohnt es sich da, Zeit zu investieren, sich ein Netzwerk aufzubauen und Tools zu testen? Oder sogar darüber zu reden und andere Menschen, die wir im Fediverse vermissen würden, zum Mitmachen zu überreden?

Wir treffen uns im Fediverse!

Der Jahreswechsel steht an, und damit drei Gründe, sich mit Alternativen für die zentralen sozialen Netzwerke zu befassen: Wir brauchen natürlich einen guten Vorsatz für das neue Jahr (oder eher für die ersten paar Wochen des neuen Jahrs) Wir haben vielleicht ein bisschen Urlaub und Zeit Die Bekanntwerdung des neusten Facebook-Skandals liegt erst wenige Tage zurück Die Facebooks und Twitters können nicht unsere Zukunft sein. Brauchst Du Gründe? Die Macht, die diese Konzerne konzentrieren, ist gefährlich.

ESP8266 publishing DHT temperature and humidity via Web Thing API

After reading through some of the Mozilla IoT examples, I got an ESP8266 to publish temperature and humidity values via the Web Thing API. Here is the code: Link

Zusammen braucht man weniger

Vom (Gedanken-)Experiment des Müllvermeidens zu einer hyperlokalen Tauschplattform für den täglichen Bedarf Language notice: this is a post about how to share resources between neighbours. As I am living in Germany and my neighbours speak German mostly, I feel like I have to write this in German. Eigentlich möchte ich gar nicht erst anfangen, zu erklären, warum. Eigentlich möchte ich einfach voraussetzen, dass wir alle der Meinung sind, dass wir unseren Fußabdruck so klein halten sollten, wie möglich.

Re-claiming my content

Yesterday I was stuck in a commute situation, so I had a rare moment of boredom and reflection and decided to google jekyll microblogging to find out how easy it would be to make my blog fit smaller content chunks. I felt like gathering what I’m emitting on my home turf, at www.sendung.de, which is a Jekyll site served by Github Pages. What I found was a great post by Fiona Voss that shows a way to re-claim my content by using my own blog as the center of my conversation in other channels.

Visualizing the Tour de France General Classification Build-Up

The 104th edition of the Tour de France is in full swing. Time to have a look at how the General Classification developed so far. Wait, what? General Who? Tour de WTF? OK, sorry. If you have no interest in the sport of riding bicycles and never heard of the most popular bike race in the world, maybe start with a Wikipedia article. To the rest who knows at least that there is such a thing as the Tour de France, let’s revisit how that race works.

Idea: DIY Sourdough Incubator

The idea of breaking bad baking bread, really good bread, is super-fascinating to me. I got recently amazed by this guy named Lutz Geißler, who seems to be on a mission and already published nearly 800 bread recipes in his blog called Plötzblog. I found him via an episode of the radio show Alles in Butter on local radio WDR5. If you want to find out more about him, bread and his driving forces, check out this lengthy and fascinating talk with him and Tim Pritlove (all in German).

Energy efficiency of programming languages

July 24, 2022

Servers are taking an ever growing share of our electricity usage. Of course, they exist to run applications. And the energy consumption is, to a large degree, determined by the applications running on them.

Ironically, servers turn electricical energy into thermal energy and thus contribute to global warming in a very concrete sense.

When I look around, I don’t see a lot of discussion happening around the responsibility of application developers regarding energy usage and the impact this has on climate change. We are used to juggling often contradicting goals like software maintainability, development and release cycles, user experience, and security. Yet we fail to take into account how our applications could be made more friendly to our climate. And, to be honest, that makes me quite unhappy.

Is it ignorance? Do we under-estimate the effects of our decisions?

When developing an application, we can make many decisions that influence the energy usage. For example, whether our program should query an API periodically – and if yes, how often – or whether the program should instead receive messages whenever a relevant change happened. Whether data should be calculated or persisted to memory. And even which programming language the application should be written in.

Pereira et. al. (2021) have compared the energy efficiency of several popular programming languages based on a benchmark suite. The diagram below shows the relative energy consumption, with values normalized to the most efficient one. So C, as the most energy efficient, has the value 1.

To compare Ruby (69,91) with Go (3,23), for example, we simply divide the larger by the smaller value and find that the factor is 21.64.

So in Ruby, the benchmark requires about 22 times the energy used when running as a Go program. Or about 68 times the energy of the Rust implementation. Or 70 times the energy of the C implementation.

I think these numbers are huge, in terms of relevance.

Maybe the numbers are not surprising to you, because you know about the differences between compiled and interpreted languages, for example. But maybe these numbers make you think whether your preferred interpreted language is the right one for your application.

References

Rui Pereira, Marco Couto, Francisco Ribeiro, Rui Rua, Jácome Cunha, João Paulo Fernandesd, João Saraiva. 2021. Ranking Programming Languages by Energy Efficiency. Preprint submitted to Elsevier. https://haslab.github.io/SAFER/scp21.pdf

💬 Comments

To comment on this article, you can use your fediverse account and reply to this Mastodon post.

This will load replies from mastodon.social to display them here.