I have 2 clusters of ElasticSearch:
- old 3 nodes(master+data)
- ElasticSearch: 5.1.2
- java : openjdk version "1.8.0_111"
- -Xms12g -Xmx12g
- new 6 nodes(3 master + 3 data) with much better hardware (cpu/ram/hdd)
- ElasticSearch: 6.4
- java : openjdk version "1.8.0_181"
- -Xms32766m -Xmx32766m
In both clusters I have an small index (about 12M docs) with same properties and information in both clusters. And there is a search request which is using scripted_metric aggregation with painless scripts (init/map/combine/reduce). And my problem is that in old cluster this search request works much faster than in new one.
I profiled request on both clusters and saw that most of time request spent in collect phase of script_metric aggreagtion, which I suppose means that map script executed longer. But I can't understand what is the reason of this slow execution same request on the same dataset. May be there are some properties shoud be set for Elastic 6.4 to enable some performance boost which was default before?