Skip to content

Commit abd0ab8

Browse files
committed
Add CPU fallback mechanism based on TDP
1 parent e24137a commit abd0ab8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/index.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,14 @@ If this fails we measure all available GPUs.
5454
```
5555
echo "your_username ALL=(ALL) NOPASSWD: /usr/bin/powermetrics" | sudo tee -a /etc/sudoers
5656
```
57-
- Alternatively, one can run **carbontracker** with root privileges.
57+
- Alternatively, one can run **carbontracker** with root privileges.
58+
59+
## Running **carbontracker** in Virtual Machines
60+
61+
In virtual machines or containerized environments where direct power measurements are unavailable, **carbontracker** estimates power consumption using [CPU TDP values](https://github.com/mlco2/codecarbon/blob/master/codecarbon/data/hardware/cpu_power.csv):
62+
63+
- Identifies the CPU model when possible
64+
- Uses 50% of the CPU's TDP value to estimate power consumption at 50% utilization
65+
- Falls back to 50% of average TDP across known CPUs if the specific model isn't found
66+
67+
While less precise than direct measurements, this provides reasonable power consumption estimates in virtualized environments.

0 commit comments

Comments
 (0)