On Fri, Jan 21, 2022 at 04:07:24PM +0800, Hyman Huang wrote:
> Hi, Peter, i'm working on simplifying the algorithm.
> Current throttle logic is like the following:
> 
> 1. If error value(|quota - current|) less than 25MB/s, we assert throttle
> already done and do nothing.
> 
> 2. Start to throttle if "error value greater than 25MB/s" scenario detected
> twice.
> 
> 3. Speed up throttle via plus and minus linearly if "error value" be found
> too large.
> 
> 4. Throttle normally via plus and minus a fixed time slice.
> 
> I think 1、4 are basic logic and shoul not be dropped, and 2 could be
> removed(i take this from auto-converg algo),

Agreed.

> i prefer to reserve 3 so that the throttle can response fast.
> 
> How about this?
> 
> Could it be possible that i add some comments in dirtylimit_adjust_throttle
> and not touch the logic? I test the result of v12 and it seems working fine.

I only worry that the differential part (step 3) makes it oscillate, and that's
what I hit.  Maybe it can be tuned so it'll not happen with general use cases
then I think it's perfectly fine at least to me.

-- 
Peter Xu


Reply via email to