Skip to content

Research: Existing VM Power Monitoring Projects and Comparison #3

Description

@dipankardas011

Comprehensive Research: VM Power Monitoring Projects

This issue documents existing projects doing similar work to vrapl and provides a detailed comparison.


Open Source Tools (Actively Maintained)

1. Scaphandre ⭐ (Most Similar to vrapl)

  • URL: https://github.com/hubblo-org/scaphandre
  • Focus: Energy consumption metrology agent
  • Architecture:
    • Uses RAPL on host
    • Qemu exporter for VM-specific metrics
    • Shares metrics via mounted filesystem to guest VMs
    • VM can access metrics with --vm flag
  • Attribution Method: CPU time-based proportional allocation (similar to vrapl!)
  • Status: Active, used in production
  • Comparison to vrapl:
    • ✅ Similar: CPU proportional attribution
    • ✅ Similar: RAPL-based measurement
    • ➕ More features: Prometheus exporter, multiple exporters
    • ➖ More complex: Requires filesystem sharing setup
    • vrapl advantage: Simpler, direct serial communication

2. Kepler (Kubernetes Efficient Power Level Exporter) ⭐

  • URL: CNCF Sandbox Project
  • Focus: Kubernetes container power monitoring
  • Architecture:
    • Uses eBPF to probe CPU performance counters
    • ML-based power models for instruction-level estimation
    • Works without direct hardware access (cgroups fallback)
    • Prometheus exporter
  • Attribution Method: Per-instruction power estimation (more sophisticated)
  • Status: Active CNCF project, growing adoption
  • Comparison to vrapl:
    • ➕ More accurate: Tracks individual CPU instructions
    • ➕ Cloud-friendly: Works without RAPL access
    • ➖ More complex: ML models, eBPF requirements
    • ➖ Different scope: Container-focused, not VM-focused
    • vrapl advantage: Direct hardware measurement, simpler

Caution

Currently Version 0.10.0+ the nonRAPL based systems cannot work and it need ML based estimations and there is a lot of ERROR

3. PowerJoular

  • URL: https://github.com/joular/powerjoular
  • Focus: Multi-platform process power monitoring
  • Architecture:
    • Two-step VM approach:
      1. Host monitors VM process power
      2. Shares data file with guest
      3. Guest reads from shared file
    • Supports RAPL, NVIDIA GPUs, Raspberry Pi
  • Attribution Method: Process-level monitoring
  • Status: Active (v1.0.0+ supports VMs)
  • Comparison to vrapl:
    • ✅ Similar: Two-step host/guest approach
    • ➖ Different: File sharing vs serial communication
    • ➕ More platforms: Works beyond x86
    • vrapl advantage: Real-time serial stream, libvirt integration

4. vJoule

  • URL: https://github.com/davidson-consulting/vjoule
  • Focus: Process energy consumption estimation
  • Architecture: Hardware-based measurements for processes
  • Status: Available but less documentation
  • Comparison to vrapl: Limited VM-specific features

Academic Research & Tools

5. BitWatts (EuroSys 2015)

  • Paper: "Process-level Power Estimation in VM-based Systems"
  • Institution: INRIA, University of Neuchâtel
  • Architecture:
    • Distributed actor-based middleware
    • Automatic power model learning
    • Multi-level virtualization support
  • Attribution Method: Application-agnostic power model
  • Status: Research project
  • Comparison to vrapl:
    • ➕ More sophisticated: Multi-level virtualization
    • ➕ Academic validation
    • ➖ Not production-ready
    • vrapl advantage: Simpler, production-ready

6. Joulemeter (Microsoft Research) [DEPRECATED]

  • Paper: "Joulemeter: Virtual Machine Power Measurement and Management"
  • Focus: VM power measurement through modeling
  • Architecture: Software-only power models from resource usage
  • Status: ❌ Deprecated (capability moved to Visual Studio)
  • Historical Significance: Pioneer in VM power measurement (2009)
  • Comparison to vrapl:
    • ➖ Model-based (less accurate than RAPL)
    • ➖ Windows-focused
    • vrapl advantage: Hardware-based measurement

Cloud Provider Solutions

7. Cloud Carbon Footprint (Multi-cloud)

  • URL: https://www.cloudcarbonfootprint.org/
  • Focus: Carbon emissions estimation across AWS, GCP, Azure
  • Architecture: API-based, estimates from cloud metrics
  • Attribution Method: Model-based estimation
  • Status: ⚠️ Uncertain (last release 1+ year ago)
  • Comparison to vrapl:
    • ➕ Multi-cloud: Works across providers
    • ➖ No direct measurement: Pure estimation
    • ➖ External tool: Not in-VM
    • vrapl advantage: Direct measurement, real-time

8. AWS Customer Carbon Footprint

  • Native AWS tool
  • ❌ No direct power metrics to VMs
  • Model-based emissions estimates

9. GCP Carbon Footprint

  • Hourly emissions tracking
  • ❌ No direct power metrics to VMs
  • Most detailed of big 3

10. Azure Sustainability Calculator

  • Application carbon footprint estimation
  • ❌ No direct power metrics to VMs

QEMU/KVM Specific

