# Swap usage on Elastic Search Node

**URL:** <https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984>\
**Category:** Elasticsearch\
**Created:** [June 26, 2016, 9:06pm UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984 "2016-06-26T21:06:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravitandur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravitandur/32/4568_2.png) [@ravitandur](https://discuss.elastic.co/u/ravitandur)\
**Post date:** [June 26, 2016, 9:06pm UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984/1 "2016-06-26T21:06:25Z")

</div>

ES Version : 1.7  
Java Version : 1.7.0\_45-b18  
Os : Linux 2.6.18-406.el5 #1 SMP Wed Jun 3 05:51:45 EDT 2015 x86\_64 x86\_64 x86\_64 GNU/Linux

ES Cluster : 5 Nodes  
300 millions documents per day  
3 billion documents in cluster.

I am running this cluster from some time [few months] in production and observing swap is getting used fully on production ES nodes.  
Node configuration : 16GB RAM and 8 CPUs.  
Xmx and Xms set to 8GB.  
vm.swappiness = 0 in /etc/sysctl.conf  
Only ES process running on the node  
I tried to identify what is causing swap memory to use completely. but not able to identify the root cause.  
Can some one please help me to identify the root cause for why swap is getting used on ES nodes?  
If you need any further information please let me know.

---

<div class="post-metadata">

**Author:** ![ravitandur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravitandur/32/4568_2.png) [@ravitandur](https://discuss.elastic.co/u/ravitandur)\
**Post date:** [June 27, 2016, 6:35am UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984/2 "2016-06-27T06:35:02Z")

</div>

Can any one please help me to identify the root cause for the swap issue?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 27, 2016, 6:53am UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984/3 "2016-06-27T06:53:33Z")

</div>

Please be patient when waiting for an answer to your questions. This is a community forum and as such it may take some time before someone replies to your question. Not everyone on the forum is an expert in every area so you may need to wait for someone who knows about the area you are asking about to come online and have the time to look into your problem.

Please see [https://www.elastic.co/community/codeofconduct](https://www.elastic.co/community/codeofconduct) for more details on our code of conduct (in particular the "be patient" section).

There are no SLAs on responses to questions posted on this forum, if you require help with an SLA on responses you should look into purchasing a subscription package that includes support with an SLA such as those offered by Elastic: [https://www.elastic.co/subscriptions](https://www.elastic.co/subscriptions)

---

<div class="post-metadata">

**Author:** ![ravitandur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravitandur/32/4568_2.png) [@ravitandur](https://discuss.elastic.co/u/ravitandur)\
**Post date:** [June 27, 2016, 7:07am UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984/4 "2016-06-27T07:07:06Z")

</div>

Ok, I will wait.  
Thank you.

---

<div class="post-metadata">

**Author:** ![ravitandur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravitandur/32/4568_2.png) [@ravitandur](https://discuss.elastic.co/u/ravitandur)\
**Post date:** [June 28, 2016, 5:59am UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984/5 "2016-06-28T05:59:40Z")

</div>

Does any one facing the same issue?

---

<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:** [June 28, 2016, 6:02am UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984/6 "2016-06-28T06:02:46Z")

</div>

Did you try disabling swap altogether? Or setting `bootstrap.mlockall`?

---

<div class="post-metadata">

**Author:** ![ravitandur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravitandur/32/4568_2.png) [@ravitandur](https://discuss.elastic.co/u/ravitandur)\
**Post date:** [June 28, 2016, 6:06am UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984/7 "2016-06-28T06:06:11Z")

</div>

I disabled the swaping at OS level [vm.swappiness = 0] and also enabled bootstrap.mockall. But still swap is getting used.

---

<div class="post-metadata">

**Author:** ![ravitandur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravitandur/32/4568_2.png) [@ravitandur](https://discuss.elastic.co/u/ravitandur)\
**Post date:** [June 29, 2016, 8:08am UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984/8 "2016-06-29T08:08:20Z")

</div>

Does any one facing the same issue?  
As such, my cluster is running properly, all response timings are within limits.  
Just I want to understand, what causes to use the swap even after disabling the swapping at OS level.

---

<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, 10:39pm UTC](https://discuss.elastic.co/t/swap-usage-on-elastic-search-node/53984/9 "2017-07-05T22:39:42Z")

</div>


