将/etc/fstab 文件中包含swap的行注释掉

sed -i '/swap/s/^/#/' /etc/fstab
swapoff -a

单用户可以打开的最大文件数量,可以设置为官方推荐的65536或更大些

echo "* - nofile 655360" >> /etc/security/limits.conf

单用户线程数调大

echo "* - nproc 131072" >> /etc/security/limits.conf

单进程可以使用的最大map内存区域数量

echo "vm.max_map_count = 655360" >> /etc/sysctl.conf

参数修改立即生效

sysctl -p

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2021-10-29
  • 2022-12-23
猜你喜欢
  • 2021-11-10
  • 2022-01-29
  • 2022-03-05
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
相关资源
相似解决方案