Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Sep 18, 2019

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).

```
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)
```
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-29159][BUILD] Increase CodeCacheSize to 1G [SPARK-29159][BUILD] Increase ReservedCodeCacheSize to 1G Sep 18, 2019
@dongjoon-hyun
Copy link
Member Author

How do you think about this, @srowen ?

@srowen
Copy link
Member

srowen commented Sep 19, 2019

We might consider UseCodeCacheFlushing instead? or in addition?

I think it's fine to increase this too, though that's getting really large. I get that the Scala compiler may need a much bigger one than usual, but what I don't know is whether it's really just stale stuff in the cache anyway.

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #110939 has finished for PR 25836 at commit 0b11de3.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #110941 has finished for PR 25836 at commit 04d2b61.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

Thank you for the opinion, @srowen . I'll take a look more.

BTW, the Jenkins failed with the following. It looks irrelevant.

  • Fist run: org.apache.spark.sql.kafka010.KafkaSourceStressForDontFailOnDataLossSuite.stress test for failOnDataLoss=false
  • Second run: org.apache.spark.sql.kafka010.KafkaRelationSuiteV2.default starting and ending offsets with headers.

@HyukjinKwon
Copy link
Member

retest this please

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #110957 has finished for PR 25836 at commit 04d2b61.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

dongjoon-hyun commented Sep 19, 2019

@srowen . I took a look. UseCodeCacheFlushing was introduced at JDK6 by default false, but was changed at JDK7 by default true. We are already true. I checked with the following.

$ java -XX:+PrintFlagsFinal -version | grep UseCodeCacheFlushing
     bool UseCodeCacheFlushing                      = true                                {product}
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)

Oracle Website is also inconsistent.

  1. In the table, the default value is false.
  2. In the sentence, the default value is true.

The UseCodeCacheFlushing option turns codecache flushing on and off. By default it is on. You can disable this feature by specifying XX:-UseCodeCacheFlushing.

@dongjoon-hyun
Copy link
Member Author

Thank you, @srowen and @HyukjinKwon . Since there is no other option, we had better merge this PR~

@dongjoon-hyun
Copy link
Member Author

dongjoon-hyun commented Sep 19, 2019

Thank you, @srowen and @HyukjinKwon . This PR also includes a document update. Users had better increase the value in Scala 2.12.10 from now. I'll merge this PR .
Merged to master/2.4.

Copy link
Member

@wangyum wangyum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dongjoon-hyun
Copy link
Member Author

Oh, thank you, @wangyum !

dongjoon-hyun added a commit that referenced this pull request Sep 19, 2019
This PR aims to increase the JVM CodeCacheSize from 0.5G to 1G.

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)
```

No.

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 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 3bf43fb)
Signed-off-by: Dongjoon Hyun <[email protected]>
@srowen
Copy link
Member

srowen commented Sep 19, 2019

Got it yeah looks like it's already on. This looks good. It may be why the PR builder is slower recently.

@dongjoon-hyun
Copy link
Member Author

Thank you, @srowen . Sorry for rushing this.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-CODE-CACHE-1G branch September 19, 2019 16:10
@MaxGekk
Copy link
Member

MaxGekk commented Dec 8, 2019

I compile the master by ./build/mvn, and still see the warning:

[WARNING] [Warn] /Users/maxim/proj/eliminate-warning/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/WriteToMicroBatchDataSource.scala:37: class WriteToDataSourceV2 in package v2 is deprecated (since 2.4.0): Use specific logical plans like AppendData instead
Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=
CodeCache: size=524288Kb used=520832Kb max_used=520858Kb free=3455Kb
 bounds [0x000000011574a000, 0x000000013574a000, 0x000000013574a000]
 total_blobs=130198 nmethods=129545 adapters=560
 compilation: disabled (not enough contiguous free space left)

@dongjoon-hyun
Copy link
Member Author

Then, could you investigate the missed part, @MaxGekk ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants