Repository: kafka
Updated Branches:
  refs/heads/0.10.0 8bbb0b216 -> fe57fe694


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/fe57fe69
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/fe57fe69
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/fe57fe69

Branch: refs/heads/0.10.0
Commit: fe57fe6943338b136e722e85fa9c860646a06da7
Parents: 8bbb0b2
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:28 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/kafka/blob/fe57fe69/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index d46c8b3..a24a786 100644
--- a/build.gradle
+++ b/build.gradle
@@ -71,6 +71,10 @@ ext {
   gradleVersion = "2.13"
   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 {
@@ -244,7 +254,7 @@ subprojects {
 
     configure(scalaCompileOptions.forkOptions) {
       memoryMaximumSize = '1g'
-      jvmArgs = ['-XX:MaxPermSize=512m', '-Xss2m']
+      jvmArgs = ['-Xss2m'] + maxPermSizeArgs
     }
   }
 

Reply via email to