Recently we migrated from ES-5.1 to ES7.4 and the CPU usage too high in ES7.4 compared to ES5.1
With a given load the max. cpu usage of 5.1 is in between 0% to 10%.
However the performance and max. cpu usage of 7.4 is in between 20% to 100%.
The cluster configuration of 7.4 is exactly same as 5.1 and same queries being used.
can you go into some more details about your query load? What kind fo query are you running? Does it include an aggregation? Do you have any special configuration for global ordinals in your mapping? Do you use any special fields? Is this a heavily updated index?
We mostly use a function_score query with some filters on geolocation, date etc... fileds.
We also use another boolean match query along with aggregations.
The data and queries we used are same in 5.1 and 7.4.
But in 7.4 ,
To improve the search speed of this aggregation query, we used Eager_global_ordinals: True on few fields. Since this might be costly at indexing time, as suggested in elasticsearch documentaion we are using refresh_interval: 30s .
Yes, our data gets indexed/updated frequently but at slow rate, approximately at rate of 20 docs per minute.
Other differences:
we enabled encryption(REST encryption and node-to-node encryption) on our 7.4 elasticsearch cluster.
we increased number of shards for our largest index(pri.size = 600GB) in 7.4
number_of_shards: 6 (in 5.1)
number_of_shards: 15 (in 7.4)
Because global ordinals provide a unified mapping for all segments on the shard, they also need to be rebuilt entirely when a new segment becomes visible.
You may want to try a different execution_hint and see what happens.
Just to be sure, did you use eager loading of ordinals in 5.1 as well or added it in 7.4?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.