Home · ASPLOS 2023 · Energy, Power & Sustainability

Ecovisor: A Virtual Energy System for Carbon-Efficient Applications

Abel Souza, Noman Bashir, Jorge Murillo, Walid A. Hanafy, Qianlin Liang, David Irwin and 1 other

Conference
ASPLOS 2023
Published
2023
Pages
252-265
Citations
57

The electrical socket promises every server reliable power, hiding exactly the signals — grid carbon intensity, solar availability, battery charge — that software needs to cut emissions; the ecovisor virtualizes the energy system the way a hypervisor virtualizes a server, giving each application its own virtual grid, solar array, and battery to manage by its own policy.

The argument in one glance

  1. Problem

    Cloud growth is outrunning energy-efficiency gains

    Cloud capacity grew ~6× from 2010–2018 and keeps climbing, while the classic efficiency lever — power usage effectiveness — is already near its optimal value of 1. Continued growth means more energy, and with it more carbon. Every major provider has pledged to eliminate emissions while admitting the needed technology does not yet exist.

  2. What people did

    Buy offsets, or leave it to the platform

    Providers today mostly offset: purchase zero-carbon energy generated elsewhere and elsewhen to cancel out dirty consumption on paper ("100% renewable"). The alternative — actually shifting computation toward clean-energy availability — is treated as a platform-level scheduling problem.

  3. Why it fell short

    Offsets don’t cut real emissions, and platforms can’t choose for applications

    Offsets leave direct emissions untouched and lose potency as the grid decarbonizes. Real reduction requires trading performance and cost against carbon — and the right trade differs per application: a batch job can pause and burst, a web service must hold a 60 ms latency target. Meanwhile the energy system hides the very signals needed: the socket abstraction masks solar variability and grid carbon swings in hardware.

  4. This paper's idea

    Virtualize the energy system and hand each application the controls

    An ecovisor is to the energy system what a hypervisor is to a server: it gives every application a virtual grid connection, virtual solar array, and virtual battery, plus a narrow API — read solar output, grid carbon intensity, battery charge; set per-container power caps and battery charge/discharge rates. Applications then handle clean energy’s unreliability in software, each by its own policy — and app-specific policies beat one-size-fits-all system policies in every case study.

Why this problem is worth solving

The paper targets

work done per kilogram of CO₂ (and equivalent greenhouse gases) emitted — distinct from energy-efficiency, which is work per joule
, and the distinction is the intellectual core. A perfectly energy-efficient datacenter running on coal power is carbon-inefficient; a wasteful one running on surplus solar is carbon-efficient. Energy-efficiency looks inward at the machine; carbon-efficiency looks outward at where and when the electricity comes from. (For the complementary outward question — operational versus embodied carbon — see the Carbon Explorer explainer elsewhere on this site. This paper addresses operational, “Scope 2” emissions only.)

The outward view is volatile by nature. Zero-carbon sources are intermittent: solar output tracks the weather and the hour. And

the emissions per unit of grid energy (g·CO₂ per kWh), which varies hour to hour as the grid dispatches different generators — hydro at night, gas peakers at demand peaks
swings substantially within a single day. Computing is uniquely placed to exploit this volatility: workloads have temporal flexibility (run later), spatial flexibility (run elsewhere), intensity flexibility (run slower or wider), and mature fault-tolerance (checkpoint, replicate, recompute) to survive being throttled.

None of that flexibility can currently be used, because of an abstraction. The electrical socket implements what the paper calls the reliability abstraction: power is always available, up to a maximum, no questions asked. Modern datacenter energy systems — grid connection plus batteries plus co-located renewables — hide all their internal richness behind it. Software gets no visibility into carbon intensity or solar output, and no control over power flows. The abstraction that made electrical engineering simple now blocks climate engineering.

What people did before, and where it broke

Carbon offsets. The dominant industry practice: keep operations unchanged, buy renewable generation elsewhere as an accounting counterweight. Offsets require no operational change — which is precisely their limit: direct emissions continue, and as grids decarbonize there is less and less dirty energy elsewhere to offset.

System-level carbon scheduling. Research like WaitAWhile suspends jobs when grid carbon intensity is high and resumes them when it drops — a policy the platform applies uniformly. It works, but bluntly: the paper measures 24.5% carbon reduction on an ML training job at the cost of 7.4× longer runtime. A uniform policy cannot know that one application parallelizes cheaply while another bottlenecks on synchronization, or that a web service cannot suspend at all.

