Configuring CPU and memory limits for OpenShift Logging components

You can configure both the CPU and memory limits for each of the OpenShift Logging components as needed.

Configuring CPU and memory limits

The OpenShift Logging components allow for adjustments to both the CPU and memory limits.

Procedure

  1. Edit the ClusterLogging custom resource (CR) in the openshift-logging project:

    1. $ oc -n openshift-logging edit ClusterLogging instance
    1. apiVersion: "logging.openshift.io/v1"
    2. kind: "ClusterLogging"
    3. metadata:
    4. name: "instance"
    5. namespace: openshift-logging
    6. ...
    7. spec:
    8. managementState: "Managed"
    9. logStore:
    10. type: "elasticsearch"
    11. elasticsearch:
    12. nodeCount: 3
    13. resources: (1)
    14. limits:
    15. memory: 16Gi
    16. requests:
    17. cpu: 200m
    18. memory: 16Gi
    19. storage:
    20. storageClassName: "gp2"
    21. size: "200G"
    22. redundancyPolicy: "SingleRedundancy"
    23. visualization:
    24. type: "kibana"
    25. kibana:
    26. resources: (2)
    27. limits:
    28. memory: 1Gi
    29. requests:
    30. cpu: 500m
    31. memory: 1Gi
    32. proxy:
    33. resources: (2)
    34. limits:
    35. memory: 100Mi
    36. requests:
    37. cpu: 100m
    38. memory: 100Mi
    39. replicas: 2
    40. collection:
    41. logs:
    42. type: "fluentd"
    43. fluentd:
    44. resources: (3)
    45. limits:
    46. memory: 736Mi
    47. requests:
    48. cpu: 200m
    49. memory: 736Mi
    1Specify the CPU and memory limits and requests for the log store as needed. For Elasticsearch, you must adjust both the request value and the limit value.
    2Specify the CPU and memory limits and requests for the log visualizer as needed.
    3Specify the CPU and memory limits and requests for the log collector as needed.