# Offloading Indexing CPU load

**URL:** https://discuss.elastic.co/t/offloading-indexing-cpu-load/23181
**Category:** Elasticsearch
**Created:** [April 10, 2015, 5:56am UTC](https://discuss.elastic.co/t/offloading-indexing-cpu-load/23181 "2015-04-10T05:56:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Debayan\_Banerjee](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Debayan\_Banerjee](https://discuss.elastic.co/u/Debayan_Banerjee)
#### Post date: [April 10, 2015, 5:56am UTC](https://discuss.elastic.co/t/offloading-indexing-cpu-load/23181/1 "2015-04-10T05:56:50Z")

</div>

Hi,

We have an ES cluster setup with 5 nodes. There is one index divided into 5  
shards, and each shard has 4 replicas. Hence all 5 nodes have 5 shards  
each, and all of them have the whole index.

From what I have seen, indexing is a CPU intensive operation. I would like  
the indexing to happen only one machine (which I would not include behind  
my production load balancer to serve read queries) and then the replication  
of indices to happen to the other machines.

Is this possible? Can I limit indexing to just one machine and specify  
which machine that should be?

--

Debayan Banerjee  
devOps engineer

--  
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/CAOvawCs\_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [April 10, 2015, 6:31am UTC](https://discuss.elastic.co/t/offloading-indexing-cpu-load/23181/2 "2015-04-10T06:31:45Z")

</div>

You need to have all the primaries on the same node for this to happen.  
I'd suggest you reduce your replica count as that will be adding overhead  
to things, even though replicas are handled in parallel, you have an  
excessive amount of them.

On 10 April 2015 at 15:56, Debayan Banerjee [debayan.banerjee@paytm.com](mailto:debayan.banerjee@paytm.com)  
wrote:

> Hi,
> 
> We have an ES cluster setup with 5 nodes. There is one index divided into  
> 5 shards, and each shard has 4 replicas. Hence all 5 nodes have 5 shards  
> each, and all of them have the whole index.
> 
> From what I have seen, indexing is a CPU intensive operation. I would like  
> the indexing to happen only one machine (which I would not include behind  
> my production load balancer to serve read queries) and then the replication  
> of indices to happen to the other machines.
> 
> Is this possible? Can I limit indexing to just one machine and specify  
> which machine that should be?
> 
> --
> 
> Debayan Banerjee  
> devOps engineer
> 
> --  
> 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/CAOvawCs\_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAOvawCs\_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> 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/CAEYi1X9X%2BNhmNHifsSh15mYrkmQ4XLCQZ%2Btn\_-n3yeTExbJLxA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9X%2BNhmNHifsSh15mYrkmQ4XLCQZ%2Btn_-n3yeTExbJLxA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Debayan\_Banerjee](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Debayan\_Banerjee](https://discuss.elastic.co/u/Debayan_Banerjee)
#### Post date: [April 10, 2015, 6:37am UTC](https://discuss.elastic.co/t/offloading-indexing-cpu-load/23181/3 "2015-04-10T06:37:45Z")

</div>

HI Mark,

Is there a way to have all primaries on one machine?

As for having too many replicas, I currently have a setup where all read  
queries can be served by any machine, without having to go to any other  
machine to look for missing shards. My index size is 4 GB and stays in RAM.  
My data size on disk is 1.1 GB. Do you still recommend reducing replicas?  
Would that not add the overhead of read queries needing to wait for network  
IO to fetch records from other machines from time to time?

On Fri, Apr 10, 2015 at 12:01 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:

> You need to have all the primaries on the same node for this to happen.  
> I'd suggest you reduce your replica count as that will be adding overhead  
> to things, even though replicas are handled in parallel, you have an  
> excessive amount of them.
> 
> On 10 April 2015 at 15:56, Debayan Banerjee [debayan.banerjee@paytm.com](mailto:debayan.banerjee@paytm.com)  
> wrote:
> 
> > Hi,
> > 
> > We have an ES cluster setup with 5 nodes. There is one index divided into  
> > 5 shards, and each shard has 4 replicas. Hence all 5 nodes have 5 shards  
> > each, and all of them have the whole index.
> > 
> > From what I have seen, indexing is a CPU intensive operation. I would  
> > like the indexing to happen only one machine (which I would not include  
> > behind my production load balancer to serve read queries) and then the  
> > replication of indices to happen to the other machines.
> > 
> > Is this possible? Can I limit indexing to just one machine and specify  
> > which machine that should be?
> > 
> > --
> > 
> > Debayan Banerjee  
> > devOps engineer
> > 
> > --  
> > 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/CAOvawCs\_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAOvawCs\_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOvawCs_E%2BwYUU-o1FMAFKsBckgh1eV%2BsA0Av1af4zJjwy8HXg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > 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/CAEYi1X9X%2BNhmNHifsSh15mYrkmQ4XLCQZ%2Btn\_-n3yeTExbJLxA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9X%2BNhmNHifsSh15mYrkmQ4XLCQZ%2Btn_-n3yeTExbJLxA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9X%2BNhmNHifsSh15mYrkmQ4XLCQZ%2Btn\_-n3yeTExbJLxA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9X%2BNhmNHifsSh15mYrkmQ4XLCQZ%2Btn_-n3yeTExbJLxA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--

Debayan Banerjee  
devOps engineer  
+91 8800846550

--  
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/CAOvawCvA%2BpG2FOFo%2BH9sddj22Or7UQft\_nq8QHyPPvYAfDYURg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOvawCvA%2BpG2FOFo%2BH9sddj22Or7UQft_nq8QHyPPvYAfDYURg%40mail.gmail.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, 12:20am UTC](https://discuss.elastic.co/t/offloading-indexing-cpu-load/23181/4 "2017-07-06T00:20:28Z")

</div>


