I am seeing a huge performance downgrade after upgrading Elasticsearch from version 6.4 to 7.7.
Query Sample:
{"size": 1000000,"from": 0,"track_total_hits": true,"query": {"bool": {"filter": {"bool": {"should": [{"bool": {"must": [{"term": {"Term1": "String1"}},{"term": {"Term2": 0}}]}},{"bool": {"must": [{"term": {"Term1": "String2"}},{"term": {"Term2": 0}}]}},{"bool": {"must": [{"term": {"Term1": "String3"}},{"term": {"Term2": 0}}]}},{"bool": {"must": [{"term": {"Term1": "String4"}},{"term": {"Term2": 0}}]}},{"bool": {"must": [{"term": {"Term1": "String5"}},{"term": {"Term2": 2}}]}}],"must": [{"range": {"Term3": {"gte": 1622592000,"lte": 1622678399}}},{"terms": {"Term4": ["xyz1","xyz2","xyz3","xyz4","xyz5","xyz6","xyz7","xyz8","xyz9","xyz10","xyz11","xyz12","xyz13","xyz14","xyz15","xyz16","xyz17","xyz18","xyz19","xyz20","xyz21","xyz22","xyz23","xyz24","xyz25","xyz26","xyz27","xyz28","xyz29","xyz30","xyz31","xyz32","xyz33","xyz34","xyz35","xyz36","xyz37","xyz38","xyz39","xyz40","xyz41","xyz42","xyz43","xyz44","xyz45","xyz46","xyz47","xyz48","xyz49","xyz50","xyz51","xyz52","xyz53","xyz54","xyz55","xyz56","xyz57","xyz58","xyz59","xyz60","xyz61","xyz62","xyz63","xyz64","xyz65","xyz66","xyz67","xyz68","xyz69","xyz70","xyz71","xyz72","xyz73","xyz74","xyz75","xyz76","xyz77","xyz78","xyz79","xyz80","xyz81","xyz82","xyz83","xyz84","xyz85","xyz86","xyz87","xyz88","xyz89","xyz90","xyz91","xyz92","xyz93","xyz94","xyz95","xyz96","xyz97","xyz98","xyz99","xyz100","xyz101","xyz102","xyz103","xyz104","xyz105","xyz106","xyz107","xyz108","xyz109","xyz110","xyz111","xyz112","xyz113","xyz114","xyz115","xyz116","xyz117","xyz118","xyz119","xyz120"]}}]}}}},"_source": ["Term3","Term1","Term2","Term4","V"],"sort": [{"Term3": {"order": "asc"}},{"Term1": {"order": "asc"}},{"Term2": {"order": "asc"}},{"Term4": {"order": "asc"}}]}
When I ran the above query on ES v6.4, The average Documents per seconds it was returning 58,014. While the same query for ES v7.7 is returning 45,560. Which is an almost 27% downgrade.
Note:
- For both versions, I am having 5 shards.
- I have compared the Index settings, cluster's health, node's settings. They are almost the same except for whatever has been added through the newer version.
- I tried adding/removing shards, but no luck.
Any thought/help would be appreciated.