Skip to content

Commit e615c1d

Browse files
committed
sqlstats: lower default sql stats flush batch size
In the drt-scale cluster, a batch size of 50 caused sql stats flushing to be slow because it increased contention when sql stats flushes occurred. This is because in a cluster of this size, there is a higher chance for an individual node to be flushing at any given time. We observed that lowering the batch size to 10 decreased the amount of contention while still providing decreased flush latency. Epic: None Release note: None
1 parent 9b3b2bc commit e615c1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/sql/sqlstats/persistedsqlstats/cluster_settings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var SQLStatsFlushBatchSize = settings.RegisterIntSetting(
3030
settings.ApplicationLevel,
3131
"sql.stats.flush.batch_size",
3232
"the number of rows to flush per upsert",
33-
50,
33+
10,
3434
settings.NonNegativeInt)
3535

3636
// MinimumInterval is the cluster setting that controls the minimum interval

0 commit comments

Comments
 (0)