PSU Energy - AC - XGBoost - Machine
What it does
It estimates the total machine energy consumption (AC Power) based on training data from the SPECPower database. The underlying XGBoost model can be found on our GitHub.
Classname
PsuEnergyAcXgboostMachineProvider
Metric Name
psu_energy_ac_xgboost_machine
Prerequisites & Installation
This provider is included as a submodule in the Green Metrics Tool and should have been checked out with the initial install command of this manual. If not, run:
git submodule update --initIf you don’t have them already, you need to install some python libraries:
python3 -m pip install -r ~/green-metrics-tool/metric_providers/psu/energy/ac/xgboost/machine/model/requirements.txtThe provider must be configured in the config.yml. It must be supplied with the machine params in the config.yml file:
- CPUChips
- HW_CPUFreq
- CPUThreads
- TDP
- HW_MemAmountGB
The following parameters are optional:
- CPUCores
- Hardware_Availability_Year
- VHost_Ratio
You can find these parameters in your data sheet of the used machine. In case you are using a VM please check this repository for an example how to derive the values.
Please see Configuration → for further info.
In the config.yml file also a system CPU utilization provider must be activated for the
PsuEnergyAcXgboostMachineProvider to work. Depending on the operating system this is one of:
- CpuUtilizationProcfsSystemProvider (
cpu_utilization_procfs_system) on Linux - CpuUtilizationMachSystemProvider (
cpu_utilization_mach_system) on macOS - CpuUtilizationWin32SystemProvider (
cpu_utilization_win32_system) on Windows
Input Parameters
- args
- Takes no arguments
If you want to run the provider directly we advise that you rather check out it’s main repository: XGBoost SPECPower Model documentation
The provider reads the log file of the system CPU utilization provider from the metrics folder of the
run (/tmp/green-metrics-tool/metrics/ on Linux and macOS) in order to keep overhead low and not to
double query the utilization from the system. It uses the first of these files that exists:
cpu_utilization_procfs_system.logcpu_utilization_mach_system.logcpu_utilization_win32_system.log
Output
Since this provider should not be run directly there it has no direct output.
The resulting data however is the energy of the whole machine (AC Power) in micro Joules.
This value has the same granularity as the one configured in the config.yml for the
system CPU utilization provider.
Any errors are printed to Stderr.