We tried to migrate from 2.4 to 5.4, but we noticed quite significant performance degradation.
Significantly decreases especially in Significant Terms Aggregation.
We consider the cange about collect_mode is involved, but are there other considerations?
Sample Query
{
"query": {
"query_string": {
"query": "some_ids:259352",
"default_operator": "AND"
}
},
"size": 10,
"aggs": {
"org_cat": {
"significant_terms": {
"field": "org_cat",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"keyword": {
"significant_terms": {
"field": "keyword",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"domain": {
"significant_terms": {
"field": "domain",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"ua_name": {
"significant_terms": {
"field": "ua_name",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"ip": {
"significant_terms": {
"field": "ip_addr",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"org_name": {
"significant_terms": {
"field": "org_name",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"customer_ids": {
"significant_terms": {
"field": "customer_ids",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"pref_code": {
"significant_terms": {
"field": "pref_code",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"org_emp_code": {
"significant_terms": {
"field": "org_emp_code",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"ua_os": {
"significant_terms": {
"field": "ua_os",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"org_gross_code": {
"significant_terms": {
"field": "org_gross_code",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
},
"some_ids": {
"significant_terms": {
"field": "segment_ids",
"shard_size": 300,
"min_doc_count": 10,
"gnd": {
"background_is_superset": false
},
"size": 100
}
}
}
}
2.4 Response - 16s
{
"took": 16564,
"timed_out": false,
"_shards": {
"total": 480,
"successful": 480,
"failed": 0
},
"hits": {
"total": 2965312,
"max_score": 5.930258,
"hits": []
},
"aggregations": {
"ua_name": {},
"org_name.raw": {},
"segment_ids": {},
"org_gross_code": {},
"domain": {},
....
}
}
5.4 Response - 1.5m
{
"took": 91375,
"timed_out": false,
"_shards": {
"total": 480,
"successful": 480,
"failed": 0
},
"hits": {
"total": 2948700,
"max_score": 1,
"hits": []
},
"aggregations": {
"ua_name": {},
"org_name.raw": {},
"segment_ids": {},
"org_gross_code": {},
"domain": {},
....
}
}
Other info
- Total docs: 390,000,000
- Total shards: 480
- AWS
- 8 core x 60 nodes
- docker.elastic.co/elasticsearch/elasticsearch:5.4.2