# Scaling ES indexing CPU usage

**URL:** https://discuss.elastic.co/t/scaling-es-indexing-cpu-usage/39979
**Category:** Elasticsearch
**Created:** [January 24, 2016, 9:40pm UTC](https://discuss.elastic.co/t/scaling-es-indexing-cpu-usage/39979 "2016-01-24T21:40:37Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![shaharmor](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@shaharmor](https://discuss.elastic.co/u/shaharmor)
#### Post date: [January 24, 2016, 9:40pm UTC](https://discuss.elastic.co/t/scaling-es-indexing-cpu-usage/39979/1 "2016-01-24T21:40:37Z")

</div>

Hey,

Is it possible to start ES servers that will help with indexing regarding CPU usage? And maybe just send the indexed data back to the server that is actually holding the shard itself?

Or if i try that it will just forward the request to the other server?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 24, 2016, 9:46pm UTC](https://discuss.elastic.co/t/scaling-es-indexing-cpu-usage/39979/2 "2016-01-24T21:46:42Z")

</div>

Data is sent to the node that has the appropriate shard.  
The only way around this is to use hot/cold architecture, like so [https://www.elastic.co/blog/hot-warm-architecture](https://www.elastic.co/blog/hot-warm-architecture)

---

<div class="post-metadata">

### Author: ![shaharmor](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@shaharmor](https://discuss.elastic.co/u/shaharmor)
#### Post date: [January 24, 2016, 9:58pm UTC](https://discuss.elastic.co/t/scaling-es-indexing-cpu-usage/39979/3 "2016-01-24T21:58:54Z")

</div>

yeah thats what we're doing now but its not fast enough

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 24, 2016, 10:12pm UTC](https://discuss.elastic.co/t/scaling-es-indexing-cpu-usage/39979/4 "2016-01-24T22:12:51Z")

</div>

Then add more resources.

---

<div class="post-metadata">

### Author: ![klahnakoski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/klahnakoski/32/3679_2.png) [@klahnakoski](https://discuss.elastic.co/u/klahnakoski)
#### Post date: [January 25, 2016, 12:13am UTC](https://discuss.elastic.co/t/scaling-es-indexing-cpu-usage/39979/5 "2016-01-25T00:13:32Z")

</div>

It is my limited experience that the node with the primary shard does the cpu-intensive indexing work for that shard; the node with the most primary shards has the most CPU usage while indexing. Getting the primary shards to distribute evenly among all your machines is a challenge. I do use the hot/cold architecture: Specifically, my master nodes have no data. I only wish I did not have to learn it the hard way.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 25, 2016, 12:17am UTC](https://discuss.elastic.co/t/scaling-es-indexing-cpu-usage/39979/6 "2016-01-25T00:17:28Z")

</div>

> [@klahnakoski](#):
>
> the node with the most primary shards has the most CPU usage while indexing

Depends, do you have replicas? Because a replica does the same amount of work as a primary.

---

<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, 11:22pm UTC](https://discuss.elastic.co/t/scaling-es-indexing-cpu-usage/39979/7 "2017-07-05T23:22:02Z")

</div>


