Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tfplan*.json
# Ad-hoc & Demo Files
launch_*.md
research.*.md
upgrade_*.py
*.log

# OS generated files
Expand Down
181 changes: 113 additions & 68 deletions METHODOLOGY.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
# GreenOps Methodology Ledger v1.3.0
# GreenOps Methodology Ledger v2.0.0

**Methodology transparency is the only defence against greenwashing.**

All maths in GreenOps is open, auditable, and reproducible from `factors.json`. This document defines the exact formulas, assumptions, and data sources used in every calculation.

---

## Cloud Provider Coverage

| Provider | Regions | Instances | Status |
|---|---|---|---|
| AWS | 14 | 40 | ✅ Full coverage |
| Azure | 17 | 16 | ✅ Full coverage |
| GCP | 15 | 15 | ✅ Full coverage |

Run `greenops-cli --coverage` to see the full instance and region list per provider.

---

## Emission Scopes Covered

| Scope | What it measures | GreenOps status |
|---|---|---|
| Scope 2 — Operational | CPU power draw × grid carbon intensity | ✅ Tracked |
| Scope 3 — Embodied | Hardware manufacturing lifecycle | ✅ Tracked (v1.3.0) |
| Water consumption | Data centre cooling water withdrawal | ✅ Tracked (v1.3.0) |
| Scope 3 — Embodied | Hardware manufacturing lifecycle | ✅ Tracked |
| Water consumption | Data centre cooling water withdrawal | ✅ Tracked |
| Scope 3 — Supply chain | Software, logistics, employee travel | ❌ Out of scope |
| Scope 1 — Direct | On-site combustion | ❌ Not applicable (cloud) |

