Ada Carbon Monitoring Documentation
This documentation covers the implementation of carbon monitoring for the Ada platform.
Ada Platform: https://ada.stfc.ac.uk/
What is Carbon Monitoring?
Carbon monitoring systems:
- Measure - Determine how much CO2 (or CO2 equivalent) was released by computing workloads
- Collect - Store that data over time for analysis
- Display - Show users their carbon footprint with actionable insights
What is the Ada Platform?
The Ada platform is a service for members of STFC, providing:
- Virtual machines powered by the R86 data centre at Rutherford Appleton Laboratory
- Remote data analysis for ISIS Neutron and Muon Source
- Workspaces for CLF (Central Laser Facility)
- Training environments for scientific computing
Who Uses Ada?
Scientists from:
- ISIS - Neutron and muon research
- CLF - Laser physics research
- Diamond - Synchrotron research
- Training - Scientific computing courses
What Are Workspaces Used For?
- Running computationally intensive analysis
- Accessing pre-installed scientific software
- Remote access to facility data
Architecture Overview
┌─────────────────────────────────────────────────────────────┐
│ ada-ui │
│ (Svelte Frontend) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ Dashboard │ │ Heatmap │ │ Intensity Forecast │ │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
└────────────────────────┬────────────────────────────────────┘
│ API calls
▼
┌─────────────────────────────────────────────────────────────┐
│ ada-api │
│ (FastAPI Proxy) │
└────────────────────────┬────────────────────────────────────┘
│ Proxy
▼
┌─────────────────────────────────────────────────────────────┐
│ ada-carbon-monitoring-api │
│ (FastAPI) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ Calculators │ │ Clients │ │ Models │ │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
└───────┬─────────────────┬───────────────────┬───────────────┘
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌─────────────────────────┐
│ Prometheus │ │ MongoDB │ │ UK Carbon Intensity │
│ (CPU metrics) │ │ (via ada-db) │ │ API │
└───────────────┘ └───────────────┘ └─────────────────────────┘
Key Features
Carbon Dashboard
- Summary Cards - Energy (kWh), Carbon (gCO2eq), Workspaces, CPU time
- Carbon Intensity Forecast - UK grid forecast with best 3-hour window
- Heatmap - GitHub-style year view of daily carbon
- Stacked Bar Chart - Busy vs idle breakdown by day/month/year
- Equivalencies - Miles driven, smartphone charges, trees, etc.
Attribution
- User Attribution - Track carbon by workspace owner
- Group Attribution - Track carbon by cloud project + machine type
Carbon Calculation
Energy (kWh) = (12W × busy_seconds + 1W × idle_seconds) / 3,600,000
Carbon (gCO2eq) = Energy (kWh) × Carbon Intensity (gCO2/kWh)
Documentation Sections
| Section | Content |
|---|---|
| Green Computing Basics | Carbon concepts and reduction methods |
| Software Used | Technology stack |
| Backend | API architecture and endpoints |
| Frontend | Svelte component reference |
| API Reference | Complete API documentation |