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