Skip to content

Elasticsearch

Virtual memory setting

By default, Elasticsearch services use memory mapping to speed up access to indexes. This requires a specific Linux kernel configuration to operate properly; see max virtual memory areas for details. If your Kubernetes nodes are configured with incompatible settings and Elasticsearch will fail to start.

Adjust max virtual memory areas

To overcome this, please manually adjust vm.max_map_count via sysctl to be at least 262144 or, let the PCS-HA chart to do it automatically via values yaml file:

elasticsearch:
  sysctlImage:
    enabled: true

Another way is to add --set elasticsearch.sysctlImage.enabled=true to helm upgrade command line.

Use different implementation of index store

Alternatively, you can reconfigure Elasticsearch to completely disable the use of memory mapping:

elasticsearch:
  extraConfig:
    node:
      store:
        allow_mmap: false

Please note that for production workloads, it is strongly recommended to increase the kernel setting vm.max_map_count and leave allow_mmap unset.

See available File system storage types for details.