Skip to content

Latest commit

 

History

History
64 lines (57 loc) · 1.97 KB

cluster-logging-elasticsearch-limits.adoc

File metadata and controls

64 lines (57 loc) · 1.97 KB

Configuring Elasticsearch CPU and memory limits

Each component specification allows for adjustments to both the CPU and memory limits. You should not have to manually adjust these values as the Elasticsearch Operator sets values sufficient for your environment.

Each Elasticsearch node can operate with a lower memory setting though this is not recommended for production deployments. For production use, you should have no less than the default 16Gi allocated to each Pod. Preferably you should allocate as much as possible, up to 64Gi per Pod.

Prerequisites
  • Cluster logging and Elasticsearch must be installed.

Procedure
  1. Edit the Cluster Logging Custom Resource (CR) in the openshift-logging project:

    $ oc edit ClusterLogging instance
    apiVersion: "logging.openshift.io/v1"
    kind: "ClusterLogging"
    metadata:
      name: "instance"
    ....
    spec:
        logStore:
          type: "elasticsearch"
          elasticsearch:
            resources: (1)
              limits:
                memory: "16Gi"
              requests:
                cpu: "1"
                memory: "16Gi"
    1. Specify the CPU and memory limits as needed. If you leave these values blank, the Elasticsearch Operator sets default values that should be sufficient for most deployments.

      If you adjust the amount of Elasticsearch CPU and memory, you must change both the request value and the limit value.

      For example:

            resources:
              limits:
                cpu: "8"
                memory: "32Gi"
              requests:
                cpu: "8"
                memory: "32Gi"

      Kubernetes generally adheres the node CPU configuration and DOES not allow Elasticsearch to use the specified limits. Setting the same value for the requests and limits ensures that Elasticseach can use the CPU and memory you want, assuming the node has the CPU and memory available.