调整GC参数
This commit is contained in:
parent
d38bb332d6
commit
e0b255a859
@ -27,8 +27,8 @@ func main() {
|
||||
lconf.CenterAddr = conf.Server.CenterAddr
|
||||
lconf.PendingWriteNum = conf.PendingWriteNum
|
||||
// 当内存>256M时开始GC
|
||||
debug.SetGCPercent(50)
|
||||
debug.SetMemoryLimit(512 << 20)
|
||||
debug.SetGCPercent(200)
|
||||
debug.SetMemoryLimit(1024 << 20)
|
||||
// 启动 pprof(仅绑定本地)
|
||||
go func() {
|
||||
// 如果需要绑定所有接口改为 ":6060"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user