oomd icon indicating copy to clipboard operation
oomd copied to clipboard

Inefficient TryToKillSomething(): ranking gets made twice for a single run

Open jelmd opened this issue 3 years ago • 0 comments

Right now TryToKillSomething() seems to be very inefficient, because for a single evaluation ranking functions get called twice and including calculation of current overall memory usage (3 times). There should probably be an opaque structure containing the related information (e.g. wrt. src/oomd/plugins/KillMemoryGrowth-inl.h: KMGPhase, sum_current_mem_cgroups, sum_effective_mem_cgroups), which one may pass to ologKillTarget(), and thus eliminates the need to do all the ranking/wasting resources again just for logging ...

jelmd avatar Feb 26 '22 06:02 jelmd