Open bpetit opened 1 year ago
Sysfs seems to have nice informations about power state and time spent in active mode : https://events.static.linuxfound.org/slides/2011/linuxcon-japan/lcj2011_wysocki2.pdf
In /sys/block/sd/device/power/
For the three linux boxes that I checked the value of /sys/block/sda/device/power/runtime_suspended_time
is always zero. (Machines had only one disk, sda
)
A maybe more promising approach could be if you look at the values that iostat
report and try to match them with some average manufacturer data how much a read / write operation actually costs. Similar to how how TEADS did it with their DRAM calculation model
I actually do not know how accurate that would be and it would be nice to benchmark it on a real disk ...
There is a model proposed in this article : https://blog.octo.com/la-mesure-pour-reveler-limpact-cache-du-numerique-sur-le-climat-et-ouvrir-la-voie-a-une-action-eclairee/
Should be tested on several machines, comparing sum of rapl pkg + disk formula to wattmeter measurements.
If disks, SSD, NVME… had a power usage of their own, we should see it on "Wattmeter minus RAPL".
I believe it could vary a lot from harddrive to SSD to NVME, and maybe from model to model… but, on my measurements I see no correlation between "Wattmeter - RAPL" and disk usage (IOps or bps). And on my stresstests, NVME IO stresstests have a big impact in RAPL power usage, but no additional visible impact on global power usage.
It is clear that a lot more testing needs to be done on this. But I believe we may be able to simply consider a fixed cost for NVME and SSD at least (I expect around 2W per SSD).
About /sys/block/sda/device/power/, it will not give you power usage but power management tools. 0 and 1 are just configuration variables for the kernel to manage disks more or less efficiently.
Hey @maethor : What test have you been running to come to that conclusion, that the power draw for the HDD/SDD does not increase for IO bound loads?
My idea is to reproduce that and then pin the results somewhere online. We have quite some machines in a measurement cluster with attached power meters and RAPL capabilities (https://docs.green-coding.berlin/docs/measuring/measurement-cluster/)
Problem
To get closer to an evaluation of the full host power usage, we need an evaluation of hard drives power usage. (Energizta is starting to show that hard drives shouldn't be overlooked and can take a decent share of the hosts power usage.).
Solution
Explore ways to get hard drives power states (read/write/active, idle, standby, ...) and what decent values for full power or low power states would be. If an average is okay or if we need to differentiate per model/manufacturer, or even if there is a way to make a finer metric than an estimation.
Provide a new metric that gives this estimation.