Profiling query show shard latency


(Tcheronneau) #1

Hello everyone,

I'm facing a strange situation.
I'm trying to optimize a cluster of elasticsearch and during my research I tried the search profiler.
Here is my query :
{
"query":{
"regexp" : {
"host":"myhost.*"
}
}
}

It's a really simple query the purpose was to get first results.
But the query profile showed me that shards are not giving the same response time.
Example :
2.423s [shard][1]
2.414s [shard][0]
2.369s [shard][4]
2.305s [shard][2]
157.583ms [shard][3]

On the second time I profile the query I'll get :
2.927s [shard][4]
2.719s [shard_dsyQfrR70A][3]
2.161s [shard][2]
179.997ms [shard][1]
165.359ms [shard][0]

On the third time I run the profile the result will be similar to the first, then to the second and so on... (the pattern is based on the shards number).
I really don't understand why this is appenning but this is a pattern I see on both our cluster.

For information there is 3 nodes (identical in version 5.6) and shards are separate on the 3 nodes.
Does anyone already have this kind of comportement ?

Thanks,
Thomas.


(Simon Willnauer) #2

you can use a preference to get more stable results. I assume that is might depend on which replica you are hitting but I am not 100% sure


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.