# Use of bootstrap.memory\_lock

**URL:** <https://discuss.elastic.co/t/use-of-bootstrap-memory-lock/368236>\
**Category:** Elasticsearch\
**Created:** [October 4, 2024, 7:03am UTC](https://discuss.elastic.co/t/use-of-bootstrap-memory-lock/368236 "2024-10-04T07:03:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Debasis\_Mallick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debasis_mallick/32/123723_2.png) [@Debasis\_Mallick](https://discuss.elastic.co/u/Debasis_Mallick)\
**Post date:** [October 4, 2024, 7:03am UTC](https://discuss.elastic.co/t/use-of-bootstrap-memory-lock/368236/1 "2024-10-04T07:03:50Z")

</div>

Hi Team,

What is the use of the parameter in elasticsearch.yml file `bootstrap.memory_lock` and how it impacts the performance of elastic cluster. Is it related JVM heap memory.

Please help me to understand.

Thanks,  
Debasis

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [October 4, 2024, 8:22am UTC](https://discuss.elastic.co/t/use-of-bootstrap-memory-lock/368236/2 "2024-10-04T08:22:13Z")

</div>

See these docs:

> **[Disable swapping | Elasticsearch Guide \[8.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html)**

TLDR we recommend you do not set `bootstrap.memory_lock` and instead just disable all swapping.

---

<div class="post-metadata">

**Author:** ![Debasis\_Mallick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debasis_mallick/32/123723_2.png) [@Debasis\_Mallick](https://discuss.elastic.co/u/Debasis_Mallick)\
**Post date:** [October 4, 2024, 9:03am UTC](https://discuss.elastic.co/t/use-of-bootstrap-memory-lock/368236/3 "2024-10-04T09:03:10Z")

</div>

Thanks. As per the thread , we need to set the `bootstrap.memory_lock: true` but in our environment once we updated the yml file the service get failed. So not able to digest the relation between JVM and the above parameter. Could you please help me to understand this parameter.

> try to lock the process address space into RAM, preventing any Elasticsearch heap memory from being swapped out.

Thanks,  
Debasis
