Closed da-ekchajzer closed 1 year ago
For consumption data, I suggest :
server_id, timestamp, rapl_power, dcmi_power, sensor_power, other_power (some power given by the user), load1, temperature (which one?), disks_io, ram_usage, ram_io?, cpu %user, cpu %sys, cpu %iowait, netstats?, and everything that can be easily measured and that can impact the power consumption.
JSON schema:
{
"device_id": null,
"contributor": null,
"hardware": {
"cpus": [
{
"name": null,
"core_units": null
}
],
"rams": [
{
"vendor": null,
"capacity": null
}
],
"disks": [
{
"type": null,
"vendor": null,
"capacity": null
}
]
},
"states": [
{
"type": null,
"powers": [
{
"source": null,
"scope": null,
"value": null
}
],
"temperature": null,
"disks_io": null,
"ram_io": null,
"cpu_percent_user": null,
"cpu_percent_sys": null,
"cpu_percent_iowait": null,
"netstats": null
}
],
"date": null
}
I did not succeed to get ram_io
, and I do not get netstat
(yet), but I have a script that returns this.
{
"interval_us": 5270833,
"duration_us": 63249999,
"nb_states": 12,
"cpu_iowait_pct": 0,
"cpu_sys_pct": 11,
"cpu_usr_pct": 15,
"load1": 4.44,
"mem_free_MB": 20892,
"mem_total_MB": 32065,
"mem_used_MB": 5327,
"sda_pct_busy": 1,
"sda_read_bps": 2,
"sda_write_bps": 18,
"sdb_pct_busy": 1,
"sdb_read_bps": 2,
"sdb_write_bps": 17,
"sdc_pct_busy": 1,
"sdc_read_bps": 1,
"sdc_write_bps": 19,
"sensors_coretemp": 46,
"powers": {
"dcmi_cur_watt": 26,
"rapl_dram_0_watt": 2,
"rapl_package_0_watt": 14,
"rapl_total_watt": 16,
"sensors_acpi_watt": 25
},
"energizta_version": "0.1a"
}
interval_us
is the interval in microseconds between each measure, and "duration_us" is the total duration of the test. Here I measure every 5 seconds, during 60 seconds, so the output is an average of 12 measures.
With this method I get very consistent results and I dont see "inexplicable" spikes in DCMI Current Watt.
I have simplified the "powers" dict because I believe the scope can be deducted from variable names.
PS : We can see each measure takes 270ms (on a 3.7Ghz server that's loaded to around 30 to 50%). I am not happy with this but it is open to improvement.
And this is the result of a stresstest with 4 steps (no stresstest, stress-ng -q --cpu 1
, 4 and 8)
{"interval_us": 5381796,"duration_us": 43054361,"nb_states": 8,"cpu_iowait_pct": 0,"cpu_sys_pct": 12,"cpu_usr_pct": 16,"load1": 1.68,"mem_free_MB": 20857,"mem_total_MB": 32065,"mem_used_MB": 5358,"sda_pct_busy": 2,"sda_read_bps": 2,"sda_write_bps": 21,"sdb_pct_busy": 2,"sdb_read_bps": 2,"sdb_write_bps": 21,"sdc_pct_busy": 2,"sdc_read_bps": 1,"sdc_write_bps": 23,"sensors_coretemp": 42.0,"powers": {"dcmi_cur_watt": 21,"rapl_dram_0_watt": 2,"rapl_package_0_watt": 13,"rapl_total_watt": 15,"sensors_acpi_watt": 26.00},"energizta_version": "0.1a"}
{"interval_us": 5200567,"duration_us": 41604549,"nb_states": 8,"cpu_iowait_pct": 0,"cpu_sys_pct": 9,"cpu_usr_pct": 23,"load1": 2.30,"mem_free_MB": 20896,"mem_total_MB": 32065,"mem_used_MB": 5316,"sda_pct_busy": 1,"sda_read_bps": 2,"sda_write_bps": 19,"sdb_pct_busy": 1,"sdb_read_bps": 2,"sdb_write_bps": 20,"sdc_pct_busy": 1,"sdc_read_bps": 1,"sdc_write_bps": 18,"sensors_coretemp": 52.0,"powers": {"dcmi_cur_watt": 48,"rapl_dram_0_watt": 2,"rapl_package_0_watt": 25,"rapl_total_watt": 27,"sensors_acpi_watt": 39.00},"energizta_version": "0.1a"}
{"interval_us": 5356037,"duration_us": 42848298,"nb_states": 8,"cpu_iowait_pct": 0,"cpu_sys_pct": 9,"cpu_usr_pct": 60,"load1": 6.20,"mem_free_MB": 20837,"mem_total_MB": 32065,"mem_used_MB": 5373,"sda_pct_busy": 2,"sda_read_bps": 2,"sda_write_bps": 17,"sdb_pct_busy": 2,"sdb_read_bps": 3,"sdb_write_bps": 17,"sdc_pct_busy": 2,"sdc_read_bps": 1,"sdc_write_bps": 19,"sensors_coretemp": 63.0,"powers": {"dcmi_cur_watt": 54,"rapl_dram_0_watt": 2,"rapl_package_0_watt": 42,"rapl_total_watt": 44,"sensors_acpi_watt": 55.00},"energizta_version": "0.1a"}
{"interval_us": 6842589,"duration_us": 54740718,"nb_states": 8,"cpu_iowait_pct": 0,"cpu_sys_pct": 9,"cpu_usr_pct": 90,"load1": 10.25,"mem_free_MB": 20781,"mem_total_MB": 32065,"mem_used_MB": 5429,"sda_pct_busy": 2,"sda_read_bps": 0,"sda_write_bps": 18,"sdb_pct_busy": 2,"sdb_read_bps": 1,"sdb_write_bps": 16,"sdc_pct_busy": 2,"sdc_read_bps": 2,"sdc_write_bps": 17,"sensors_coretemp": 65.0,"powers": {"dcmi_cur_watt": 48,"rapl_dram_0_watt": 2,"rapl_package_0_watt": 48,"rapl_total_watt": 50,"sensors_acpi_watt": 65.00},"energizta_version": "0.1a"}