Elasticsearch Cluster 1.1.1 环境中的 OOM 问题
OOM issue in Elasticsearch Cluster 1.1.1 Environment
我有一个带有两个节点的 Elasticsearch 1.1.1 集群。每个配置为 18G 的堆。 (每个节点RAM为32G)
我们总共有 6 个分片,每个分片有一个副本。 ES 在 Ubuntu 机器上的 64 位 JVM 上运行。
我们的集群中只有一个索引。群集运行状况看起来是绿色的。每个节点上的文档数接近 2 亿。
每个集群节点上使用的数据约为 150GB。没有未分配的分片。
系统遇到 OOM 问题(java.lang.OutOfMemoryError:Java 堆 space)。
elasticsearch.yml的内容
bootstrap.mlockall: true
transport.tcp.compress: true
indices.fielddata.cache.size: 35%
indices.cache.filter.size: 30%
indices.cache.filter.terms.size: 1024mb
indices.memory.index_buffer_size: 25%
indices.fielddata.breaker.limit: 20%
threadpool:
search:
type: cached
size: 100
queue_size: 1000
已经注意到 org.apache.lucene.search.TopFieldCollector$OneComparatorNonScoringCollector 的实例占用了大部分堆space
(约 45%)
我是 ES 新手。有人可以指导(或评论)有关 OOM 问题的情况吗,可能是什么原因,因为我们分配了很多堆space?
直言不讳:你在鞭打一匹死马。 1.x 不再维护,这是有充分理由的。在 OOM 的情况下:Elasticsearch replaced field data 尽可能使用文档值并添加更多断路器。
使问题进一步复杂化的是,官方文档上没有更多关于 1.1 的文档——只有 0.90、1.3、1.4,...所以至少你应该升级到 1.7(最新的 1.x 发布).
关于您的 OOM 问题,您可以尝试什么:
- 增加堆大小,减少查询的数据量,添加更多节点,使用文档值(2.x 及以上)。
- 我觉得你的
indices.fielddata.breaker.limit
很可疑。我认为此配置参数已在 1.4 中重命名为 indices.breaker.fielddata.limit
并且 Elasticsearch Guide 声明:
In Fielddata Size, we spoke about adding a limit to the size of
fielddata, to ensure that old unused fielddata can be evicted. The
relationship between indices.fielddata.cache.size and
indices.breaker.fielddata.limit is an important one. If the
circuit-breaker limit is lower than the cache size, no data will ever
be evicted. In order for it to work properly, the circuit breaker
limit must be higher than the cache size.
我有一个带有两个节点的 Elasticsearch 1.1.1 集群。每个配置为 18G 的堆。 (每个节点RAM为32G) 我们总共有 6 个分片,每个分片有一个副本。 ES 在 Ubuntu 机器上的 64 位 JVM 上运行。
我们的集群中只有一个索引。群集运行状况看起来是绿色的。每个节点上的文档数接近 2 亿。 每个集群节点上使用的数据约为 150GB。没有未分配的分片。
系统遇到 OOM 问题(java.lang.OutOfMemoryError:Java 堆 space)。
elasticsearch.yml的内容
bootstrap.mlockall: true
transport.tcp.compress: true
indices.fielddata.cache.size: 35%
indices.cache.filter.size: 30%
indices.cache.filter.terms.size: 1024mb
indices.memory.index_buffer_size: 25%
indices.fielddata.breaker.limit: 20%
threadpool:
search:
type: cached
size: 100
queue_size: 1000
已经注意到 org.apache.lucene.search.TopFieldCollector$OneComparatorNonScoringCollector 的实例占用了大部分堆space (约 45%)
我是 ES 新手。有人可以指导(或评论)有关 OOM 问题的情况吗,可能是什么原因,因为我们分配了很多堆space?
直言不讳:你在鞭打一匹死马。 1.x 不再维护,这是有充分理由的。在 OOM 的情况下:Elasticsearch replaced field data 尽可能使用文档值并添加更多断路器。
使问题进一步复杂化的是,官方文档上没有更多关于 1.1 的文档——只有 0.90、1.3、1.4,...所以至少你应该升级到 1.7(最新的 1.x 发布).
关于您的 OOM 问题,您可以尝试什么:
- 增加堆大小,减少查询的数据量,添加更多节点,使用文档值(2.x 及以上)。
- 我觉得你的
indices.fielddata.breaker.limit
很可疑。我认为此配置参数已在 1.4 中重命名为indices.breaker.fielddata.limit
并且 Elasticsearch Guide 声明:
In Fielddata Size, we spoke about adding a limit to the size of fielddata, to ensure that old unused fielddata can be evicted. The relationship between indices.fielddata.cache.size and indices.breaker.fielddata.limit is an important one. If the circuit-breaker limit is lower than the cache size, no data will ever be evicted. In order for it to work properly, the circuit breaker limit must be higher than the cache size.