§2023-08-05

Configure sufficient file handles (fs.file-max), kernel pid limit (kernel.pid_max), maximum threads per process (kernel.threads-max), and maximum number of memory map areas per process (vm.max_map_count) for your deployment. For large systems, the following values provide a good starting point:


For small system

To set the vm.max_map_count = 262144,

¶Ubuntu distribution, for debina you use /sbin/sysctl

If the output displays the new value you set in the /etc/sysctl.conf file, then the changes have been successfully applied. If you encounter any issues or errors, double-check your modifications in the configuration file and try again.

Remember that if you want the changes to persist across reboots, you should make sure that the value is correctly set in the /etc/sysctl.conf file as well.

¶ ArchLinux


other value are seemed to set well over required recommended by mongoDB Ubuntu or Archlinux

$ sysctl fs.file-max
fs.file-max = 9223372036854775807
$ sysctl kernel.pid_max
kernel.pid_max = 4194304
$ sysctl kernel.threads-max
kernel.threads-max = 124616