indices.query.bool.max_clause_count 行为

问题描述 投票:0回答:1

计划将弹性集群从 7.17 迁移到 8.10。

我们在弹性7.17中设置了indices.query.bool.max_clause_count的值:200000。

在查看发行说明时,我们发现 8.x 中不推荐使用indices.query.bool.max_clause_count 设置,而是支持基于 RAM/CPU 的动态设置(https://www.elastic.co/guide/en/ elasticsearch/reference/8.13/search-settings.html)。

我们有几个相同的问题,

  1. 8.10中indices.query.bool.max_clause_count的计算公式是什么?

  2. 我们是否使用物理服务器的 RAM 和 CPU 来计算 的值?或者我们正在使用堆搜索线程池?

  3. 哪个搜索线程池属性用于计算indices.query.bool.max_clause_count的值,默认值是多少?

  4. 有没有日志可以知道当前es集群的indices.query.bool.max_clause_count的值?

  5. 还有其他属性可以替代弹性8.10吗?

我们尚未通过发行说明将集群迁移到 8.10。

elasticsearch
1个回答
0
投票

是的,它已被弃用(请参阅 PR #81525 和相应的问题 #46433

  1. 8.10中indices.query.bool.max_clause_count的计算公式是什么?

公式可以在这里找到,基本上:

max(1024, (int) maxHeapInMb * 64 / threadPoolSize)
  1. 我们是否使用物理服务器的 RAM 和 CPU 来计算 的值?或者我们正在使用堆搜索线程池?

使用分配的堆(即设置我的

-Xmx
)和分配的处理器数量(即由
os.allocated_processors
返回,如下所示)

  1. 哪个搜索线程池属性用于计算indices.query.bool.max_clause_count的值,默认值是多少?

您可以获得的

thread_pool.search.size
价值

GET _cluster/settings?include_defaults&filter_path=**.thread_pool.search.size

=> 
{
  "defaults": {
    "thread_pool": {
      "search": {
        "size": "2"
      }
    }
  }
}

使用公式

int((# of allocated processors * 3) / 2) + 1

设置

就我而言,

os.allocated_processors = 1
,所以
size = int((1 * 3) / 2) + 1 = 2

  1. 是否有任何日志可以了解当前es集群的indices.query.bool.max_clause_count的值?
GET _cluster/settings?include_defaults&filter_path=**.max_clause_count

=> 

{
  "defaults": {
    "indices": {
      "query": {
        "bool": {
          "max_clause_count": "4096"
        }
      }
    }
  }
}
  1. 还有其他属性可以替代弹性 8.10 吗?

据我所知没有

© www.soinside.com 2019 - 2024. All rights reserved.