The auto-scaling precedent. Cloud platforms already faced this exact dilemma for resources: how many servers an application needs under varying load is application-specific knowledge, so platforms exposed elastic auto-scaling APIs and delegated the policy to applications. The ecovisor argues carbon deserves the same treatment: the platform provides mechanism and isolation; the application, which knows its own performance-cost-carbon trade-off, provides policy. Existing monitoring APIs (CloudWatch, Azure Monitor) could be extended with power and carbon the same way.

The ecovisor architecture

  1. Physical energy system

    Up to three sources — grid connection, local batteries, local solar — feed the server cluster. Component APIs (smart power hubs, battery management like Tesla Powerwall, real-time carbon services like electricityMap) expose measurements and controls that the reliability abstraction previously buried.

  2. Ecovisor core new

    Privileged software that multiplexes the physical energy system into per-application virtual energy systems — each with a virtual grid connection, virtual solar share, and virtual battery — and enforces isolation between them, the way a hypervisor multiplexes CPU and memory.

  3. Narrow API (get / set / tick) new

    Getters: solar output, grid power and carbon intensity, battery charge level and discharge rate, per-container power and caps. Setters: per-container power caps, battery charge rate, battery maximum discharge. A tick() callback fires every interval so applications re-evaluate policy against fresh signals.

  4. Container orchestration platform

    The ecovisor wraps an existing COP (the prototype extends LXD; Kubernetes would work the same way): containers stay the unit of resource allocation, with power caps enforced by limiting per-core utilization through cgroups.

  5. Applications with their own policies new

    Each tenant implements carbon policy in its own code against the API: a batch job suspends and scales, a web service budgets carbon against a latency SLO, a solar-powered pipeline manages its battery’s state of charge.

Prototype: ~2,650 lines of Python wrapping LXD, PowerAPI + InfluxDB for power telemetry, electricityMap for live carbon intensity — running on an ARM microserver cluster with a real power bus: grid feed, physical battery, and a $10K Chroma solar-array emulator replaying real solar traces.

The idea

Virtualize energy like compute. Each application receives a virtual energy system: a share of grid power, a share of the solar array’s variable output, and a slice of the battery’s energy and power capacity. The ecovisor meters and attributes everything — power, energy, and carbon — per container and per application.

Mechanism has fixed physics; policy is free. The virtual system follows conservation rules the application cannot break: virtual solar is used first; excess solar charges the virtual battery; demand beyond solar draws from the battery up to the application-set maximum discharge rate, then from the grid — with grid carbon attributed to the application. One subtlety the paper enjoys: unlike CPU schedulers, which may choose to be non-work-conserving, an energy system is energy-conserving by physics — excess solar when a battery is full must go somewhere (be reassigned to other tenants, net-metered to the grid, or curtailed), and that choice is an explicit platform policy.

The API is deliberately narrow. Three setters (container power cap, battery charge rate, battery max discharge), a handful of getters, and a periodic tick() callback. Everything applications need to implement suspend-resume, scale-up, carbon budgeting, or battery management — and nothing that entangles the platform in their logic. Power capping rides on proven container machinery (per-core utilization limits via cgroups).

Policies live where the knowledge lives. The case studies are the argument. A Wait&Scale batch policy suspends above a carbon threshold but scales up below it — and its optimal scale factor is application physics: ResNet training stops benefiting at 2× (gradient synchronization overheads), while embarrassingly-parallel BLAST profits through 3× and only saturates at 4× (its task-queue server becomes the bottleneck). A web service cannot suspend, so it budgets: banking carbon credits during low-carbon or low-load hours and spending them to hold its 95th-percentile latency SLO through simultaneous carbon and traffic peaks. No platform scheduler could know any of this.

A day on the prototype: two tenants, one energy system

Tenant A = elastic BLAST batch job (Wait&Scale policy, carbon threshold at the 33rd percentile of the trace). Tenant B = distributed web service (dynamic carbon budget, 95th-percentile latency SLO of 60 ms). Carbon intensity replayed from real California grid (CAISO) traces; solar from the array emulator. Virtual battery = each tenant's slice of the physical battery.

Step 1 of 5

Morning: cheap, clean, and quiet

Grid carbon intensity is low and the web service’s traffic is light. Tenant B’s policy serves the load with few containers, spending carbon well below its budgeted rate — banking the difference as credits. Tenant A sees carbon below its threshold on its tick() callback and scales BLAST from 4 to 12 workers (3×), bursting through work while emissions per operation are cheapest.

