身安不如心安,屋宽不如心宽 。

设置多副本后,查询时间变慢?

Elasticsearch | 作者 thewind | 发布于2020年02月11日 | 阅读数:1830

1. 环境说明: elasticseaerch7.2.1版本,三台物理机器组成集群(每台一个节点),设置了3副本;

物理机器.png

 
2. 使用profile查看,query阶段时间没有问题,但是总查询时间使用很多
{
"took" : 4835, # 查询实际使用时间,单位: ms
"timed_out" : false,
"_shards" : {
"total" : 9,
"successful" : 9,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 0,
"relation" : "eq"
},
"max_score" : null,
"hits" : [ ]
},
"profile" : {
"shards" : [
{
"id" : "[3zMbvYyFT1GwAjRGZzJzPA][yz-protocol-20200206][0]", # 分片标识(节点名称-索引名称-分片ID)
"searches" : [
{
"query" : [
{
"type" : "BooleanQuery",
"description" : "+proto_type:http +src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 93588,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 11,
"create_weight" : 88303,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 5273
},
"children" : [
{
"type" : "TermQuery",
"description" : "proto_type:http",
"time_in_nanos" : 68827,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 11,
"create_weight" : 67041,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 1774
}
},
{
"type" : "PointRangeQuery",
"description" : "src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 1705,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 0,
"create_weight" : 1704,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 0
}
}
]
}
], # (1)lucene查询使用时间
"rewrite_time" : 25130, # (2)分解DSL查询语句,为lucene底层查询结构使用时间
"collector" : [
{
"name" : "CancellableCollector",
"reason" : "search_cancelled",
"time_in_nanos" : 10147,
"children" : [
{
"name" : "SimpleTopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 1578
}
]
}
] # (3)lucene底层,收集组合所有适合的docID使用时间
}
],
"aggregations" : [ ]
},
{
"id" : "[3zMbvYyFT1GwAjRGZzJzPA][yz-protocol-20200206][3]",
"searches" : [
{
"query" : [
{
"type" : "BooleanQuery",
"description" : "+proto_type:http +src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 93596,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 5,
"create_weight" : 89630,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 3960
},
"children" : [
{
"type" : "TermQuery",
"description" : "proto_type:http",
"time_in_nanos" : 53940,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 5,
"create_weight" : 52507,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 1427
}
},
{
"type" : "PointRangeQuery",
"description" : "src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 701,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 0,
"create_weight" : 700,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 0
}
}
]
}
],
"rewrite_time" : 9854,
"collector" : [
{
"name" : "CancellableCollector",
"reason" : "search_cancelled",
"time_in_nanos" : 7415,
"children" : [
{
"name" : "SimpleTopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 3467
}
]
}
]
}
],
"aggregations" : [ ]
},
{
"id" : "[3zMbvYyFT1GwAjRGZzJzPA][yz-protocol-20200206][4]",
"searches" : [
{
"query" : [
{
"type" : "BooleanQuery",
"description" : "+proto_type:http +src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 144061,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 7,
"create_weight" : 139588,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 4465
},
"children" : [
{
"type" : "TermQuery",
"description" : "proto_type:http",
"time_in_nanos" : 121609,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 7,
"create_weight" : 120321,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 1280
}
},
{
"type" : "PointRangeQuery",
"description" : "src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 595,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 0,
"create_weight" : 594,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 0
}
}
]
}
],
"rewrite_time" : 9121,
"collector" : [
{
"name" : "CancellableCollector",
"reason" : "search_cancelled",
"time_in_nanos" : 4589,
"children" : [
{
"name" : "SimpleTopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 1482
}
]
}
]
}
],
"aggregations" : [ ]
},
{
"id" : "[3zMbvYyFT1GwAjRGZzJzPA][yz-protocol-20200206][5]",
"searches" : [
{
"query" : [
{
"type" : "BooleanQuery",
"description" : "+proto_type:http +src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 106645,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 5,
"create_weight" : 100832,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 5807
},
"children" : [
{
"type" : "TermQuery",
"description" : "proto_type:http",
"time_in_nanos" : 68698,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 5,
"create_weight" : 67080,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 1612
}
},
{
"type" : "PointRangeQuery",
"description" : "src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 819,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 0,
"create_weight" : 818,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 0
}
}
]
}
],
"rewrite_time" : 32148,
"collector" : [
{
"name" : "CancellableCollector",
"reason" : "search_cancelled",
"time_in_nanos" : 14968,
"children" : [
{
"name" : "SimpleTopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 2964
}
]
}
]
}
],
"aggregations" : [ ]
},
{
"id" : "[3zMbvYyFT1GwAjRGZzJzPA][yz-protocol-20200206][8]",
"searches" : [
{
"query" : [
{
"type" : "BooleanQuery",
"description" : "+proto_type:http +src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 123536,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 7,
"create_weight" : 119089,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 4439
},
"children" : [
{
"type" : "TermQuery",
"description" : "proto_type:http",
"time_in_nanos" : 82594,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 7,
"create_weight" : 81027,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 1559
}
},
{
"type" : "PointRangeQuery",
"description" : "src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 1908,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 0,
"create_weight" : 1907,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 0
}
}
]
}
],
"rewrite_time" : 23431,
"collector" : [
{
"name" : "CancellableCollector",
"reason" : "search_cancelled",
"time_in_nanos" : 4987,
"children" : [
{
"name" : "SimpleTopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 1527
}
]
}
]
}
],
"aggregations" : [ ]
},
{
"id" : "[9WO8ZRzZTDe4JzK5QjgebQ][yz-protocol-20200206][1]",
"searches" : [
{
"query" : [
{
"type" : "BooleanQuery",
"description" : "+proto_type:http +src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 119534,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 8,
"create_weight" : 112951,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 6574
},
"children" : [
{
"type" : "TermQuery",
"description" : "proto_type:http",
"time_in_nanos" : 89838,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 8,
"create_weight" : 87919,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 1910
}
},
{
"type" : "PointRangeQuery",
"description" : "src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 611,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 0,
"create_weight" : 610,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 0
}
}
]
}
],
"rewrite_time" : 12929,
"collector" : [
{
"name" : "CancellableCollector",
"reason" : "search_cancelled",
"time_in_nanos" : 10023,
"children" : [
{
"name" : "SimpleTopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 1708
}
]
}
]
}
],
"aggregations" : [ ]
},
{
"id" : "[9WO8ZRzZTDe4JzK5QjgebQ][yz-protocol-20200206][2]",
"searches" : [
{
"query" : [
{
"type" : "BooleanQuery",
"description" : "+proto_type:http +src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 90845,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 4,
"create_weight" : 86897,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 3943
},
"children" : [
{
"type" : "TermQuery",
"description" : "proto_type:http",
"time_in_nanos" : 62970,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 4,
"create_weight" : 61715,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 1250
}
},
{
"type" : "PointRangeQuery",
"description" : "src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 662,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 0,
"create_weight" : 661,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 0
}
}
]
}
],
"rewrite_time" : 9330,
"collector" : [
{
"name" : "CancellableCollector",
"reason" : "search_cancelled",
"time_in_nanos" : 3914,
"children" : [
{
"name" : "SimpleTopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 1154
}
]
}
]
}
],
"aggregations" : [ ]
},
{
"id" : "[9WO8ZRzZTDe4JzK5QjgebQ][yz-protocol-20200206][6]",
"searches" : [
{
"query" : [
{
"type" : "BooleanQuery",
"description" : "+proto_type:http +src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 144873,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 11,
"create_weight" : 139941,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 4920
},
"children" : [
{
"type" : "TermQuery",
"description" : "proto_type:http",
"time_in_nanos" : 123158,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 11,
"create_weight" : 121599,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 1547
}
},
{
"type" : "PointRangeQuery",
"description" : "src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 555,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 0,
"create_weight" : 554,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 0
}
}
]
}
],
"rewrite_time" : 8753,
"collector" : [
{
"name" : "CancellableCollector",
"reason" : "search_cancelled",
"time_in_nanos" : 4963,
"children" : [
{
"name" : "SimpleTopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 1741
}
]
}
]
}
],
"aggregations" : [ ]
},
{
"id" : "[9WO8ZRzZTDe4JzK5QjgebQ][yz-protocol-20200206][7]",
"searches" : [
{
"query" : [
{
"type" : "BooleanQuery",
"description" : "+proto_type:http +src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 94341,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 4,
"create_weight" : 89298,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 5038
},
"children" : [
{
"type" : "TermQuery",
"description" : "proto_type:http",
"time_in_nanos" : 66742,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 4,
"create_weight" : 65264,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 1473
}
},
{
"type" : "PointRangeQuery",
"description" : "src_ip.ip:[10.0.81.97 TO 10.0.81.97]",
"time_in_nanos" : 620,
"breakdown" : {
"set_min_competitive_score_count" : 0,
"match_count" : 0,
"shallow_advance_count" : 0,
"set_min_competitive_score" : 0,
"next_doc" : 0,
"match" : 0,
"next_doc_count" : 0,
"score_count" : 0,
"compute_max_score_count" : 0,
"compute_max_score" : 0,
"advance" : 0,
"advance_count" : 0,
"score" : 0,
"build_scorer_count" : 0,
"create_weight" : 619,
"shallow_advance" : 0,
"create_weight_count" : 1,
"build_scorer" : 0
}
}
]
}
],
"rewrite_time" : 13210,
"collector" : [
{
"name" : "CancellableCollector",
"reason" : "search_cancelled",
"time_in_nanos" : 12155,
"children" : [
{
"name" : "SimpleTopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 1299
}
]
}
]
}
],
"aggregations" : [ ]
}
]
}
}
已邀请:

thewind

赞同来自:

fetch时间.png

使用elasticsearch-HQ,查看fetch,query阶段平均时间时间,时间正常范围,无法定位变慢阶段(忽略,red集群状态,有个节点挂了,但不影响索引查询)

thewind

赞同来自:

解决了一部分:
通过搜索时候,添加 preference 参数为 _local , 可以指定检索路由优先选择本地节点,之后的查询会充分利用系统缓存
 

x28358

赞同来自:

路过

x28358

赞同来自:

再次路过

要回复问题请先登录注册