Repository: kafka
Updated Branches:
  refs/heads/0.10.1 003c333f6 -> 2353f100f


MINOR: Set JVM parameters for the Gradle Test executor processes

We suspect that the test suite hangs we have been seeing are
due to PermGen exhaustion. It is a common reason for
hard JVM lock-ups.

Author: Ismael Juma <[email protected]>

Reviewers: Jason Gustafson <[email protected]>

Closes #1926 from ijuma/test-jvm-params

(cherry picked from commit 67e99d0869dd49358d7ca549ac715b722fda89f5)
Signed-off-by: Jason Gustafson <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/2353f100
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/2353f100
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/2353f100

Branch: refs/heads/0.10.1
Commit: 2353f100fb7502ab2dc6c527485c3263f618df52
Parents: 003c333
Author: Ismael Juma <[email protected]>
Authored: Wed Sep 28 19:15:00 2016 -0700
Committer: Jason Gustafson <[email protected]>
Committed: Wed Sep 28 19:15:21 2016 -0700

----------------------------------------------------------------------
 build.gradle | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/2353f100/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 64c389e..5e0e234 100644
--- a/build.gradle
+++ b/build.gradle
@@ -71,6 +71,10 @@ ext {
   gradleVersion = "3.0"
   buildVersionFileName = "kafka-version.properties"
 
+  maxPermSizeArgs = []
+  if (!JavaVersion.current().isJava8Compatible())
+    maxPermSizeArgs = ['-XX:MaxPermSize=512m']
+
   userMaxForks = project.hasProperty('maxParallelForks') ? 
maxParallelForks.toInteger() : null
 
   skipSigning = project.hasProperty('skipSigning') && skipSigning.toBoolean()
@@ -157,11 +161,17 @@ subprojects {
 
   test {
     maxParallelForks = userMaxForks ?: Runtime.runtime.availableProcessors()
+
+    minHeapSize = "256m"
+    maxHeapSize = "2048m"
+    jvmArgs = maxPermSizeArgs
+
     testLogging {
       events = userTestLoggingEvents ?: ["passed", "skipped", "failed"]
       showStandardStreams = userShowStandardStreams ?: false
       exceptionFormat = 'full'
     }
+
   }
 
   jar {
@@ -250,7 +260,7 @@ subprojects {
 
     configure(scalaCompileOptions.forkOptions) {
       memoryMaximumSize = '1g'
-      jvmArgs = ['-XX:MaxPermSize=512m', '-Xss2m']
+      jvmArgs = ['-Xss2m'] + maxPermSizeArgs
     }
   }
 

Reply via email to