Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix negative feedback bug in ConcurrencyController
The ConcurrencyController would sometimes get itself into a negative feedback loop where it would repeatedly set itself as TPS Limited and never stabilize. The reason has to do with the interplay between two ways the CC works: 1. The concurrency search algo is only increasing 2. When it goes into TPS Limited, it sets concurrency to the previously found "optimal" concurrency and reset the history What this meant is that when the TPS is limited, it would decrease the Goal TPS and set the concurrency to the "optimal" value. However, it would then use that concurrency as the starting point and start increasing it. Leading to more contention, leading to TPS dropping, leading to the controller thinking it was TPS limited again... because it kept increasing the concurrency. The solution is a bit of a hack, but we just set the concurrency to a lower value than the optimal one found, so that the algorithm can grow into it and stabilize. Frankly, this controller needs a rewrite.
- Loading branch information