运行 elasticsearch 集群在 kubernetes 上时的堆大小

heap size when running elasticsearch cluster on kubernetes

我是 运行 Kubernetes 集群上的 elasticsearch 集群。我需要增加堆大小。现在堆大小是 4gb,分配给 pod 的内存是 8gb。在 VMs/BMs 上设置弹性搜索集群时,我一直遵循堆大小不应超过物理 RAM 的 50% 的原则。请关注linkhttps://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html 现在我的问题是,当 运行 K8 上的弹性搜索时,这个原理是否会以相同的方式工作,或者当 运行 K8 上的 ES 时如何确定堆大小?

堆大小应该是分配给 pods 的 RAM 大小的一半。

From elasticsearch guide:

The heap size should be half the size of RAM allocated to the Pod. To minimize disruption caused by Pod evictions due to resource contention, you should run Elasticsearch pods at the "Guaranteed" QoS level by setting both requests and limits to the same value.