B: low load → banks carbon credits
A: carbon < threshold → scale to 3×

Why it works

  • The socket’s reliability abstraction hides carbon signals in hardware → virtualizing the energy system re-exposes them as software state → applications can finally use their temporal, spatial, and intensity flexibility on the actual problem.
  • The performance-cost-carbon trade-off is application knowledge (sync overheads, SLOs, delay tolerance) → delegating policy to applications, like auto-scaling did, puts decisions where the information is → app-specific policies dominate system-wide ones in every experiment.
  • Mechanism/policy separation keeps the platform honest → the ecovisor enforces conservation and isolation (your battery, your carbon attribution) while refusing to guess preferences → tenants with opposite policies coexist on shared hardware.
  • The API mirrors proven cloud idioms (get/set/tick, per-container caps via cgroups) → adoption is an extension of existing COPs and monitoring APIs, not a new stack.
  • Batteries turn carbon volatility into an arbitrage opportunity → charge when clean, discharge when dirty — under application control, sized to each tenant’s risk tolerance.

What it costs

  • Application effort. Carbon policy becomes tenant code; naive or adversarial policies waste their own budget (though isolation contains the damage).
  • Small scale. The physical prototype is ARM microservers (1.35–10 W each) with a 2 kW solar emulator; datacenter-scale runs use simulated energy sources on 16 Xeon servers.
  • Missing incentives. The paper is explicit: without carbon pricing or caps, no financial force pushes tenants to use these controls — a social problem the ecovisor enables but cannot solve.
  • Scope 2 only. Embodied (Scope 3) carbon — manufacturing — and direct (Scope 1) emissions are out of scope; so are spatial (multi-datacenter) policies, though the API could support them.
  • Attribution fidelity. Virtual accounting inherits the accuracy of software power meters and of grid carbon-intensity feeds, both approximations.

The evaluation

The prototype virtualizes a real physical energy system: an ARM-microserver cluster on a power bus fed by grid, physical battery, and a Chroma solar-array emulator replaying real solar traces, with carbon intensity from real CAISO (California grid) 2020 data. Case studies run concurrently as tenants, each policy compared against carbon-agnostic and system-level baselines.

Carbon policies: none, one-size-fits-all, and application-specific

PropertyCarbon-agnosticSystem-level policy (uniform)Application-specific via ecovisor
ML training (PyTorch ResNet34, CAISO traces)
BLAST (embarrassingly parallel search)Fastest, dirtiest
Web services (95th-percentile SLOs of 60/70 ms)Meets SLO, ignores carbon
What it requiresNothing
Physical prototype: ARM Cortex-A53 microservers (1.35 W idle–10 W peak, some with Jetson Nano GPUs) on a real power bus with grid, battery, and Chroma 62020H-150S solar emulator; simulated energy sources for a 16-node Xeon cluster. Carbon intensity: real CAISO 2020 traces via electricityMap-style feeds; batch experiments repeated 10× with randomized arrivals; thresholds at the 30th–33rd percentile of trace carbon intensity.Underlined values explain themselves when clicked.

A third case study runs a solar-plus-battery-only (“zero-carbon”) setup: a delay-tolerant Spark preprocessing pipeline and a web server share one panel and one battery, each managing its own virtual battery differently — Spark tracking the solar curve with its worker count, the web server drawing a guaranteed minimum power to smooth solar volatility under a minimum state-of-charge policy. The multi-tenant runs confirm the isolation story: concurrent tenants with opposite policies each meet their own goals on shared hardware.

Check your understanding

  1. 1. Datacenter A is maximally energy-efficient but grid-powered by coal; datacenter B wastes 30% of its energy but runs on surplus solar. Which is more carbon-efficient?

  2. 2. The Wait&Scale policy’s optimal scale-up factor was 2× for ResNet training but 3× for BLAST. Why does this difference justify the ecovisor’s whole architecture?

  3. 3. An application’s virtual battery is full and its virtual solar share still exceeds demand. A CPU scheduler could simply choose not to allocate spare cycles — why can’t the ecovisor do the equivalent?

  4. 4. Both the static carbon rate-limit and the dynamic budgeting policy spend the same total carbon over the trace, yet only the dynamic policy holds the web service’s 60 ms tail-latency SLO. What makes the difference?

Related papers on Energy, Power & Sustainability

See all 37 →