Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on heapSize is incorrect #166

Open
JVMartin opened this issue Nov 15, 2024 · 0 comments
Open

Documentation on heapSize is incorrect #166

JVMartin opened this issue Nov 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JVMartin
Copy link

JVMartin commented Nov 15, 2024

In the documentation, it states:

This chart will automatically calculate Java heap size from given resources.requests.memory value. If you want to specify number of heap size, you can set graylog.heapSize to your desired value. The graylog.heapSize value must be in JVM -Xmx format.

So, we all incorrectly assumed this meant that if we do not specify a graylog.heapSize in our values, it will default to our resources.requests.memory value, which we are specifying like so in our values file:

graylog:
  replicas: 2
  resources:
    requests:
      cpu: "1000m"
      memory: "7Gi"
    limits:
      memory: "9Gi"

To my surprise, I saw Graylog regularly consuming > 13GB of memory. It turns out, the documentation is incorrect, because 16g is hard-coded to the default values here:

## Set Graylog Java heapsize. If this value empty, chart will allocate heapsize using `-XX:+UseCGroupMemoryLimitForHeap`
## ref: https://blogs.oracle.com/java-platform-group/java-se-support-for-docker-cpu-and-memory-limits
##
heapSize: "16g"

And so this if condition is used:

{{- if .Values.graylog.heapSize }}
value: "{{ $javaOpts }} {{ printf "-Xms%s -Xmx%s" .Values.graylog.heapSize .Values.graylog.heapSize}}"
{{- else }}
value: "{{ $javaOpts }} -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport"
{{- end }}

We had to explicitly add heapSize to our values file:

heapSize: "7g"

In order to get Graylog to stop consuming so much memory.

By the way, love the chart, thank you for it! 🙏

@JVMartin JVMartin added the bug Something isn't working label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant