Concurrent searches over same dataset degrades performance


(Vishal Mahajan) #1

I was trying Filtered query (default search type) to fetch first 8k out of approx 170k matched
records. I noticed that on an average query took around 500ms (response.getTookInMillis()).
But, when I tried 4 concurrent searches over same dataset (in ideal scenario dataset will be different), I noticed that the performance degraded and each query took more than 1sec on average. Is this
degradation in search response expected?

I still haven't tried with scroll and scan as order is not important, but, curious to know if anything wrong with query or the way I executed. Any configuration tuning required?

I am executing search on single index having around 850k docs (each doc contains around 5 fields), with 1g allocated to ES and using java node client to execute searches. Following is the query JSON:
{
"from" : 0,
"size" : 8000,
"query" : {
"filtered" : {
"query" : {
"match_all" : { }
},
"filter" : {
"and" : {
"filters" : [ {
"term" : {
"details" : "Holiday"
}
}, {
"range" : {
"createdOn" : {
"from" : 0,
"to" : 1429260645351,
"include_lower" : true,
"include_upper" : true
}
}
}, {
"terms" : {
"priority" : [ 1, 2 ]
}
} ]
}
}
}
},


(Jason Wee) #2

have you cache the filter where necessary? it would help in the subsequent three queries.

when four concurrent querires are executed, do you see node in the es cluster spike? also what are existing heap usage and es version?

jason


(Alex Roytman) #3

just curious if your cluster is a single node, how many shards and how many processor cores you have.
with concurrent requests you may not get the same parallelism level (because you do not have enough processor cores) per query. if you had just one processor core would you expect 4 parallel or sequential requests take the same total time as a single request? It would probably be 4 times slower. in your case it is 2 times slower right?


(system) #4