Optimisation: remove_old_samples is expensive, and having extra old samples around will just use a little bit more memory. So let's run it every 5 min rather than every 5 seconds.