Skip to content

Commit

Permalink
kvserver: don't log "local QPS is below max threshold" by default
Browse files Browse the repository at this point in the history
This log message is the 9th most voluminous across the CC fleet.
It's not surprising since most stores are idle.
There's no good reason to have it logged by default - it doesn't say
anything interesting.
Let's just keep it in traces.

Release note: None
  • Loading branch information
knz committed Sep 30, 2022
1 parent 4f3bb99 commit 9bcef13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/kv/kvserver/store_rebalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,11 @@ func (sr *StoreRebalancer) ShouldRebalanceStore(ctx context.Context, rctx *Rebal
// We only bother rebalancing stores that are fielding more than the
// cluster-level overfull threshold of QPS.
if !(rctx.LocalDesc.Capacity.QueriesPerSecond > rctx.QPSMaxThreshold) {
log.KvDistribution.Infof(
ctx,
// Since the lack of activity is the most common case, we don't
// log externally by default. Only show the details when
// requested by log config or when looking at traces.
log.KvDistribution.VEventf(
ctx, 1,
"local QPS %.2f is below max threshold %.2f (mean=%.2f); no rebalancing needed",
rctx.LocalDesc.Capacity.QueriesPerSecond, rctx.QPSMaxThreshold, rctx.allStoresList.CandidateQueriesPerSecond.Mean)
return false
Expand Down

0 comments on commit 9bcef13

Please sign in to comment.