Skip to content

Commit 3239812

Browse files
committed
feat: 优化配置
1 parent 5175355 commit 3239812

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/service/installer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ func (i *installer) optimizeSystem(ctx context.Context, cfg *types.InstallConfig
281281
}
282282

283283
// somaxconn 调优
284-
_, _ = i.executor.Run(ctx, "sysctl", "-w", "net.core.somaxconn=1024")
284+
_, _ = i.executor.Run(ctx, "sysctl", "-w", "net.core.somaxconn=65535")
285285
_, _ = i.executor.Run(ctx, "sed", "-i", "/net.core.somaxconn/d", "/etc/sysctl.conf")
286-
sysctlConf.WriteString("net.core.somaxconn=1024\n")
286+
sysctlConf.WriteString("net.core.somaxconn=65535\n")
287287

288288
// 写入 sysctl 配置
289289
_ = os.WriteFile("/etc/sysctl.d/99-acepanel.conf", []byte(sysctlConf.String()), 0644)

0 commit comments

Comments
 (0)