• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Error: Docker max virtual memory areas vm.max_map_count 65530 is too low increase to at least

by admin

If you get an error “max virtual memory areas vm.max_map_count 65530 is too low increase to at least” when execute the SonarQube or Elastic Search in docker container in Linux instance:

Error: Docker max virtual memory areas vm.max_map_count 65530 is too low increase to at least

vm.max_map_count

vm.max_map_count is a Linux kernel setting that determines the maximum number of memory map areas that a process can have. Memory map areas are used to map files or devices into a process’s memory space, allowing the process to access the data in those files or devices as if they were part of its own memory.

The vm.max_map_count setting is used to prevent a process from consuming too many memory map areas, which could lead to resource exhaustion and system instability. By default, the vm.max_map_count setting is set to 65536 on most systems, but it can be adjusted to meet the needs of the system and the processes running on it.

To check the current value of vm.max_map_count on your system, you can run the following command:

# cat /proc/sys/vm/max_map_count

You need to increase the max_map_count the value in Kernel paramenter that would avoid running out of map areas for the Vector Server process. Memory map areas are used as a side-effect of calling malloc, directly by mmap, mprotect, and madvise, and also when loading shared libraries and the default value is 65536.

We have few more options to set the value in your Linux machine for both CentOS and Ubuntu.

Can update the value to max_map_count file directly using the command below:

# echo 262144 > /proc/sys/vm/max_map_count

or execute the command below:

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

To change the value of vm.max_map_count, you can use the sysctl command as well to set it to the desired value:

# sudo sysctl -w vm.max_map_count=262144

Note that changes made to vm.max_map_count using the sysctl command are temporary and will not persist after a reboot. To make the change permanent, you will need to edit the /etc/sysctl.conf file and add the following line:

reload the configuration settings as root user:

# sysctl -p

It is important to carefully consider the value of vm.max_map_count, as setting it too low can cause processes to fail due to insufficient memory map areas, while setting it too high can lead to resource exhaustion and system instability. It is generally recommended to set vm.max_map_count to a value that is appropriate for the needs of the system and the processes running on it.

Filed Under: Linux

Some more articles you might also be interested in …

  1. mkfs.exfat Command Examples in Linux
  2. Beginners Guide to Automounting File Systems in CentOS / RHEL
  3. last: command not found
  4. How to verify the integrity of a file with md5 checksum
  5. dpkg-query: command not found
  6. hdparm Command Examples in Linux
  7. flatpak-builder: command not found
  8. lslocks Command Examples in Linux
  9. abroot Command Examples in Linux
  10. How to check the PHP version on Linux

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright