# Very slow performance after setting replicas

**URL:** <https://discuss.elastic.co/t/very-slow-performance-after-setting-replicas/7190>\
**Category:** Elasticsearch\
**Created:** [April 1, 2012, 11:22am UTC](https://discuss.elastic.co/t/very-slow-performance-after-setting-replicas/7190 "2012-04-01T11:22:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Aviram](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Ben\_Aviram](https://discuss.elastic.co/u/Ben_Aviram)\
**Post date:** [April 1, 2012, 11:22am UTC](https://discuss.elastic.co/t/very-slow-performance-after-setting-replicas/7190/1 "2012-04-01T11:22:46Z")

</div>

Hi all,  
I have a cluster of 4 ec2 nodes with 4 cores and 35gb ram each.

The cluster worked pretty good(with 0 replicas), until I changed all  
indexes to have 1 replica, then everything became terribly slow.

The cluster size is about 300gb(with replica 600).

Does adding replicas cripple performance by that much?  
I imagined it would actually be beneficial to  
search performance, because more nodes can serve the same data(slower  
indexing though, makes sense).

Thanks,  
Ben

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [April 1, 2012, 3:25pm UTC](https://discuss.elastic.co/t/very-slow-performance-after-setting-replicas/7190/2 "2012-04-01T15:25:31Z")

</div>

By enabling replicas for all indices, you doubled the number of shards in  
your cluster. Each shard has memory overhead associated with it and  
maintains several caches. So, by doubling the number of shards, your  
doubled the amount of memory that these shards are using. It's possible  
that your cluster no longer has enough memory to properly allocate all  
caches that it used to have.

On Sunday, April 1, 2012 7:22:46 AM UTC-4, Ben Aviram wrote:

> Hi all,  
> I have a cluster of 4 ec2 nodes with 4 cores and 35gb ram each.
> 
> The cluster worked pretty good(with 0 replicas), until I changed all  
> indexes to have 1 replica, then everything became terribly slow.
> 
> The cluster size is about 300gb(with replica 600).
> 
> Does adding replicas cripple performance by that much?  
> I imagined it would actually be beneficial to  
> search performance, because more nodes can serve the same data(slower  
> indexing though, makes sense).
> 
> Thanks,  
> Ben

---

<div class="post-metadata">

**Author:** ![AEvar\_Arnfjord\_Bjarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aevar_arnfjord_bjarm/32/2746_2.png) [@AEvar\_Arnfjord\_Bjarm](https://discuss.elastic.co/u/AEvar_Arnfjord_Bjarm)\
**Post date:** [April 1, 2012, 10:37pm UTC](https://discuss.elastic.co/t/very-slow-performance-after-setting-replicas/7190/3 "2012-04-01T22:37:14Z")

</div>

On Sun, Apr 1, 2012 at 13:22, Ben Aviram [benaviram@gmail.com](mailto:benaviram@gmail.com) wrote:

> Does adding replicas cripple performance by that much?  
> I imagined it would actually be beneficial to  
> search performance, because more nodes can serve the same data(slower  
> indexing though, makes sense).

Your issue is most likely what Igor pointed out, but also indexing  
shouldn't slow down with replicas depending on your refresh settings.  
So if you're looking to add reliability you can also have fast  
indexing.

---

<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, 3:34am UTC](https://discuss.elastic.co/t/very-slow-performance-after-setting-replicas/7190/4 "2017-07-06T03:34:01Z")

</div>


