# What is elastic search bounded by? Is it cpu, memory etc

**URL:** https://discuss.elastic.co/t/what-is-elastic-search-bounded-by-is-it-cpu-memory-etc/21029
**Category:** Elasticsearch
**Created:** [December 2, 2014, 12:06pm UTC](https://discuss.elastic.co/t/what-is-elastic-search-bounded-by-is-it-cpu-memory-etc/21029 "2014-12-02T12:06:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rmadd](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@rmadd](https://discuss.elastic.co/u/rmadd)
#### Post date: [December 2, 2014, 12:06pm UTC](https://discuss.elastic.co/t/what-is-elastic-search-bounded-by-is-it-cpu-memory-etc/21029/1 "2014-12-02T12:06:57Z")

</div>

I am running elastic search in my personal box.

Memory: 6GB  
Processor: Intel® Core™ i3-3120M CPU @ 2.50GHz × 4  
OS: Ubuntu 12.04 - 64-bit

**ElasticSearch** Settings: Only running locally  
Version : 1.2.2  
ES\_MIN\_MEM=3g  
ES\_MAX\_MEM=3g  
threadpool.bulk.queue\_size: 3000  
indices.fielddata.cache.size: 25%  
http.compression: true  
bootstrap.mlockall: true  
script.disable\_dynamic: true  
cluster.name: elasticsearch  
**index size: 252MB**

**Scenario** : I am trying to test the performance of my bulk queries/aggregations. The test case is to run asynchronous http requests to node.js which in turn will call elastic search. The tests are running from a Java method. Started with 50 requests at a time. Each request is divided and parallized in to two asynchronous(async.parallel) bulk queries in node.js. I am using [node-elasticsearch](https://www.npmjs.org/package/elasticsearch) api (uses elasticsearch 1.3 api). The two bulk queries contain 13 and 10 queries respectively.And the two are asynchronously sent to elastic search from node.js. When the Elastic Search returns, the query results are combined and sent back to the test case.  
[ElasticSearch Mapping](http://gist.github.com/anonymous/0de244ae57db2c08e5fe),  
[ElasticSeach Sample Record](http://gist.github.com/anonymous/23214658ba2eec96540f),  
[ElasticSearch First Bulk Query](http://gist.github.com/anonymous/391b510dfc9467158a8b),  
[ElasticSearch Second Bulk Query](http://gist.github.com/anonymous/e1bcba83fcf564a8ff39)

The two bulk queries are run in parallel. I am sending 50 concurrent requests from a Java test case to NodeJs. In NodeJs, each request is divided in to the above two bulk requests and ran in parallel. The response from these two are combined and sent back to the test case. The time taken for all 50 is 30 secs. And single request is taking 1.4 seconds.

**Observations** : I see that all the cpu cores are utilized 100%. Memory is utilized around 90%. The response time for all 50 requests combined is 30 seconds. If I run just the single queries each alone, in the bulk queries, each are returning in less than 100 milli-seconds. Node.js is taking negligible time to forward requests to elastic search and combine responses from elastic search. Even if run the test case synchronously from java, the response time does not change. I may say that elastic search is not doing parallel processing. Is this because I am CPU or memory bound? **One more observation: if I change heap size for elastic search from 1 - 3GB, the response time does not change.**

**Also I am pasting top command output:**

top - 18:04:12 up 4:29, 5 users, load average: 5.93, 5.16, 4.15  
Tasks: 224 total, 3 running, 221 sleeping, 0 stopped, 0 zombie  
Cpu(s): 98.2%us, 1.0%sy, 0.0%ni, 0.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st  
Mem: 5955796k total, 5801920k used, 153876k free, 1548k buffers  
Swap: 6133756k total, 708336k used, 5425420k free, 460436k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND  
17410 root 20 0 7495m 3.3g 27m S 366 58.6 5:09.57 java  
15356 rmadd 20 0 1015m 125m 3636 S 19 2.2 1:14.03 node

**Questions** : Is this expected, because I am running Elastic Search in my local machine and not in a cluster? Can I improve my performance in my local machine? I would definitely start a cluster. But I want to know, how to improve the performance scalably. What is it that the elastic search is bound to?

I am not able to find this in forums. And am sure this would help others. Thanks for your help.

---

<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: [December 4, 2014, 1:03pm UTC](https://discuss.elastic.co/t/what-is-elastic-search-bounded-by-is-it-cpu-memory-etc/21029/2 "2014-12-04T13:03:26Z")

</div>

Why do you set bulk indexing queue size to 3000?

Why do you limit field data cache to 25%?

What documents are in the index?

How do your queries look like?

Jörg

On Tue, Dec 2, 2014 at 1:06 PM, rmadd [rmadd9@gmail.com](mailto:rmadd9@gmail.com) wrote:

> I am running Elasticsearch in my personal box.
> 
> Memory: 6GB  
> Processor: Intel® Core™ i3-3120M CPU @ 2.50GHz × 4  
> OS: Ubuntu 12.04 - 64-bit
> 
> _Elasticsearch_ Settings: Only running locally  
> Version : 1.2.2  
> ES\_MIN\_MEM=3g  
> ES\_MAX\_MEM=3g  
> threadpool.bulk.queue\_size: 3000  
> indices.fielddata.cache.size: 25%  
> http.compression: true  
> bootstrap.mlockall: true  
> script.disable\_dynamic: true  
> cluster.name: elasticsearch
> 
> _Scenario_: I am trying to test the performance of my bulk  
> queries/aggregations. The test case is to run asynchronous http requests to  
> node.js which in turn will call Elasticsearch. The tests are running from  
> a  
> Java method. Started with 50 requests at a time. Each request is divided  
> and  
> parallized in to two asynchronous(async.parallel) bulk queries in node.js.  
> I  
> am using node-elasticsearch [https://www.npmjs.org/package/elasticsearch](https://www.npmjs.org/package/elasticsearch)  
> api (uses elasticsearch 1.3 api). The two bulk queries contain 13 and 10  
> queries respectively.And the two are asynchronously sent to Elasticsearch  
> from node.js. When the Elastic Search returns, the query results are  
> combined and sent back to the test case.
> 
> _Observations_: I see that all the cpu cores are utilized 100%. Memory is  
> utilized around 90%. The response time for all 50 requests combined is 30  
> seconds. If I run just the single queries each alone, in the bulk queries,  
> each are returning in less than 100 milli-seconds. Node.js is taking  
> negligible time to forward requests to Elasticsearch and combine responses  
> from Elasticsearch. Even if run the test case synchronously from java, the  
> response time does not change. I may say that Elasticsearch is not doing  
> parallel processing. Is this because I am CPU or memory bound?
> 
> _Questions_: Is this expected, because I am running Elastic Search in my  
> local machine and not in a cluster? Can I improve my performance in my  
> local  
> machine? I would definitely start a cluster. But I want to know, how to  
> improve the performance scalably. What is it that the Elasticsearch is  
> bound to?
> 
> I am not able to find this in forums. And am sure this would help others.  
> Thanks for your help.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/What-is-elastic-search-bounded-by-Is-it-cpu-memory-etc-tp4067016.html](http://elasticsearch-users.115913.n3.nabble.com/What-is-elastic-search-bounded-by-Is-it-cpu-memory-etc-tp4067016.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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/1417522017795-4067016.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1417522017795-4067016.post%40n3.nabble.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoG2yVtE1LrmRg5XDU5ZfLbU6z7ztcX\_o3nLPbkhZBgY6A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoG2yVtE1LrmRg5XDU5ZfLbU6z7ztcX_o3nLPbkhZBgY6A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![rmadd](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@rmadd](https://discuss.elastic.co/u/rmadd)
#### Post date: [December 4, 2014, 5:32pm UTC](https://discuss.elastic.co/t/what-is-elastic-search-bounded-by-is-it-cpu-memory-etc/21029/3 "2014-12-04T17:32:12Z")

</div>

I updated the post with more details. I added the gist urls. And I was playing with settings to see the behavior in general. I removed the field data cache and queue size. Please let me know, if you want more details.  
[jstack thread dump](https://gist.github.com/anonymous/562614d4faa75f3f269c)

---

<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, 12:45am UTC](https://discuss.elastic.co/t/what-is-elastic-search-bounded-by-is-it-cpu-memory-etc/21029/4 "2017-07-06T00:45:52Z")

</div>


