# Designing elasitcsearch node spec - CPU cores

**URL:** <https://discuss.elastic.co/t/designing-elasitcsearch-node-spec-cpu-cores/174453>\
**Category:** Elasticsearch\
**Created:** [March 29, 2019, 1:54am UTC](https://discuss.elastic.co/t/designing-elasitcsearch-node-spec-cpu-cores/174453 "2019-03-29T01:54:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zidane28](https://avatars.discourse-cdn.com/v4/letter/z/edb3f5/32.png) [@zidane28](https://discuss.elastic.co/u/zidane28)\
**Post date:** [March 29, 2019, 1:54am UTC](https://discuss.elastic.co/t/designing-elasitcsearch-node-spec-cpu-cores/174453/1 "2019-03-29T01:54:20Z")

</div>

I not so sure whether this kind of question had been asked before, but I'm having problem on deciding how many cores should I put for my data nodes.

I somehow know how many RAM or disk space I should assign, but for CPU cores, I not entirely sure.

Is the more better? Or even 4 cores should be enough for a typical data nodes?

What are the factors I should look at in determining how many CPU cores needed in data nodes?

Does the amount of CPU cores will affect concurrently how many search request can a data node work on?

Thank you!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 29, 2019, 5:56am UTC](https://discuss.elastic.co/t/designing-elasitcsearch-node-spec-cpu-cores/174453/2 "2019-03-29T05:56:28Z")

</div>

This depends a lot on the use case but also what type of storage you have and what load you expect the cluster to be under. To get an answer I therefore think you need to provide more details or run some tests.

---

<div class="post-metadata">

**Author:** ![zidane28](https://avatars.discourse-cdn.com/v4/letter/z/edb3f5/32.png) [@zidane28](https://discuss.elastic.co/u/zidane28)\
**Post date:** [March 29, 2019, 6:22am UTC](https://discuss.elastic.co/t/designing-elasitcsearch-node-spec-cpu-cores/174453/3 "2019-03-29T06:22:29Z")

</div>

Let's say they are 2 use case here:

1. Map index, around 5 mil docs, concurrent users expected around 30 users, non-heavy search.

2. Huge index, perhaps more than 10mil of docs, will be used for data processing hence search request will keep on hitting the nodes, encounter search queue exceed kind of error before.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 29, 2019, 6:32am UTC](https://discuss.elastic.co/t/designing-elasitcsearch-node-spec-cpu-cores/174453/4 "2019-03-29T06:32:20Z")

</div>

That is not nearly enough information. The size of the data set, type of data and queries have an impact, as does the query and indexing load and latency requirements.

Ideally you want a well-balanced node. There is little point in having lots of CPU if you have slow storage and this limits how fast you can retrieve data to process. If you on the other hand have a small data set that can be cached, you may get limited by CPU even if you have slow storage as disk I/O will be infrequent.

I would recommend running a test to see how much CPU your use case uses or is able to use and make sure that you have at least that amount ton ensure CPU is not a bottleneck.

---

<div class="post-metadata">

**Author:** ![zidane28](https://avatars.discourse-cdn.com/v4/letter/z/edb3f5/32.png) [@zidane28](https://discuss.elastic.co/u/zidane28)\
**Post date:** [March 29, 2019, 6:54am UTC](https://discuss.elastic.co/t/designing-elasitcsearch-node-spec-cpu-cores/174453/5 "2019-03-29T06:54:54Z")

</div>

Storage wise, the nodes will be hosted on virtual machine environment, so I think IO will be if-not-same-as-HDD-speed-then-is-slower-than kinda speed.

So does it mean more CPU won't help at all if I/O not good enough?

> [@Christian\_Dahlqvist](#):
>
> The size of the data set, type of data and queries have an impact, as does the query and indexing load and latency requirements.

So is the above the factors you need to look at when determining # of CPU cores?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 29, 2019, 6:57am UTC](https://discuss.elastic.co/t/designing-elasitcsearch-node-spec-cpu-cores/174453/6 "2019-03-29T06:57:06Z")

</div>

It is hard to predict, so I would always recommend running a test or benchmark.

---

<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:** [April 26, 2019, 7:05am UTC](https://discuss.elastic.co/t/designing-elasitcsearch-node-spec-cpu-cores/174453/7 "2019-04-26T07:05:43Z")

</div>

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