Tech Tip #46: Do containers waste energy?

Containers add a small energy tax. Consolidation pays it back.

Video created by explainapaper.com

The problem

Some teams avoid containers fearing overhead. Measurements show Docker adds slightly more energy than bare metal, mostly from I/O virtualisation, but packing workloads onto fewer machines usually outweighs it.

The fix you can use today

  • Consolidate containers onto fewer, busier nodes.
  • Avoid unnecessary layers of virtualisation (containers inside VMs inside VMs).
  • Shut down nodes the bin-packing frees up.

A study found that Docker adds only a little energy compared with running on the bare machine. GreenCode's research review draws on this work.

Tools that help

  • Kepler: exports energy estimates per pod and container on Kubernetes, using eBPF and hardware counters
  • Scaphandre: measures the power drawn by each process on a Linux server and exports it to Prometheus and other monitoring stacks

How GreenCode helps

GreenCode helps tackle this by mining a running estate, rebuilding it as infrastructure as code and tracing energy and CO2e to the services that cause it, including services barely running at all. More on this.

Tags

#docker#kubernetes#right-sizing

Sources

All GreenCode Tech Tips

  • Tip #46
  • For Ops and infrastructure
  • Category Containers, Kubernetes and serverless
  • Format short video
GreenCode

Want this checked on your own system? Talk to the GreenCode team.

Get in touch