Micro-Joule Attribution Engine (MJAE) transforms raw telemetry into a signed AmalgafySeal, delivering verifiable measurements of energy consumption for individual processes in diverse environments. Optimized for data centers and clusters, MJAE ensures accurate auditing and accountability of energy usage at a granular level.
The Micro-Joule Attribution Engine (MJAE) is a powerful cross-platform systems daemon designed to create a Trust Layer for AI energy auditing. This innovative tool operates across various environments—including heterogeneous data centers, Linux H100 clusters, Windows Server farms, and macOS local development setups—transforming raw, kernel-level telemetry into a signed AmalgafySeal. This seal serves as a validated proof of energy consumption, indicating precisely how many micro-joules each process utilized and specifying the physical machine that executed the process.
"Anyone can say the GPU used 300 W. Only MJAE can say Process 1024 used 287 W of it because it saturated the 16-bit float units — and that this measurement came from SoC die
XYZ."
MJAE integrates seamlessly with multiple operating systems, leveraging bespoke telemetry sources to deliver precise energy attribution:
| Surface | Backend | Telemetry Source |
|---|---|---|
| Linux | LinuxProvider | Utilizes Aya eBPF hooks to monitor GPU activity windows and process switching, alongside package power consumption data from /sys/class/powercap/intel-rapl:0/energy_uj |
| Windows | WindowsProvider | Employs eBPF-for-Windows to track process lifecycles while capturing telemetry from Direct3D/CUDA and NVML |
| macOS | AppleSiliconProvider | Collects energy data via raw IOReport FFI, monitoring the Apple Silicon SoC power planes |
Each provider adheres to the EnergyProvider trait, ensuring that the daemon's main loop remains OS-agnostic.
MJAE features a robust architecture designed for efficient energy sampling and attribution:
┌────────────┐ ┌────────────┐ ┌────────────┐
│ LinuxProv. │ │ WinProv. │ │ AppleProv. │
└─────┬──────┘ └─────┬──────┘ └─────┬──────┘
│ 100 ms tick │ 100 ms tick │ 100 ms tick
│ Δ energy │ Δ energy │ Δ energy
▼ ▼ ▼
┌───────────────────────────────┐
│ AmalgafyRegistry │ ← lock-free, ordered,
│ PID → cumulative µJ │ process-wide singleton
└────────────────┬──────────────┘
│ snapshot()
▼
┌─────────────────┐ ┌──────────────────┐
│ AmalgafySigner │ ←─ │ HardwareIdentity │
│ Ed25519 + JCS │ │ (IOKit / m-id / │
└────────┬────────┘ │ NVML UUID) │
▼ └──────────────────┘
AmalgafySeal ← published every 60 s,
cryptographically bound to
the host's hardware fingerprint
AmalgafyRegistry acts as the central repository for energy attribution, using efficient data structures to allow quick and accurate updates.Here is a brief programming example of how to interact with the MJAE framework:
use mjae::global_registry;
let registry = global_registry();
registry.add_micro_joules(1024, 287_000); // Process 1024: +287 mJ
let total = registry.total_micro_joules();
MJAE is designed for embedding within tokio-based systems, ensuring that performance and efficiency are maximized in applications aiming for precise energy management and auditing in AI and high-performance computing environments.
For further details and to view the source code, visit the MJAE repository.
This project is developed by the Amalgafy team.
No comments yet.
Sign in to be the first to comment.