idea is from this article How We Saved 70K Cores Across 30 Mission-Critical Services (Large-Scale, Semi-Automated Go GC Tuning @Uber)
** This version is updated by Chao.Cai ([email protected]) to reduce the GC effect.
just call NewTuner when initializing app :
func initProcess() {
var (
inCgroup = false //true: inside docker; false: outsie docker (VM)
// highPercent & lowPercent is to control GC tigger and scope
highPercent = 70
lowPercent = 30
)
go NewTuner(inCgroup, highPercent, lowPercent)
}
more tests are needed