From d0ac9087b613747cab659a022cba4b55f318b550 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sun, 14 Nov 2010 15:54:40 +0200 Subject: [PATCH] add bootstrap.mlockall setting to control if mlockall should be called or not --- .../src/main/java/org/elasticsearch/bootstrap/Bootstrap.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java b/modules/elasticsearch/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java index d7e213d626b..62e4017187a 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java @@ -60,7 +60,9 @@ public class Bootstrap { private void setup(boolean addShutdownHook, Tuple tuple) throws Exception { // Loggers.getLogger(Bootstrap.class, tuple.v1().get("name")).info("heap_size {}/{}", JvmStats.jvmStats().mem().heapCommitted(), JvmInfo.jvmInfo().mem().heapMax()); - Natives.tryMlockall(); + if (tuple.v1().getAsBoolean("bootstrap.mlockall", true)) { + Natives.tryMlockall(); + } tuple = setupJmx(tuple); NodeBuilder nodeBuilder = NodeBuilder.nodeBuilder().settings(tuple.v1()).loadConfigSettings(false);