[lbry] runtime: Allow environment var GOGC=<percent> to override hard-coded SetGCPercent(10).
This commit is contained in:
parent
8f95946b17
commit
92a7a2087a
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
|
||||
// bursts. This value was arrived at with the help of profiling live
|
||||
// usage.
|
||||
if _, ok := os.LookupEnv("GOGC"); !ok {
|
||||
debug.SetGCPercent(10)
|
||||
}
|
||||
|
||||
// Up some limits.
|
||||
if err := limits.SetLimits(); err != nil {
|
||||
|
|
Loading…
Reference in a new issue