How to increase vm.max_map_count on a Plesk for Linux server

June 24, 2024 / Plesk

How to Increase vm.max_map_count on a Plesk for Linux Server

Some applications (for example, Elasticsearch) need more memory map areas than the Linux default allows. To support them on a Plesk for Linux server, you need to increase the ‘vm.max_map_count’ value. This guide shows you how.

1. Connect to the server

1. Use SSH to log in to your server as the root user (or a user with sudo access).
2. If you cannot access SSH, contact your server administrator.

 

2. Check the current value

Run this command to see the current value:

sysctl vm.max_map_count

The default value is usually 65530.

 

3. Increase vm.max_map_count temporarily

Run this command to change the value right away:

sysctl -w vm.max_map_count=655300

Or use this command instead:

echo 655300 > /proc/sys/vm/max_map_count

Note: This change is lost when the server is rebooted. To keep it, follow the next step.

 

4. Make the change permanent

1. Open the ‘/etc/sysctl.conf‘ file with a text editor, for example:

nano /etc/sysctl.conf

2. Add this line at the end of the file:

vm.max_map_count=655300

3. Save and close the file.

5. Apply the changes

Run this command to load the settings from the file:

sysctl -p

6. Verify the change

Run this command to confirm the new value is active:

sysctl vm.max_map_count

The output should show: vm.max_map_count = 655300

Note: If your server uses container virtualization (such as OpenVZ or Virtuozzo), apply these steps on the hardware node (host server), not inside the container.

 

Additional information

1. ‘vm.max_map_count’ sets the maximum number of memory map areas a single process can use.
2. The default value is 65530, but some applications need a higher value.
3. The ‘/etc/sysctl.conf’ file stores system settings so they are applied again after every reboot.

This is how you can increase vm.max_map_count on a Plesk for Linux server.

Running into memory limit issues with WordPress and PHP? Read our guide on How to Increase Your WordPress and PHP Memory Limit.

Spread the love