You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Main goals for slot-cache-freeing algorithm:
1. Avoid hard limits on free slots. Prevents freeing/allocating slots
in tight loops.
2. Don't hang onto slot memory forever after temporary traffic bursts.
Something like a PID controller to tune "Free slot limit" would run
afoul of rule 1: if we have slightly too many free sometimes we can end
up alloc/freeing during heavily pipelined traffic. Best case until the
PID controller adjusts. This might still be useful for finding a target
number of free slots in the future so I may revisit this.
In the meantime the current algorithm can be made less aggressive by
giving it a concept of clock time. It would decide on when to free
things after every N requests are processed; now it will wait until
things are "too free" for at least a minute before adjusting. This
should prevent wobbles from brusty traffic.
If slot counts do still wobble with this adjustment, the allocations
should be far enough apart (60 seconds) to be generally amortized.
0 commit comments