# ElasticSearch linear scaling problem

**URL:** <https://discuss.elastic.co/t/elasticsearch-linear-scaling-problem/49274>\
**Category:** Elasticsearch\
**Created:** [May 5, 2016, 9:50am UTC](https://discuss.elastic.co/t/elasticsearch-linear-scaling-problem/49274 "2016-05-05T09:50:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![edeak](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@edeak](https://discuss.elastic.co/u/edeak)\
**Post date:** [May 5, 2016, 9:50am UTC](https://discuss.elastic.co/t/elasticsearch-linear-scaling-problem/49274/1 "2016-05-05T09:50:01Z")

</div>

Hi guys,

I'm trying to figure out our basic scale unit based on this article: [https://www.elastic.co/guide/en/elasticsearch/guide/current/scale.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/scale.html)

Hardware is fix, and I use one primary shard without any replica.  
I measure the average response time with JMeter and my goal is to keep it around 500 ms for 50 parallel users.

The problem:

- for 20.000 documents response time is 500 ms
- for 100.000 documents response time is around 1 sec
- for 7 million documents response time is 1.5 sec

This **is not** a linear scaling and 20.000 documents seems a very low amount for my needs.  
Could you please help me, what can be the problem? How can I figure out my basic scale unit?

Thanks

---

<div class="post-metadata">

**Author:** ![ddorian43](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddorian43/32/36093_2.png) [@ddorian43](https://discuss.elastic.co/u/ddorian43)\
**Post date:** [May 5, 2016, 9:53am UTC](https://discuss.elastic.co/t/elasticsearch-linear-scaling-problem/49274/2 "2016-05-05T09:53:37Z")

</div>

Note, it depends on the type of query. Example: if your query is matching all documents, it will have to SCORE them all, which will be slow since there are alot of them.

So add the mapping, query, hardware, number of documents matched, query-profiling output.

---

<div class="post-metadata">

**Author:** ![edeak](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@edeak](https://discuss.elastic.co/u/edeak)\
**Post date:** [May 5, 2016, 10:09am UTC](https://discuss.elastic.co/t/elasticsearch-linear-scaling-problem/49274/3 "2016-05-05T10:09:01Z")

</div>

**Mapping:**

- hunspell analyzed fields (5, different length, some fields can be really really long)

**Hardware:** 4 CPU, 16 GB RAM, 40 GB HDD

**Query:**  
Queries are dynamically created by JMeter, it has two variable parameter:

- keywords (different number of keywords with different length)
- date parameter

An example query:

`{ "query": { "filtered": { "query": { "bool": { "should": ["multi_match": { "query": "KEYWORD1 KEYWORD2 KEYWORD3", "type": "most_fields", "fields": [ "field1", "field2", "field3", "field4", "field5"] } ] } }, "filter": { "range": { "createDate": { "gte": "2010-11-12 00:00:01", "lte": "2010-11-13 23:59:59", "format": "yyyy-MM-dd HH:mm:ss" }, "_cache": true } } } } }`

---

<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 5, 2017, 10:53pm UTC](https://discuss.elastic.co/t/elasticsearch-linear-scaling-problem/49274/4 "2017-07-05T22:53:48Z")

</div>


