Skip to content

Change Default Memory Settings for Elasticsearch and Kibana #8748

@ossie-git

Description

@ossie-git

Hi,

I was kind of surprised that the defaults for both Elasticsearch and Kibana make little sense, even for a test environment. For example, the quickstart example deploys:

  • Elasticsearch with a 2GB RAM limit
  • Kibana with a 1GB RAM limit

You quickly end up with issues even for testing. For example, while ingesting 100K documents, Logstash would start throwing errors and the port-forward would go down. It turned out that this was due to Elasticsearch running into OOM and restarting. I also ran into issues with Kibana.

While these defaults are mentioned in the documentation, I think that at the very least embedding them into the sample manifests (at the very least) and setting them to something more realistic would be useful. For example:

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 8.18.1
  nodeSets:
  - name: default
    count: 1
    config:
      node.store.allow_mmap: false
    podTemplate:
      spec:
        containers:
        - name: elasticsearch
          env:
          - name: ES_JAVA_OPTS
            value: -Xms2g -Xmx2g
          resources:
            requests:
              memory: 4Gi
              cpu: 4
            limits:
              memory: 4Gi

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions