[英]How to differentiate between RAM and heap usage in logstash?
I am running a logstash Kubernetes pod, I have set LS_JVM_OPTS:= -Xmx1g -Xms500m, and monitoring the same using Prometheus grafana, I see memory usage 3.2 Gig.我正在运行一个 logstash Kubernetes pod,我设置了 LS_JVM_OPTS:= -Xmx1g -Xms500m,并使用 Prometheus grafana 进行监控,我看到 memory 使用量为 3.2 Gig。 May I know what is happening here?
我可以知道这里发生了什么吗?
You are probably seeing the container memory used and not the heap size, there are other things in the JVM like the GC that require memory.您可能看到使用的容器 memory 而不是堆大小,JVM 中还有其他内容,例如需要 memory 的 GC。 Although,
3.2G
seems a bit excessive for that heap, so you might want to check that the logstash JVM does indeed have those heap options.虽然
3.2G
对于该堆来说似乎有点过多,但您可能需要检查 logstash JVM 是否确实具有这些堆选项。
$ kubectl exec -t <pod-name> -c <container-name> -- /bin/ps -Af | grep java
You can also check ️ what request/limits you have in your container, to see if you are requesting 3.2Gb initially.您还可以检查 ️ 您的容器中有哪些请求/限制,以查看您最初是否请求 3.2Gb。
kubectl get pod <logstash-pod-name> -c <container-name> -o=yaml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.