Measuring Software Energy Usage

Bookmarks

Log Entries

09.09.2024. Cloud Solutions Make It Hard to Measure Energy Usage

Bogotá, Colombia

Today I continued my exploration into measuring energy usage for a server. To my dismay I discovered that when running software within a VPS, measuring its energy usage becomes impossible. A VPS obscures the underlying hardware to protect other servers running on the same hardware. Theoretically, an attacker could use the energy data to perform side-channel attacks to extract private keys from other users, so there are good reasons to keep the data hidden in virtualized systems.

All the companies that I have worked for rely on VPSes and VMs, with no access to the underlying hardware. I imagine at this point it is pretty standard in the industry, which makes me think that few companies are able to measure their energy usage and understand the footprint of their backend.

It is unfortunate because sharing the hardware also means that we could leverage it more efficiently, and avoid over-provisioning hardware. At the same time, when you do not understand how much energy the software is using, it encourages wastefulness.

Related Reading

- Marc

22.08.2024. Measuring Software Energy I

Bogotá, Colombia

I've been interested lately at looking at the energy usage of software.

Since my current energy usage is invisible to me, it is hard to actually grasp just how bad the situation is. But I often am amazed at how inefficient many solutions are, they offer very little gain.

For example, to ensure that a service is always available, at my old job we had 3+ servers running in parallel, just in case one server hall gets hit by a tornado or other disasters.

Most services do not even need 99.99+% availability, they'd be fine with just 2 nines. Maybe that's what we should strive for?

Anyways, if we want to understand what we can do better, it is good to understand the energy footprint right now.

After some investigation I came by websitecarbon.com, which is extremely easy to use and gives some rough estimations. It estimates the cost of:

It links to Sustainable web design: Estimating digital emissions which I will need to look at closer.

I also asked a Permacomputing group if they had any recommendations. Almost immediately I was recommended a few tools for measuring energy usage:

Excited to dive deeper into these resources and see how I can understand and optimize.

- Marc