Skip to content

Commit e33ccdc

Browse files
authored
*: recalculate the threshold of gctuner when ServerMemoryLimit is updated (#51197) (#51214)
close #48180
1 parent 18a02ae commit e33ccdc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sessionctx/variable/sysvar.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,8 @@ var defaultSysVars = []*SysVar{
940940
}
941941
memory.ServerMemoryLimitOriginText.Store(str)
942942
memory.ServerMemoryLimit.Store(bt)
943+
threshold := float64(bt) * GOGCTunerThreshold.Load()
944+
gctuner.Tuning(uint64(threshold))
943945
gctuner.GlobalMemoryLimitTuner.UpdateMemoryLimit()
944946
return nil
945947
},

0 commit comments

Comments
 (0)