mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Tasks are often running longer than 5 seconds (especially extents with multiple references requiring copy operations), so the load tracking algorithm needs to average several samples over a longer period of time than 5 seconds. If the sample period is 60 seconds, we end up recomputing the original load average from current_load, so skip the rounding error and use the original load average value. Arguably the real fix is to break up the more complex extent operations over several downstream Task objects, but that's a more significant design change. Tweak the attack and decay rates so that threads are started a little more slowly, but still stopped rapidly when load spikes up. Remove the hysteresis to provide support for load average targets below 1, or with fractional components, with a PWM-like effect. Signed-off-by: Zygo Blaxell <bees@furryterror.org>