11. QEMU RAPL MSR Support (Built-in)

  • Feature: qemu-vmsr-helper
  • Status: Official QEMU feature
  • Architecture:
    • Exposes host RAPL MSRs to guest
    • Requires privileged helper daemon
    • Guest can read RAPL directly
  • Comparison to vrapl:
    • ✅ Similar goal: VM access to RAPL
    • ➕ Official: Part of QEMU
    • ➖ Read-only MSR access: Still needs calculation
    • ➖ Security concerns: Direct MSR exposure
    • vrapl advantage: Attribution done on host, safer

12. kvmtop

13. vmtop (DigitalOcean)


Comparison Matrix

Tool RAPL Direct CPU Proportional VM Support Cloud Ready Complexity Status
vrapl ✅ Yes ✅ Yes ✅ Yes ⚠️ Needs host access 🟢 Low ✅ Working
Scaphandre ✅ Yes ✅ Yes ✅ Yes ⚠️ Needs host access 🟡 Medium ✅ Active
Kepler ⚠️ Fallback ❌ No (instruction-based) ⚠️ Containers ✅ Yes 🔴 High ✅ Active
PowerJoular ✅ Yes ✅ Yes ✅ Yes ⚠️ Needs host access 🟡 Medium ✅ Active
QEMU vRAPL ✅ Yes ❌ No ✅ Yes ⚠️ Needs helper 🟡 Medium ✅ Official
BitWatts ⚠️ Model ⚠️ Learned ✅ Yes ❌ No 🔴 High ⚠️ Research
Joulemeter ❌ Model ❌ Model ✅ Yes ❌ No 🟡 Medium ❌ Deprecated
Cloud Tools ❌ No ❌ Model ✅ Yes ✅ Yes 🟢 Low ✅ Active

Key Findings

1. Scaphandre is the Closest Competitor

  • Same core approach: RAPL + CPU proportional attribution
  • More mature: Prometheus exporters, production deployments
  • More complex setup: Requires qemu exporter + filesystem sharing
  • vrapl is simpler and more direct

2. Kepler is the Most Sophisticated

  • Instruction-level power estimation via eBPF
  • Works in cloud without RAPL access
  • Kubernetes/container focused
  • Different use case than vrapl

3. Nobody Does It Exactly Like vrapl

Your serial communication approach is unique:

  • ✅ Real-time streaming to guest
  • ✅ Minimal dependencies (no filesystem sharing)
  • ✅ Simple architecture
  • ✅ Direct libvirt integration

4. The Industry Needs This

All cloud providers use model-based estimation:

  • No direct power metrics exposed to VMs
  • AWS, GCP, Azure: All use approximations
  • vrapl demonstrates hardware-based measurement is possible

5. Academic Validation Exists

Multiple papers (BitWatts/EuroSys, Joulemeter) validate:

  • ✅ CPU proportional attribution works
  • ✅ Process-level power estimation is feasible
  • ✅ Multi-level virtualization can be monitored

vrapl's Unique Position

Strengths

  1. Simplest implementation of RAPL VM attribution
  2. Serial communication - novel, low-overhead
  3. Direct libvirt integration - production-ready
  4. Real-time streaming - no polling, no file I/O
  5. Educational value - clear, understandable code

Gaps Compared to Competition

  1. ❌ No Prometheus exporter (Scaphandre has this)
  2. ❌ No multi-VM monitoring (monitors one at a time)
  3. ❌ No memory/IO attribution (only CPU)
  4. ❌ No web dashboard (PowerJoular has this)
  5. ❌ No container support (Kepler's domain)

Opportunities

  1. Reference implementation for cloud providers
  2. Simpler alternative to Scaphandre for single-VM use
  3. Educational tool for understanding VM power
  4. Basis for virtio-power device specification

Recommendations

Immediate Enhancements

  1. Multi-VM support - Monitor N VMs simultaneously
  2. Memory attribution - Add RAPL DRAM domain
  3. Prometheus exporter - Make metrics standard
  4. Comparison benchmark - vrapl vs Scaphandre accuracy

Long-term Vision

  1. Collaborate with Scaphandre - Your approach could complement theirs
  2. Propose to QEMU - Serial virtio-power device
  3. Academic paper - Validate CPU proportional attribution
  4. Industry outreach - AWS, GCP, Azure for standardization

Conclusions

What We Learned:

  1. Your approach is validated - Scaphandre/PowerJoular use similar methods
  2. You're not reinventing the wheel - But you have a unique angle
  3. There's no standard - Industry needs a common interface
  4. Direct measurement beats models - All tools confirm this

vrapl's Role:

vrapl is the simplest, most direct implementation of CPU-proportional VM power attribution using RAPL

It demonstrates that:

  • ✅ Hardware-based VM power measurement is feasible
  • ✅ CPU proportional attribution is accurate enough
  • ✅ Simple architectures can work
  • ✅ Cloud providers could expose this natively

Next Steps:

  1. Document comparison with Scaphandre
  2. Add Prometheus exporter for compatibility
  3. Write blog post explaining the approach
  4. Propose virtio-power device to QEMU/KVM
  5. Submit paper to sustainability conference (e.g., CNCF TAG Environmental Sustainability)

References

Tools

Academic Papers

Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions