调整GC参数

This commit is contained in:
hahwu 2026-03-23 11:20:43 +08:00
parent d38bb332d6
commit e0b255a859

View File

@ -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"