简体   繁体   English

如何区分logstash中的RAM和堆使用情况?

[英]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.

相关问题 如何在Kubernetes部署中查找cpu和ram的使用情况 - How to find cpu and ram usage in Kubernetes deployment kubectl logs -f 如何影响 CPU 和 RAM 的使用? - How does kubectl logs -f affect CPU and RAM usage? 如何在基于Linux的VM上运行的filebeat和在kubernetes中运行的logstash之间建立连接(logstash通过入口公开) - how to establish connectivity between filebeat running on a linux based VM and logstash running in kubernetes(logstash exposed through ingress) 如何从 logstash 连接 logstash? - How to connect logstash from logstash? kube-apiserver高RAM使用率 - kube-apiserver high RAM usage 如何区分 Pod 身份? - How to differentiate Pod identities? 如何区分Kubernetes中同名的Prometheus指标与动态发现的微服务 - How to differentiate between equally-named Prometheus metrics from dynamically discovered micro-services in Kubernetes 已终止的 Kubernetes pod 中的 jvm 堆使用历史记录 - jvm heap usage history in a killed Kubernetes pod 区分多个Kubernetes集群的方法 - Ways to differentiate between multiple Kubernetes clusters Kubernetes Rest API 节点 CPU 和 RAM 使用率百分比 - Kubernetes Rest API node CPU and RAM usage in percentage
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM