How to Increase virtual memory areas in azure vm
To increase the maximum number of virtual memory areas (vm.max_map_count) in an Azure VM, you need to follow these steps:
- Connect to your Azure VM via SSH or terminal.
2. Check the current value of vm.max_map_count by running the following command:
sysctl vm.max_map_count
3. If the current value is less than the required value (262144), you need to increase it. To do so, run the following command:
sudo sysctl -w vm.max_map_count=262144
4. This command will set the vm.max_map_count value to 262144. You can set it to any value you need, but it should be greater than or equal to 262144.
vm.max_map_count=262144
This will ensure that the vm.max_map_count value is set to 262144 on every reboot.
5. Save the /etc/sysctl.conf file and exit.
6. To apply the changes immediately, run the following command:
sudo sysctl -p
This command will reload the sysctl settings and apply the changes.
7. Verify that the vm.max_map_count value has been set to the required value by running the following command:
sysctl vm.max_map_count
This command should now show the new value of vm.max_map_count that you set in step 3.
That’s it! You have successfully increased the maximum number of virtual memory areas (vm.max_map_count) in your Azure VM.