# Would turning off swap require extra configuration

**URL:** <https://discuss.elastic.co/t/would-turning-off-swap-require-extra-configuration/323342>\
**Category:** Elasticsearch\
**Created:** [January 17, 2023, 3:47pm UTC](https://discuss.elastic.co/t/would-turning-off-swap-require-extra-configuration/323342 "2023-01-17T15:47:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hasancansaral](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hasancansaral/32/10024_2.png) [@hasancansaral](https://discuss.elastic.co/u/hasancansaral)\
**Post date:** [January 17, 2023, 3:47pm UTC](https://discuss.elastic.co/t/would-turning-off-swap-require-extra-configuration/323342/1 "2023-01-17T15:47:44Z")

</div>

I have a 3 node cluster, all master eligible and all having 4 cores, 16gb memory. I have 2 read/write indexes with none of them above 1 GB/1 million documents. Each index is 1 primary shard and 2 replicas.

I've recently noticed that 2 nodes were swapping. I turned on swap permanently and performed a rolling restart. All my indices and cluster have green health now.

1. Do I have to change anything (regarding heap size, etc.) or would Elasticsearch calculate a new heap size after the `swapoff`? Current memory usage is around 9GB per node at the moment.
2. During rolling restart of the cluster, I noticed a change in `docs.deleted`. I assume that this is related to shards relocating, and nothing to be worried about. Am I correct?

A little related final question;  
3. When the `docs.deleted` go above 50% of the number of documents in index, I see it reset. (I do not perform a \_forcemerge or expunge deletes for that matter. This is the expected behaviour right?

Thanks.

---

<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 18, 2023, 12:53am UTC](https://discuss.elastic.co/t/would-turning-off-swap-require-extra-configuration/323342/2 "2023-01-18T00:53:35Z")

</div>

Welcome to our community! 😃

1. Nope, nothing changes after you do this.
2. Nope, that would be either updates or someone deleting docs.
3. It's likely to be a merge

---

<div class="post-metadata">

**Author:** ![hasancansaral](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hasancansaral/32/10024_2.png) [@hasancansaral](https://discuss.elastic.co/u/hasancansaral)\
**Post date:** [January 19, 2023, 10:46am UTC](https://discuss.elastic.co/t/would-turning-off-swap-require-extra-configuration/323342/3 "2023-01-19T10:46:43Z")

</div>

Hi Mark, thank you for your reply. All is good now.

---

<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:** [February 16, 2023, 10:47am UTC](https://discuss.elastic.co/t/would-turning-off-swap-require-extra-configuration/323342/4 "2023-02-16T10:47:25Z")

</div>

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