1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-08 04:32:01 +08:00
parent 192c26871d
commit ba1483241c

View File

@@ -29,13 +29,12 @@ func (s *Server) Boot(serverid, port uint16) error {
// 其他调优配置↓
gnet.WithTCPNoDelay(gnet.TCPNoDelay), // 禁用Nagle算法降低延迟适合小数据包场景
gnet.WithReusePort(true), // 开启SO_REUSEPORT多核下提升并发
gnet.WithReadBufferCap(1024*64), // 读缓冲区64KB根据业务调整默认太小
gnet.WithWriteBufferCap(1024*64), // 写缓冲区64KB
//gnet.WithReusePort(true), // 开启SO_REUSEPORT多核下提升并发
//gnet.WithReadBufferCap(1024*64), // 读缓冲区64KB根据业务调整默认太小
// gnet.WithWriteBufferCap(1024*64), // 写缓冲区64KB
gnet.WithLockOSThread(true), // 绑定goroutine到OS线程减少上下文切换
gnet.WithSocketRecvBuffer(s.bufferSize))
)
if err != nil {
panic(err)
}