Hello!
We are in the process of migrating our cluster from ES 1.5.2 to ES 5.6.2. We are running some performance tests on both of the clusters and it looks like geo_polygon query is slow in ES 5.6.2. Both have the same index settings, 5 shards and 1 replica:
ES1.5 results:
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.64s 544.52ms 4.82s 70.05%
Req/Sec 3.99 3.97 30.00 72.31%
Latency Distribution
50% 1.56s
75% 1.95s
90% 2.38s
99% 3.22s
25911 requests in 15.00m, 138.78MB read
Requests/sec: 28.79
Transfer/sec: 157.89KB
ES5.6 results:
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.71s 1.71s 10.49s 71.56%
Req/Sec 2.65 3.73 30.00 86.56%
Latency Distribution
50% 3.39s
75% 4.63s
90% 6.05s
99% 9.09s
11628 requests in 15.00m, 68.58MB read
Requests/sec: 12.92
Transfer/sec: 78.03KB
The performance script reads from a file that has the queries specific to its version:
ES1.5 query sample:
{
"size": 3000,
"filter": {
"geo_polygon": {
"property.location": {
"points": [
{
"lat": -33.91248,
"lon": 151.15363
},
{
"lat": -33.91248,
"lon": 151.19965
},
{
"lat": -33.94949,
"lon": 151.19965
},
{
"lat": -33.94949,
"lon": 151.15363
},
{
"lat": -33.91248,
"lon": 151.15363
}
]
}
}
},
"fields": [
"id",
"ota_hotel_code",
"provider_code"
]
}
ES5.6 query sample:
{
"size": 3000,
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"geo_polygon": {
"location": {
"points": [
{
"lat": -33.91248,
"lon": 151.15363
},
{
"lat": -33.91248,
"lon": 151.19965
},
{
"lat": -33.94949,
"lon": 151.19965
},
{
"lat": -33.94949,
"lon": 151.15363
},
{
"lat": -33.91248,
"lon": 151.15363
}
]
}
}
}
}
},
"_source": {
"includes": [
"id",
"ota_hotel_code",
"provider_code"
]
}
}
We have tried rerunning the performance script a couple of times and ES1.5 has a much more consistent result of 23req/s whereas ES5.6 some times fluctuates between 12req/s to 23req/s.
We are not sure whether our query in 5.6 is correct or maybe we are missing some configuration.