PitchHut logo
Micro-Joule Attribution Engine (MJAE)
Precise energy attribution for AI workloads across platforms.
Pitch

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.

Description

Micro-Joule Attribution Engine (MJAE)

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."

Capabilities

MJAE integrates seamlessly with multiple operating systems, leveraging bespoke telemetry sources to deliver precise energy attribution:

SurfaceBackendTelemetry Source
LinuxLinuxProviderUtilizes 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
WindowsWindowsProviderEmploys eBPF-for-Windows to track process lifecycles while capturing telemetry from Direct3D/CUDA and NVML
macOSAppleSiliconProviderCollects 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.

Architectural Overview

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

Detailed Functionality

  • Unified Registry: The AmalgafyRegistry acts as the central repository for energy attribution, using efficient data structures to allow quick and accurate updates.
  • Differential Sampling Daemon: Each provider integrates a default implementation that executes a non-blocking 100 ms sampling loop, ensuring real-time energy consumption tracking without interruptions to system performance.
  • Linux eBPF integration: Incorporates user-space features for monitoring the energy attributed to various processes, while allowing operators flexibility in configuring kernel-level hooks.
  • Hardware Identity & Audit-Spoof Resistance: The system captures unique hardware fingerprints across platforms to ensure data authenticity, thereby preventing unauthorized access and spoofing.
  • Deterministic Attribution Model: Uses advanced math to calculate attributed energy accurately, incorporating real-time data adjustments and fallback mechanisms to maintain integrity.
  • Amalgafy Seal: Generates a digitally signed seal at regular intervals to ensure that energy consumption data is verifiable and securely tied to specific hardware identifiers.

Example Usage

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.

Explore More

For further details and to view the source code, visit the MJAE repository.
Amalgafy Icon

This project is developed by the Amalgafy team.

0 comments

No comments yet.

Sign in to be the first to comment.