# Query response time does NOT improve by adding additional nodes

**URL:** <https://discuss.elastic.co/t/query-response-time-does-not-improve-by-adding-additional-nodes/16557>\
**Category:** Elasticsearch\
**Created:** [March 24, 2014, 8:54am UTC](https://discuss.elastic.co/t/query-response-time-does-not-improve-by-adding-additional-nodes/16557 "2014-03-24T08:54:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Herbert\_Bodner](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@Herbert\_Bodner](https://discuss.elastic.co/u/Herbert_Bodner)\
**Post date:** [March 24, 2014, 8:54am UTC](https://discuss.elastic.co/t/query-response-time-does-not-improve-by-adding-additional-nodes/16557/1 "2014-03-24T08:54:32Z")

</div>

For my thesis I am going to test the scalability/performance of the  
Elasticsearch cluster depending on the number of nodes.

I have a physical server (with 8 cores, 30 GB memory) and on that physical  
server I create\* 4 virtual machines\*, each assigned with 2 cores and 4GB of  
memory.  
On each virtual machine I install Elasticsearch, therefore each machine  
represents a separate node in my Elasticsearch cluster.  
The data contains\* about 7 million documents\*, I have\* 5 shards and  
replication\_count=1 (default configuration)\*.  
I am executing a set of tests on the cluster with different  
cluster-configurations. At first I assign only 1 node to the cluster and  
execute the tests, then I assign 2 nodes to the cluster and execute the  
same tests again, then 3 nodes etc.  
The tests do not contain any fancy features (no facets, highlighting, etc),  
but only filters and queries.

I expected that for each additional node in the cluster I would get a  
linear improvement of the query response time. Because each node contains a  
bit of the data (shard) and so the query could be executed on each shard at  
the same time.  
But it turns out that the response time of the query is not improving nor  
is it getting worse, _it almost stays the same_....

So my question:  
Are these results expected, that _the query response time does NOT improve  
when adding an additional node?_

I execute the test queries one after another and not in parallel. Is  
Elasticsearch made just to handle a high load of requests, but not for  
improving the query time of a single request when I add additional nodes to  
the cluster?  
I mean, would I see only an improvement for each additional node, when I  
would run the tests in _parallel_, because then the query load is  
distributed?

Regards,  
Herbert

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5d210ab6-08c0-4512-a6ee-fff677ae7207%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5d210ab6-08c0-4512-a6ee-fff677ae7207%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 24, 2014, 2:33pm UTC](https://discuss.elastic.co/t/query-response-time-does-not-improve-by-adding-additional-nodes/16557/2 "2014-03-24T14:33:31Z")

</div>

For better results

- you should align the number of nodes n with the shard count c, so that  
c/n = i where i is an integer
- 7 million docs may be too few to see any effect, this depends on the node  
capacity
- for higher perfomance, you should use one JVM per machine, not 4 virtual  
machines on one machine

The query response time will not get faster by adding nodes. The query  
response time on a single shard is limited by hardware factors (like CPU  
power, RAM, disk speed) and some software settings (ES settings, ES  
caches).

The query response time will scale over nodes, that is, if you have  
saturated one node, you can add more nodes, start over to add more docs,  
while the query response time will not get higher by the number of added  
docs. The reason is, ES submits the queries to the shards on the nodes in  
parallel, so it makes no difference if there is one or thousands nodes in  
the cluster.

Of course you should run query tests in parallel, if you want to measure  
the cluster capacity / throughput.

Jörg

On Mon, Mar 24, 2014 at 9:54 AM, Herbert Bodner [herbert.bodner@gmail.com](mailto:herbert.bodner@gmail.com)wrote:

> Are these results expected, that _the query response time does NOT  
> improve when adding an additional node?_

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGaMyKWYGkPnn8wo\_kzm4W%2BoSv62bNQNU0G2Dws9pK1hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGaMyKWYGkPnn8wo_kzm4W%2BoSv62bNQNU0G2Dws9pK1hg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Herbert\_Bodner](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@Herbert\_Bodner](https://discuss.elastic.co/u/Herbert_Bodner)\
**Post date:** [March 26, 2014, 5:08pm UTC](https://discuss.elastic.co/t/query-response-time-does-not-improve-by-adding-additional-nodes/16557/3 "2014-03-26T17:08:11Z")

</div>

thanks Jörg for your response.  
I guess the bottleneck is the I/O (as you suggested).  
So it does not matter if I add additional memory or CPU power to the  
Elasticsearch cluster (with adding additional virtual machines), because  
all nodes run on the same physical server with limited I/O capacity. If one  
node already uses the whole I/O capacity, then adding additional nodes (on  
the same physical server) does not help.

cheers

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c717f35d-8ecc-4f57-a175-225b166c9aed%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c717f35d-8ecc-4f57-a175-225b166c9aed%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:40am UTC](https://discuss.elastic.co/t/query-response-time-does-not-improve-by-adding-additional-nodes/16557/4 "2017-07-06T01:40:29Z")

</div>


