reprozip
reprozip copied to clipboard
Record processes' memory usage
In the same way we store cpu time (9a0cb0aa), we should record in the trace the peak memory usage for processes (and for the full experiment?)
This is useful information for reproduction.
It looks like maybe this can be obtained the same way through wait3 (ru_maxrss), otherwise we'll have to sample regularly.
If measurements for the full experiment are enough, I can recommend using cgroups for measurements. It allows to measure CPU time and (max) memory usage for whole set of processes automatically. It even allows to measure the correkt peak memory consumption of this set of processes even if something is swapped to disk (which is not included in RSS measurements), and it handles shared memory etc. correctly.
We have implemented a benchmarking tool that is based on cgroups, it is called BenchExec. It is also written in Python, maybe it is even possible to use BenchExec for your measurements? One part of BenchExec is runexec
, which exactly measures the resource consumption of one execution of a process (and its subprocesses). I would be happy to assist with an integration of runexec
.
We also have a paper called Benchmarking and Resource Measurement, which describes BenchExec and its background, e.g., why one should use cgroups for measurements.
If you have any further questions, just ask me.