'How much memory could vm use
I read the document Understanding Virtual Memory and it said one method for changing tunable parameters in the Linux VM was the command:
sysctl -w vm.max_map_count=65535
I want to know what the number 65535 means and how much memory could vm use by the setting.
Solution 1:[1]
echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
sysctl -p
Solution 2:[2]
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
sysctl -p
This does not work since we cannot change the configuration file directly. Run the below command.
echo vm.max_map_count=262144 | sudo tee -a /etc/sysctl.conf
But check if vm.max_map_count already exists or not. You can do that using
grep vm.max_map_count /etc/sysctl.conf
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nathan |
| Solution 2 | Chris |
