Allow environment var GOGC=<percent> to override hard-coded SetGCPercent(10) #45
1 changed files with 3 additions and 1 deletions
2
lbcd.go
2
lbcd.go
|
@ -281,7 +281,9 @@ func main() {
|
||||||
// limits the garbage collector from excessively overallocating during
|
// limits the garbage collector from excessively overallocating during
|
||||||
// bursts. This value was arrived at with the help of profiling live
|
// bursts. This value was arrived at with the help of profiling live
|
||||||
// usage.
|
// usage.
|
||||||
|
if _, ok := os.LookupEnv("GOGC"); !ok {
|
||||||
debug.SetGCPercent(10)
|
debug.SetGCPercent(10)
|
||||||
|
}
|
||||||
|
|
||||||
// Up some limits.
|
// Up some limits.
|
||||||
if err := limits.SetLimits(); err != nil {
|
if err := limits.SetLimits(); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue