Adjusting system memory allocation
You can adjust system memory allocation to improve overall performance by setting the /proc/sys/vm/max_map_count
kernel tuning parameter. Doing this can prevent problems such as the slowing down of batch execution and a continuous increase of memory used by the JVM.
About this task
A good setting to use is four times the number of megabytes of system memory. For example, if you’re running on a system with 128 gigabytes of memory, then calculate (128*1024=131072 megabytes) times 4, which is 524288.
Steps
-
Sign on as root user.
-
Add the line
vm.max_map_count = <megabytes>
to the file/etc/sysctl.conf
. For example:vm.max_map_count = 524288
-
Restart the system to apply the change.
-
Optional: If you need to tune performance further after setting the
max_map_count
parameter, do the following:-
Clone the existing performance profile.
-
Run the
tuned
command. -
Add the line
vm.max_map_count = <megabytes>
to the file/usr/lib/tuned/profile-name/tuned.conf
. -
To select the updated profile, run
tuned-adm profile customized_profile
. -
Restart the system to apply the changes.
-