diff --git a/docs/elasticsearch-spec.asciidoc b/docs/elasticsearch-spec.asciidoc index ac826c98eb..8935e873e3 100644 --- a/docs/elasticsearch-spec.asciidoc +++ b/docs/elasticsearch-spec.asciidoc @@ -101,6 +101,38 @@ $ openssl req -x509 -newkey rsa:4096 -keyout tls.key -out tls.crt -days 365 -nod $ kubectl create secret tls my-cert --cert tls.crt --key tls.key ---- +[id="{p}-virtual-memory"] +=== Virtual memory + +By default, Elasticsearch is using memory mapping (mmap) to efficiently access indices. +Usually, default values for virtual address space on Linux distributions are too low for Elasticsearch to work properly, which may result in out of memory exceptions. +To increase virtual memory ECK sets the recommended value by default. + +A dedicated init container will set the kernel setting `vm.max_map_count=262144` on the host. +This requires the init container to be privileged. +This kernel setting can also be set on the host directly. +In such case, you may disable the init container explicitly in the Elasticsearch specification: +[source,yaml] +---- +spec: + setVmMaxMapCount: false +---- + +To get more info about this setting you can consult the Elasticsearch documentation: +https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html + +Optionally, you can select a different type of file system implementation for the storage. Here you can find information about possible options: +https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-store.html + +[source,yaml] +---- +spec: + nodes: + - nodeCount: 3 + config: + index.store.type: niofs +---- + [id="{p}-update-strategy"] === Update strategy @@ -237,4 +269,5 @@ ECK will detect it, and recreate the 3 missing nodes as expected. However, since In this situation, it would be preferable to first recreate the missing nodes in `europe-west-3b`, then continue the cluster upgrade. In order to do so, ECK must know about the logical grouping of nodes. Since this is an arbitrary setting (can represent availability zones, but also nodes roles, hot-warm topologies, etc.), it must be specified in the `updateStrategy.groups` section of the Elasticsearch specification. -Nodes grouping is expressed through labels on the resources. In the example above, 3 pods are labeled with `group-a`, and the 3 other pods with `group-b`. \ No newline at end of file +Nodes grouping is expressed through labels on the resources. In the example above, 3 pods are labeled with `group-a`, and the 3 other pods with `group-b`. +