From 743b2ed1b2c7166d30dd3dd1721120bd9738a172 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 19 Aug 2016 11:38:46 -0400 Subject: [PATCH 1/2] Set default min heap equal to default max heap This commit sets the default min heap equal to the default max heap. This is to align the default out-of-box settings with the heap size bootstrap check. --- distribution/build.gradle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/distribution/build.gradle b/distribution/build.gradle index bfbf96b5d2a..5409cfd3bc6 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -479,6 +479,8 @@ task run(type: RunTask) { * */ Map expansionsForDistribution(distributionType) { + final String defaultHeapSize = "2g" + String footer = "# Built for ${project.name}-${project.version} " + "(${distributionType})" Map expansions = [ @@ -498,8 +500,8 @@ Map expansionsForDistribution(distributionType) { 'def': '', ], - 'heap.min': "256m", - 'heap.max': "2g", + 'heap.min': defaultHeapSize, + 'heap.max': defaultHeapSize, 'stopping.timeout': [ 'rpm': 86400, From 13e20e3320941f569efd18e9614bf673aa1b9dee Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 19 Aug 2016 12:55:48 -0400 Subject: [PATCH 2/2] Set external nodes to default to 512m of heap This commit sets external nodes for integration tests to default to using 512m of heap. This can be overridden using tests.heap.size (a system property that we already use elesewhere for setting the size of the heap for the test runner) or using tests.jvm.argline (this last one takes precedence). --- .../org/elasticsearch/gradle/test/ClusterConfiguration.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy index d45741a50b8..6a2375efc62 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy @@ -54,7 +54,9 @@ class ClusterConfiguration { boolean debug = false @Input - String jvmArgs = System.getProperty('tests.jvm.argline', '') + String jvmArgs = "-Xms" + System.getProperty('tests.heap.size', '512m') + + " " + "-Xmx" + System.getProperty('tests.heap.size', '512m') + + " " + System.getProperty('tests.jvm.argline', '') /** * The seed nodes port file. In the case the cluster has more than one node we use a seed node