Repository: kafka
Updated Branches:
  refs/heads/trunk aa506a691 -> 67e99d086


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


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

Branch: refs/heads/trunk
Commit: 67e99d0869dd49358d7ca549ac715b722fda89f5
Parents: aa506a6
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:00 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/kafka/blob/67e99d08/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