Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query latency increases with multiple shards #30994

Closed
danielmitterdorfer opened this issue May 31, 2018 · 2 comments
Closed

Query latency increases with multiple shards #30994

danielmitterdorfer opened this issue May 31, 2018 · 2 comments
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >non-issue v7.0.0-beta1

Comments

@danielmitterdorfer
Copy link
Member

danielmitterdorfer commented May 31, 2018

Description of the problem including expected versus actual behavior:

With #30783 we have reduced the number of maximum concurrent shard requests to the number of nodes but at most 256. Previously this was dependent on the number of nodes and old default number of shards (5).

In our benchmarks we see an increase of query latency for benchmarks which explicitly set the number of shards to 5 (e.g. geonames or geopoints). For example, the 50th percentile latency for the polygon query in geopoints has increased from 59 ms to 153 ms. Similary, for the painless_static query in geonames the 50th percentile service time has increased from 504 ms to 1488 ms (the system is completely saturated in the latter case and it makes no sense to look at latency that's why I mentioned service time here).

Steps to reproduce:

The problem can be reproduced with the following Rally benchmarks:

# state after PR 30783
esrally --revision=d7040ad7b41 --track="geonames" --include-tasks="create-index,index-append,force-merge,painless_static"
# manually revert https://github.com/elastic/elasticsearch/pull/30783 
cd $(awk -F " = " '$1~/^src\.root\.dir/ {print $2}' ~/.rally/rally.ini)/elasticsearch
git revert 2984734197223003dc80ed1ac4e8366f8d49ed1c
# state before (i.e. d7040ad7b41 without 29847341972)
esrally --revision=current --track="geonames" --include-tasks="create-index,index-append,force-merge,painless_static"
# reset your local state again!
git reset --hard origin/master

Unfortunately you have to manually revert the work introduced in #30783 because we had yet another regression in between that caused Elasticsearch to OOM (which was fixed by #30820).

@danielmitterdorfer danielmitterdorfer added >non-issue :Data Management/Indices APIs APIs to create and manage indices and templates v7.0.0 labels May 31, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@GlenRSmith
Copy link
Contributor

subscribe

s1monw added a commit to s1monw/elasticsearch that referenced this issue Jun 7, 2018
We moved to 1 shard by default which caused some issues in how many
concurrent shard requests we allow by default. For instance searching
a 5 shard index on a single node will now be executed serially per shard
while we want these cases to have a good concurrency out of the box. This
change moves to defaults based on the avg. number of shards per index in
the current search request to provide a good out of the box concurrency.

Relates to elastic#30783
Closes elastic#30994
s1monw added a commit that referenced this issue Jun 8, 2018
We moved to 1 shard by default which caused some issues in how many
concurrent shard requests we allow by default. For instance searching
a 5 shard index on a single node will now be executed serially per shard
while we want these cases to have a good concurrency out of the box. This
change moves to `numNodes * 5` which corresponds to the default we used to 
have in the previous version.

Relates to #30783
Closes #30994
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >non-issue v7.0.0-beta1
Projects
None yet
Development

No branches or pull requests

4 participants