gpt4 book ai didi

tcp - (FreeBSD) 当 3000 或 4000 人同时突然开始登录时,同一秒的端口没有响应。

转载 作者:可可西里 更新时间:2023-11-01 02:40:36 24 4
gpt4 key购买 nike

我通过 FreeBSD 11.0 - 64 位管理游戏服务器。

我对此有疑问。当3000或4000人突然同时登录时,同一秒的端口没有响应。但是没有关闭这样的事情。没有错误。他只是慢慢地接受它。

我有 ipfw.rules,但我将 limit scrs 保持在最高值。

我该怎么办?

最佳答案

我推荐看一下tuning(7) .几个sysctl可调参数可用于影响网络。

我认为这是你最好的选择:

 The kern.ipc.somaxconn sysctl limits the size of the listen queue for
accepting new TCP connections. The default value of 128 is typically too
low for robust handling of new connections in a heavily loaded web server
environment. For such environments, we recommend increasing this value
to 1024 or higher.

这可能不是你的,因为它会影响每个连接的性能,但为了安全起见,我仍然会尝试上下调整该值:

 The net.inet.tcp.sendspace   and net.inet.tcp.recvspace sysctls are of par-
ticular interest if you are running network intensive applications.…

我会尝试关闭这个:

 The net.inet.tcp.always_keepalive sysctl determines whether or not   the
TCP implementation should attempt to detect dead TCP connections by
intermittently delivering ``keepalives'' on the connection. By default,
this is enabled for all applications; by setting this sysctl to 0, only
applications that specifically request keepalives will use them.

当然,通常的调整规则适用:

  • 除非您了解它的作用,否则不要使用调整设置。
  • 一次更改一项设置,衡量效果。

祝你好运。

关于tcp - (FreeBSD) 当 3000 或 4000 人同时突然开始登录时,同一秒的端口没有响应。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41654782/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com