Expand Down Expand Up @@ -40,18 +52,33 @@ energy_kwh = W_effective × PUE × hours_per_month / 1000
co2e_grams = energy_kwh × grid_intensity_gco2e_per_kwh
```

Where:
- `PUE` = Power Usage Effectiveness (1.13 for AWS, from AWS sustainability reports)
- `hours_per_month` = 730 (365 days × 24h / 12 months)
- `grid_intensity_gco2e_per_kwh` = regional annual average from Electricity Maps 2024
### PUE by Provider

| Provider | PUE | Source |
|---|---|---|
| AWS | 1.13 | AWS sustainability reports |
| Azure | 1.125 | Microsoft sustainability reports |
| GCP | 1.10 | Google sustainability reports |

GCP's 1.10 PUE is the best in class among the three major providers, producing ~3% less overhead energy per unit of compute.

### Worked Example — m5.large in us-east-1 at 50% utilisation
### Worked Example — AWS m5.large in us-east-1 at 50% utilisation

1. **Power:** `W = 6.8 + (20.4 - 6.8) × 0.50 = 13.6W`
2. **Energy:** `13.6W × 1.13 PUE × 730h / 1000 = 11.219 kWh/month`
3. **Carbon:** `11.219 × 384.5 = 4,313.6g CO2e/month = 4.31kg CO2e/month`
3. **Carbon:** `11.219 × 384.5 = 4,313.6g CO2e/month`

This is the exact value asserted in `engine.test.ts`.
### Worked Example — Azure Standard_D2s_v3 in eastus at 50% utilisation

1. **Power:** `W = 6.8 + (20.4 - 6.8) × 0.50 = 13.6W`
2. **Energy:** `13.6W × 1.125 PUE × 730h / 1000 = 11.178 kWh/month`
3. **Carbon:** `11.178 × 380.0 = 4,244.2g CO2e/month`

### Worked Example — GCP n2-standard-2 in us-central1 at 50% utilisation

1. **Power:** `W = 6.8 + (20.4 - 6.8) × 0.50 = 13.6W`
2. **Energy:** `13.6W × 1.10 PUE × 730h / 1000 = 10.921 kWh/month`
3. **Carbon:** `10.921 × 340.0 = 3,713.1g CO2e/month`

---

Expand All @@ -73,116 +100,134 @@ embodied_gco2e_per_month = (server_total_embodied_gco2e / lifespan_hours / vcpus
| Server total embodied CO2e | 1,200,000 gCO2e | CCF DELL R740 baseline |
| Server lifespan | 4 years = 35,040 hours | AWS/CCF assumption |
| vCPUs per physical server | 48 | Dual-socket Xeon baseline |
| ARM architecture discount | 0.80 (20% lower) | Graviton smaller die + lower TDP |
| ARM architecture discount | 0.80 (20% lower) | Graviton/Ampere smaller die + lower TDP |

### Per-vCPU rate
### Per-vCPU rates

```
x86_64: (1,200,000 / 35,040 / 48) × 730 = 520.8g CO2e/vCPU/month
arm64: 520.8 × 0.80 = 416.7g CO2e/vCPU/month
```

### Worked Example — m5.large (2 vCPU, x86_64)

```
embodied = 2 × 520.8 = 1,041.7g CO2e/month
```

### Worked Example — m6g.large (2 vCPU, ARM64)

```
embodied = 2 × 416.7 = 833.3g CO2e/month
```

ARM64 saves 208.4g CO2e/month in embodied carbon alone — before any operational savings.
The ARM discount applies equally to AWS Graviton, Azure Ampere (Dps-series), and GCP T2A instances — all use Arm Neoverse cores with comparable manufacturing profiles.

---

## Water Consumption

Water is consumed by data centre cooling systems. GreenOps uses AWS's published **WUE (Water Usage Effectiveness)** metric, defined as litres of water withdrawn per kWh of IT load.

### Formula

```
energy_kwh_IT = W_effective × hours / 1000 (IT load, before PUE)
water_litres = energy_kwh_IT × WUE_litres_per_kwh
```

Note: WUE is applied to IT load (before PUE multiplication), matching the AWS definition.
WUE is applied to IT load (before PUE multiplication), matching the AWS/Azure/Google definition.

### Worked Example — m5.large in us-east-1
### Regional WUE Values

```
energy_IT = 13.6W × 730h / 1000 = 9.928 kWh/month
water = 9.928 × 0.46 = 4.57 litres/month
```
#### AWS regions

### Regional WUE Values
| Region | Location | WUE (L/kWh) |
|---|---|---|
| us-east-1 | N. Virginia | 0.46 |
| us-east-2 | Ohio | 0.52 |
| us-west-1 | N. California | 0.38 |
| us-west-2 | Oregon | 0.18 |
| eu-west-1 | Ireland | 0.22 |
| eu-west-2 | London | 0.25 |
| eu-central-1 | Frankfurt | 0.28 |
| eu-north-1 | Stockholm | **0.10** |
| ap-southeast-1 | Singapore | 0.58 |
| ap-southeast-2 | Sydney | 0.45 |
| ap-northeast-1 | Tokyo | 0.50 |
| ap-south-1 | Mumbai | 0.72 |
| ca-central-1 | Canada | 0.20 |
| sa-east-1 | São Paulo | 0.35 |

#### Azure regions

| Region | Location | WUE (L/kWh) |
|---|---|---|
| swedencentral | Sweden Central | **0.10** |
| westus2 | West US 2 | 0.18 |
| northeurope | Ireland | 0.22 |
| canadacentral | Canada Central | 0.20 |
| westeurope | Netherlands | 0.20 |
| uksouth | London | 0.25 |

| Region | Location | WUE (L/kWh) | Source |
|---|---|---|---|
| us-east-1 | N. Virginia | 0.46 | AWS 2023 Sustainability Report |
| us-east-2 | Ohio | 0.52 | AWS 2023 Sustainability Report |
| us-west-1 | N. California | 0.38 | AWS 2023 Sustainability Report |
| us-west-2 | Oregon | 0.18 | AWS 2023 Sustainability Report |
| eu-west-1 | Ireland | 0.22 | AWS 2023 Sustainability Report |
| eu-west-2 | London | 0.25 | AWS 2023 Sustainability Report |
| eu-central-1 | Frankfurt | 0.28 | AWS 2023 Sustainability Report |
| eu-north-1 | Stockholm | 0.10 | AWS 2023 Sustainability Report |
| ap-southeast-1 | Singapore | 0.58 | AWS 2023 Sustainability Report |
| ap-southeast-2 | Sydney | 0.45 | AWS 2023 Sustainability Report |
| ap-northeast-1 | Tokyo | 0.50 | AWS 2023 Sustainability Report |
| ap-south-1 | Mumbai | 0.72 | AWS 2023 Sustainability Report |
| ca-central-1 | Canada | 0.20 | AWS 2023 Sustainability Report |
| sa-east-1 | São Paulo | 0.35 | AWS 2023 Sustainability Report |

`eu-north-1` (Stockholm) has both the lowest grid carbon intensity (8.8 gCO2e/kWh) and the lowest WUE (0.10 L/kWh) of any supported region, making it the optimal target for both climate impact dimensions.
#### GCP regions

| Region | Location | WUE (L/kWh) |
|---|---|---|
| europe-north1 | Finland | **0.12** |
| northamerica-northeast1 | Montreal | 0.20 |
| us-west1 | Oregon | 0.18 |

Source: AWS 2023 Sustainability Report, Microsoft 2023 Environmental Sustainability Report, Google 2023 Environmental Report.

---

## Recommendation Engine

GreenOps evaluates two strategies per resource and selects the highest-scoring option:

**Strategy 1 — ARM upgrade:** Switch x86_64 → ARM64 (same vCPU/RAM class). Only recommended if both CO2e and cost decrease.
**Strategy 1 — ARM upgrade:** Switch x86_64 → ARM64 (same vCPU/RAM class). Only recommended if both CO2e and cost decrease. Supported across all three providers.

**Strategy 2 — Region shift:** Move to the lowest grid-intensity region that has pricing data for this instance. Only recommended if CO2e reduction exceeds 15% of baseline.
**Strategy 2 — Region shift:** Move to the lowest grid-intensity region within the same provider that has pricing data for this instance. Only recommended if CO2e reduction exceeds 15% of baseline.

**Scoring (when both strategies qualify):**
**Scoring:**

```
score = (|co2e_delta| / baseline_co2e) × 0.60
+ (|cost_delta| / baseline_cost) × 0.40
```

Carbon reduction is weighted at 60%, cost at 40%, both normalised to percentage-of-baseline for fair comparison across instance sizes.
Carbon reduction is weighted at 60%, cost at 40%, both normalised to percentage-of-baseline.

### ARM Upgrade Maps

| AWS (x86 → ARM64) | Azure (x86 → ARM64) | GCP (x86 → ARM64) |
|---|---|---|
| t3/t3a → t4g | Standard_D2s_v3 → Standard_D2ps_v5 | n2 → t2a |
| m5/m5a → m6g | Standard_D4s_v3 → Standard_D4ps_v5 | n2d → t2a |
| c5/c5a → c6g | Standard_D8s_v3 → Standard_D8ps_v5 | e2 → t2a |
| r5/r5a → r6g | Standard_D2s_v4 → Standard_D2ps_v5 | | |

---

## Data Sources

| Data | Source | Version |
|---|---|---|
| Instance TDP (idle/max watts) | Cloud Carbon Footprint hardware coefficients | v3 |
| AWS instance TDP | Cloud Carbon Footprint hardware coefficients | v3 |
| Azure instance TDP | Cloud Carbon Footprint Azure coefficients | v3 |
| GCP instance TDP | Cloud Carbon Footprint GCP coefficients | v3 |
| Embodied carbon per server | CCF DELL R740 baseline | v3 |
| Grid carbon intensity | Electricity Maps annual averages | 2024 |
| PUE | AWS sustainability reports | 2023 |
| WUE | AWS sustainability reports | 2023 |
| On-demand pricing | AWS public pricing API | Q1 2026 |
| AWS grid carbon intensity | Electricity Maps annual averages | 2024 |
| Azure grid carbon intensity | Electricity Maps annual averages | 2024 |
| GCP grid carbon intensity | Electricity Maps annual averages | 2024 |
| AWS PUE | AWS sustainability reports | 2023 |
| Azure PUE | Microsoft sustainability reports | 2023 |
| GCP PUE | Google sustainability reports | 2023 |
| AWS WUE | AWS 2023 Sustainability Report | 2023 |
| Azure WUE | Microsoft 2023 Environmental Sustainability Report | 2023 |
| GCP WUE | Google 2023 Environmental Report | 2023 |
| AWS pricing | AWS public pricing API | Q1 2026 |
| Azure pricing | Azure public pricing API | Q1 2026 |
| GCP pricing | GCP public pricing API | Q1 2026 |

---

## Known Limitations

- **CPU-only power model.** Memory power draw is tracked in `factors.json` (`memory_gb`) but not yet included in calculations. This is a known underestimate, consistent with the CCF baseline approach.
- **Scope 2 only for region recommendations.** The recommendation engine uses Scope 2 operational emissions for scoring. Embodied carbon does not change when shifting regions, so it is correctly excluded from the region-shift calculation.
- **CPU-only power model.** Memory power draw is tracked in `factors.json` (`memory_gb`) but not yet included in calculations.
- **Scope 2 only for region recommendations.** Embodied carbon does not change when shifting regions, so it is correctly excluded from the region-shift scoring.
- **Annual average grid intensity.** Real-time marginal emissions are not used. Annual averages are more stable and reproducible, consistent with CCF methodology.
- **WUE at data centre level.** Water figures cover direct data centre cooling withdrawal only — not supply chain water or water embedded in hardware manufacturing.
- **Provider alias regions.** Terraform configurations using aliased providers (e.g. `provider "aws" { alias = "secondary" }`) may not resolve correctly. Standard single-provider configs are fully supported.
- **WUE at data centre level.** Water figures cover direct data centre cooling withdrawal only.
- **Azure and GCP coverage is initial.** AWS has 40 instance types; Azure and GCP each have 15–16. Enterprise-scale instance families (M-series, X-series, A2 High Memory) are not yet in the ledger.
- **Provider alias regions.** Multi-aliased provider configs may not resolve correctly. Standard single-provider configs are fully supported.

---

## Licence

The methodology, coefficients, and source code are MIT-licensed. The maths are fully reproducible: every assertion in `engine.test.ts` includes a commented math trace derivable from this document and `factors.json`.
The methodology, coefficients, and source code are MIT-licensed. Every assertion in `engine.test.ts` includes a commented math trace derivable from this document and `factors.json`.
Loading
Loading