对于负载过重的额外配置

2023年12月13日

ID 193665

如果 Kaspersky Web Traffic Security 是从 RPM 或 DEB 软件包安装到即用型操作系统的,则这些说明适用。如果 Kaspersky Web Traffic Security 是从 ISO 文件安装的,则无法手动更改内置代理服务器的配置文件。

若要处理大量网络连接,您必须配置 Squid 服务和操作系统网络堆栈的性能设置。

若要执行其它配置:

  1. 创建一个含以下内容、名为 /etc/sysctl.d/90-net-tcp.conf 的配置文件:

    net.core.somaxconn = 1024

    net.core.netdev_max_backlog = 2048

    net.ipv4.ip_local_port_range = 1024 65535

    net.ipv4.tcp_max_syn_backlog = 2048

    net.ipv4.tcp_fin_timeout = 20

    net.ipv4.tcp_syncookies = 1

    net.ipv4.tcp_timestamps = 1

    net.ipv4.tcp_tw_reuse = 1

    net.ipv4.tcp_rfc1337 = 1

  2. 应用更改。为此,请执行命令:

    sysctl -p /etc/sysctl.d/90-net-tcp.conf

  3. 配置 Squid 服务的性能设置。为此,添加以下字符串到配置文件 /etc/squid/squid.conf 的末尾:

    workers <服务器所有处理器的物理内核数量>

  4. 重启 Squid 服务。为此,请执行命令:

    service squid restart

其它配置现在完成。

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.