[SPARK-29159][BUILD] Increase ReservedCodeCacheSize to 1G
### What changes were proposed in this pull request? This PR aims to increase the JVM CodeCacheSize from 0.5G to 1G. ### Why are the changes needed? After upgrading to `Scala 2.12.10`, the following is observed during building. ``` 2019-09-18T20:49:23.5030586Z OpenJDK 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled. 2019-09-18T20:49:23.5032920Z OpenJDK 64-Bit Server VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize= 2019-09-18T20:49:23.5034959Z CodeCache: size=524288Kb used=521399Kb max_used=521423Kb free=2888Kb 2019-09-18T20:49:23.5035472Z bounds [0x00007fa62c000000, 0x00007fa64c000000, 0x00007fa64c000000] 2019-09-18T20:49:23.5035781Z total_blobs=156549 nmethods=155863 adapters=592 2019-09-18T20:49:23.5036090Z compilation: disabled (not enough contiguous free space left) ``` ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Manually check the Jenkins or GitHub Action build log (which should not have the above). Closes #25836 from dongjoon-hyun/SPARK-CODE-CACHE-1G. Authored-by: Dongjoon Hyun <dhyun@apple.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
This commit is contained in:
parent
b917a6593d
commit
3bf43fb60d
2
.github/workflows/master.yml
vendored
2
.github/workflows/master.yml
vendored
|
@ -29,6 +29,6 @@ jobs:
|
|||
version: ${{ matrix.java }}
|
||||
- name: Build with Maven
|
||||
run: |
|
||||
export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
|
||||
export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=1g -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN"
|
||||
export MAVEN_CLI_OPTS="--no-transfer-progress"
|
||||
./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pmesos -Pkubernetes -Phive -Phive-thriftserver -P${{ matrix.hadoop }} -Phadoop-cloud -Djava.version=${{ matrix.java }} package
|
||||
|
|
|
@ -22,7 +22,7 @@ _DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||
# Preserve the calling directory
|
||||
_CALLING_DIR="$(pwd)"
|
||||
# Options used during compilation
|
||||
_COMPILE_JVM_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m"
|
||||
_COMPILE_JVM_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=1g"
|
||||
|
||||
# Installs any application tarball given a URL, the expected tarball name,
|
||||
# and, optionally, a checkable binary path to determine if the binary has
|
||||
|
|
|
@ -90,7 +90,7 @@ Invoke-Expression "7z.exe x maven.zip"
|
|||
# add maven to environment variables
|
||||
$env:PATH = "$tools\apache-maven-$mavenVer\bin;" + $env:PATH
|
||||
$env:M2_HOME = "$tools\apache-maven-$mavenVer"
|
||||
$env:MAVEN_OPTS = "-Xmx2g -XX:ReservedCodeCacheSize=512m"
|
||||
$env:MAVEN_OPTS = "-Xmx2g -XX:ReservedCodeCacheSize=1g"
|
||||
|
||||
Pop-Location
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ fi
|
|||
# Build uber fat JAR
|
||||
cd "$SPARK_HOME"
|
||||
|
||||
export MAVEN_OPTS="${MAVEN_OPTS:--Xmx2g -XX:ReservedCodeCacheSize=512m}"
|
||||
export MAVEN_OPTS="${MAVEN_OPTS:--Xmx2g -XX:ReservedCodeCacheSize=1g}"
|
||||
|
||||
# Store the command as an array because $MVN variable might have spaces in it.
|
||||
# Normal quoting tricks don't work.
|
||||
|
|
|
@ -34,7 +34,7 @@ Spark requires Scala 2.12; support for Scala 2.11 was removed in Spark 3.0.0.
|
|||
|
||||
You'll need to configure Maven to use more memory than usual by setting `MAVEN_OPTS`:
|
||||
|
||||
export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m"
|
||||
export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=1g"
|
||||
|
||||
(The `ReservedCodeCacheSize` setting is optional but recommended.)
|
||||
If you don't add these parameters to `MAVEN_OPTS`, you may see errors and warnings like the following:
|
||||
|
@ -160,7 +160,7 @@ prompt.
|
|||
Configure the JVM options for SBT in `.jvmopts` at the project root, for example:
|
||||
|
||||
-Xmx2g
|
||||
-XX:ReservedCodeCacheSize=512m
|
||||
-XX:ReservedCodeCacheSize=1g
|
||||
|
||||
For the meanings of these two options, please carefully read the [Setting up Maven's Memory Usage section](https://spark.apache.org/docs/latest/building-spark.html#setting-up-mavens-memory-usage).
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -240,7 +240,7 @@
|
|||
-->
|
||||
<spark.test.home>${session.executionRootDirectory}</spark.test.home>
|
||||
|
||||
<CodeCacheSize>512m</CodeCacheSize>
|
||||
<CodeCacheSize>1g</CodeCacheSize>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
|
||||
<junitxml>.</junitxml>
|
||||
<filereports>SparkTestSuite.txt</filereports>
|
||||
<argLine>-ea -Xmx4g -XX:ReservedCodeCacheSize=512m ${extraScalaTestArgs}</argLine>
|
||||
<argLine>-ea -Xmx4g -XX:ReservedCodeCacheSize=1g ${extraScalaTestArgs}</argLine>
|
||||
<stderr/>
|
||||
<systemProperties>
|
||||
<log4j.configuration>file:src/test/resources/log4j.properties</log4j.configuration>
|
||||
|
|
Loading…
Reference in a new issue