# Confirming mlockall is working?

**URL:** <https://discuss.elastic.co/t/confirming-mlockall-is-working/4979>\
**Category:** Elasticsearch\
**Created:** [July 27, 2011, 4:46pm UTC](https://discuss.elastic.co/t/confirming-mlockall-is-working/4979 "2011-07-27T16:46:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [July 27, 2011, 4:46pm UTC](https://discuss.elastic.co/t/confirming-mlockall-is-working/4979/1 "2011-07-27T16:46:59Z")

</div>

Hey,  
I've noticed some request time spikes with 0.16.2 that I hadn't  
observed with 0.14.2. I know that mlockall was critical in ensuring  
that GC didn't have much hit on response times.

The docs state that:  
In order to see if this works or not, set the common.jna logging to  
DEBUG level. A solution to “Unknown mlockall error 0” can be to set  
ulimit -l unlimited.

I have set common.jna logging to DEBUG, but don't see any messages  
logged from this class. Is that a confirmation that mlockall is  
working or should I expect to see something indicating that it is  
working?

Thanks!  
Paul

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 27, 2011, 5:01pm UTC](https://discuss.elastic.co/t/confirming-mlockall-is-working/4979/2 "2011-07-27T17:01:24Z")

</div>

Yes, if you don't see anything in the lock, then it should be working.

On Wed, Jul 27, 2011 at 7:46 PM, ppearcy [ppearcy@gmail.com](mailto:ppearcy@gmail.com) wrote:

> Hey,  
> I've noticed some request time spikes with 0.16.2 that I hadn't  
> observed with 0.14.2. I know that mlockall was critical in ensuring  
> that GC didn't have much hit on response times.
> 
> The docs state that:  
> In order to see if this works or not, set the common.jna logging to  
> DEBUG level. A solution to “Unknown mlockall error 0” can be to set  
> ulimit -l unlimited.
> 
> I have set common.jna logging to DEBUG, but don't see any messages  
> logged from this class. Is that a confirmation that mlockall is  
> working or should I expect to see something indicating that it is  
> working?
> 
> Thanks!  
> Paul

---

<div class="post-metadata">

**Author:** ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)\
**Post date:** [August 1, 2011, 11:56am UTC](https://discuss.elastic.co/t/confirming-mlockall-is-working/4979/3 "2011-08-01T11:56:19Z")

</div>

Hi,

I had the same worries about whether my mlockall setting was actually  
set, would it be possible to put a positive message in the logs like  
"mlockall now working"?

Best Regards,

David.

On Jul 27, 6:01 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Yes, if you don't see anything in the lock, then it should be working.
> 
> On Wed, Jul 27, 2011 at 7:46 PM, ppearcy [ppea...@gmail.com](mailto:ppea...@gmail.com) wrote:
> 
> > Hey,  
> > I've noticed some request time spikes with 0.16.2 that I hadn't  
> > observed with 0.14.2. I know that mlockall was critical in ensuring  
> > that GC didn't have much hit on response times.
> 
> > The docs state that:  
> > In order to see if this works or not, set the common.jna logging to  
> > DEBUG level. A solution to “Unknown mlockall error 0” can be to set  
> > ulimit -l unlimited.
> 
> > I have set common.jna logging to DEBUG, but don't see any messages  
> > logged from this class. Is that a confirmation that mlockall is  
> > working or should I expect to see something indicating that it is  
> > working?
> 
> > Thanks!  
> > Paul

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [August 1, 2011, 8:55pm UTC](https://discuss.elastic.co/t/confirming-mlockall-is-working/4979/4 "2011-08-01T20:55:06Z")

</div>

Yes, I think it makes sense. Something like, if its explicitly set, then log  
a warn if its not working. Can you open an issue for it?

On Mon, Aug 1, 2011 at 2:56 PM, davrob2 [daviroberts@gmail.com](mailto:daviroberts@gmail.com) wrote:

> Hi,
> 
> I had the same worries about whether my mlockall setting was actually  
> set, would it be possible to put a positive message in the logs like  
> "mlockall now working"?
> 
> Best Regards,
> 
> David.
> 
> On Jul 27, 6:01 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > Yes, if you don't see anything in the lock, then it should be working.
> > 
> > On Wed, Jul 27, 2011 at 7:46 PM, ppearcy [ppea...@gmail.com](mailto:ppea...@gmail.com) wrote:
> > 
> > > Hey,  
> > > I've noticed some request time spikes with 0.16.2 that I hadn't  
> > > observed with 0.14.2. I know that mlockall was critical in ensuring  
> > > that GC didn't have much hit on response times.
> > 
> > > The docs state that:  
> > > In order to see if this works or not, set the common.jna logging to  
> > > DEBUG level. A solution to “Unknown mlockall error 0” can be to set  
> > > ulimit -l unlimited.
> > 
> > > I have set common.jna logging to DEBUG, but don't see any messages  
> > > logged from this class. Is that a confirmation that mlockall is  
> > > working or should I expect to see something indicating that it is  
> > > working?
> > 
> > > Thanks!  
> > > Paul

---

<div class="post-metadata">

**Author:** ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)\
**Post date:** [August 2, 2011, 10:41am UTC](https://discuss.elastic.co/t/confirming-mlockall-is-working/4979/5 "2011-08-02T10:41:34Z")

</div>

Issue raise here: [warn if mlockall is not working once enabled in settings (instead of debug logging) · Issue #1194 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1194)

thanks.

On Aug 1, 9:55 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Yes, I think it makes sense. Something like, if its explicitly set, then log  
> a warn if its not working. Can you open an issue for it?
> 
> On Mon, Aug 1, 2011 at 2:56 PM, davrob2 [davirobe...@gmail.com](mailto:davirobe...@gmail.com) wrote:
> 
> > Hi,
> 
> > I had the same worries about whether my mlockall setting was actually  
> > set, would it be possible to put a positive message in the logs like  
> > "mlockall now working"?
> 
> > Best Regards,
> 
> > David.
> 
> > On Jul 27, 6:01 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > 
> > > Yes, if you don't see anything in the lock, then it should be working.
> 
> > > On Wed, Jul 27, 2011 at 7:46 PM, ppearcy [ppea...@gmail.com](mailto:ppea...@gmail.com) wrote:
> > > 
> > > > Hey,  
> > > > I've noticed some request time spikes with 0.16.2 that I hadn't  
> > > > observed with 0.14.2. I know that mlockall was critical in ensuring  
> > > > that GC didn't have much hit on response times.
> 
> > > > The docs state that:  
> > > > In order to see if this works or not, set the common.jna logging to  
> > > > DEBUG level. A solution to “Unknown mlockall error 0” can be to set  
> > > > ulimit -l unlimited.
> 
> > > > I have set common.jna logging to DEBUG, but don't see any messages  
> > > > logged from this class. Is that a confirmation that mlockall is  
> > > > working or should I expect to see something indicating that it is  
> > > > working?
> 
> > > > Thanks!  
> > > > Paul

---

<div class="post-metadata">

**Author:** ![Eran\_Eidinger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eran_eidinger/32/44831_2.png) [@Eran\_Eidinger](https://discuss.elastic.co/u/Eran_Eidinger)\
**Post date:** [May 7, 2013, 3:09pm UTC](https://discuss.elastic.co/t/confirming-mlockall-is-working/4979/6 "2013-05-07T15:09:44Z")

</div>

I have a noob question here.

where (as in what file, is it etc/init.d/elasticsearch, or /etc/elasticsearch/elasticsearch.yml?) do I set the common.jna, and what is the syntax for setting it to debug?

do I just set  
common.jna = DEBUG  
next to  
bootstrap.mlockall: true  
?

Where would I then follow the log to see this? would that be in /var/log/elasticsearch/elasticsearch.log?

when would this appear there, when I start the service ("service elasticsearch start")?

---

<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, 2:37am UTC](https://discuss.elastic.co/t/confirming-mlockall-is-working/4979/7 "2017-07-06T02:37:56Z")

</div>

Closed on July 6, 2017, 2:37am UTC


