How to increase vm.max_map_count?

I use

# sysctl -w vm.max_map_count=262144 

And for the persistence configuration

# echo "vm.max_map_count=262144" >> /etc/sysctl.conf

Att.


Note that

From version 207 and 21x, systemd only applies settings from /etc/sysctl.d/*.conf and /usr/lib/sysctl.d/*.conf. If you had customized /etc/sysctl.conf, you need to rename it as /etc/sysctl.d/99-sysctl.conf. If you had e.g. /etc/sysctl.d/foo, you need to rename it to /etc/sysctl.d/foo.conf.

See https://wiki.archlinux.org/index.php/sysctl#Configuration

So add vm.max_map_count=262144 in /etc/sysctl.d/99-sysctl.conf and then run

sudo sysctl --system


To make it persistent, you can add this line:

vm.max_map_count=262144

in your /etc/sysctl.conf and run

$ sudo sysctl -p

to reload configuration with new value