client-go icon indicating copy to clipboard operation
client-go copied to clipboard

Too many goroutines in commit phase affect performance

Open youjiali1995 opened this issue 4 years ago • 3 comments

@BusyJay found too many goroutines in commit phase affect performance a lot. The committer-concurrency is 1024. The region size on left side is smaller than right side. image It's not an apple to apple comparison, because larger region results in larger requests and batch, but the throughput of TiKV is the same. image

Disregarding TiKV, too many goroutines affects GC, schedule of TSO goroutine and so on. We can improve it. image image

youjiali1995 avatar Oct 20 '21 09:10 youjiali1995

One coroutine to one transaction is a more reasonable mapping to me.

BusyJay avatar Oct 20 '21 11:10 BusyJay

committer-concurrency is configurable and its default value is not 1024

tiancaiamao avatar Nov 07 '21 17:11 tiancaiamao

committer-concurrency is configurable and its default value is not 1024

I don't think this configuration matters. It's possible to increase the transaction count while decrease this configuration to achieve similar regression.

BusyJay avatar Nov 08 '21 06:11 BusyJay