From 32072da36bdf645b6f09e9e1f453fbfe4db2f3e9 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Fri, 19 May 2023 11:13:11 -0700 Subject: [PATCH] Adjust mmap and FD count for net scripts (#31728) Adjust mmap and fd count for net scripts --- net/scripts/network-config.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/scripts/network-config.sh b/net/scripts/network-config.sh index 3405da85c3..0c27e87b6d 100755 --- a/net/scripts/network-config.sh +++ b/net/scripts/network-config.sh @@ -10,6 +10,12 @@ sudo sysctl -w net.core.rmem_max=134217728 sudo sysctl -w net.core.wmem_default=134217728 sudo sysctl -w net.core.wmem_max=134217728 +# Increase memory mapped files limit +sudo sysctl -w vm.max_map_count=1000000 + +# Increase number of allowed open file descriptors +echo "* - nofile 1000000" | sudo tee -a /etc/security/limits.conf + echo "MaxAuthTries 60" | sudo tee -a /etc/ssh/sshd_config sudo service sshd restart sudo systemctl restart sshd