Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
97957: kvcoord: MuxRangeFeed client uses 1 go routine per node r=miretskiy a=miretskiy Rewrite MuxRangeFeed client to use 1 Go routine per node, instead of 1 Go routine per range. Prior to this change, MuxRangeFeed client was structured so that it was entirely compatible with the execution model of the regular range feed. As a result, 1 Go routine was used per range. This rewrite replaces old implementation with an almost clean slate implementation which uses 1 Go routine per node. Where possible, relatively small and targetted modifications to the rangefeed library were made to extract common methods (such as range splitting). The reduction in the number of Go routines created by rangefeed has direct impact on the cluster performance, and most importantly SQL latency. This is mostly due to the fact that with this PR, the number of Go routines started by MuxRangeFeed is down to 2 per range (on the rangefeed server side) vs 5 for the regular rangefeed. When running changefeeds against tables with 10s-100s of thousands of ranges, this significant difference in the Go routine count has direct impact on Go scheduler latency, the number of runnable Go routines, and ultimately, on the SQL latency. Epic: none Release note (enterprise change) : MuxRangeFeed client (enabled via `changefeed.mux_rangefeed.enabled` setting) is more efficient when running against large scale workloads. Co-authored-by: Yevgeniy Miretskiy <yevgeniy@cockroachlabs.com>
- Loading branch information