I'm curious how it is possible that a cluster on Elastic Cloud passes the memory lock bootstrap check even though the memory doesn't seem to be locked.
Thank you David.
What I don't understand is how it is possible that a production cluster on Elastic Cloud can start even though the memory lock bootstrap check is not satisfied?
In Cloud, the bootstrap.memory_lock setting is not set, so BootstrapSettings.MEMORY_LOCK_SETTING.get(context.settings()) returns its default, which is false, so it doesn't matter what isMemoryLocked() returns, the check is always satisfied.
There are three approaches to disabling swapping. The preferred option is to completely disable swap. If this is not an option, whether or not to prefer minimizing swappiness versus memory locking is dependent on your environment.
bootstrap.memory_lock is a poor substitute for fixing the OS-level configuration to prevent swapping, because it does not prevent swapping of direct (off-heap) memory.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.