Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Apr 6, 2021

What changes were proposed in this pull request?

This PR removes .sbtopts (added in #29286) that duplicately sets the default memory. The default memories are set:

local mem=${1:-$sbt_default_mem}
local codecache=$(( $mem / 8 ))
(( $codecache > 128 )) || codecache=128
(( $codecache < 2048 )) || codecache=2048
echo "-Xms${mem}m -Xmx${mem}m -XX:ReservedCodeCacheSize=${codecache}m"

Why are the changes needed?

This file disables the memory option from the build/sbt script:

./build/sbt -mem 6144
.../jdk-11.0.3.jdk/Contents/Home as default JAVA_HOME.
Note, this will be overridden by -java-home if it is set.
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size

because it adds these memory options at the last:

/.../bin/java -Xms6144m -Xmx6144m -XX:ReservedCodeCacheSize=256m -Xmx4G -Xss4m -jar build/sbt-launch-1.5.0.jar

and Java respects the rightmost memory configurations.

Does this PR introduce any user-facing change?

No, dev-only.

How was this patch tested?

Manually ran SBT. It will be tested in the CIs in this Pr.

@HyukjinKwon HyukjinKwon changed the title [kSPARK-34965][BUILD] Remove .sbtopts that duplicately sets the default memory [SPARK-34965][BUILD] Remove .sbtopts that duplicately sets the default memory Apr 6, 2021
@SparkQA
Copy link

SparkQA commented Apr 6, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41517/

@github-actions github-actions bot added the DOCS label Apr 6, 2021
Copy link
Contributor

@cloud-fan cloud-fan left a comment

Choose a reason for hiding this comment

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

makes sense

@SparkQA
Copy link

SparkQA commented Apr 6, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41519/

declare -a sbt_commands
declare -a maven_profiles
declare sbt_default_mem=2048
declare sbt_default_mem=4096
Copy link
Member Author

Choose a reason for hiding this comment

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

So here was the default place to set the memory

@SparkQA
Copy link

SparkQA commented Apr 6, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41522/

@SparkQA
Copy link

SparkQA commented Apr 6, 2021

Test build #136940 has finished for PR 32062 at commit dafae34.

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

@SparkQA
Copy link

SparkQA commented Apr 6, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41523/

@SparkQA
Copy link

SparkQA commented Apr 6, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41523/

@SparkQA
Copy link

SparkQA commented Apr 6, 2021

Test build #136943 has finished for PR 32062 at commit 2523b55.

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

@SparkQA
Copy link

SparkQA commented Apr 6, 2021

Test build #136946 has finished for PR 32062 at commit 7a6959a.

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

@SparkQA
Copy link

SparkQA commented Apr 6, 2021

Test build #136947 has finished for PR 32062 at commit 66987d1.

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

dongjoon-hyun pushed a commit that referenced this pull request Apr 6, 2021
…t memory

### What changes were proposed in this pull request?

This PR removes `.sbtopts` (added in #29286) that duplicately sets the default memory. The default memories are set:

https://github.com/apache/spark/blob/3b634f66c3e4a942178a1e322ae65ce82779625d/build/sbt-launch-lib.bash#L119-L124

### Why are the changes needed?

This file disables the memory option from the `build/sbt` script:

```bash
./build/sbt -mem 6144
```
```
.../jdk-11.0.3.jdk/Contents/Home as default JAVA_HOME.
Note, this will be overridden by -java-home if it is set.
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size
```

because it adds these memory options at the last:

```bash
/.../bin/java -Xms6144m -Xmx6144m -XX:ReservedCodeCacheSize=256m -Xmx4G -Xss4m -jar build/sbt-launch-1.5.0.jar
```

and Java respects the rightmost memory configurations.

### Does this PR introduce _any_ user-facing change?

No, dev-only.

### How was this patch tested?

Manually ran SBT. It will be tested in the CIs in this Pr.

Closes #32062 from HyukjinKwon/SPARK-34965.

Authored-by: HyukjinKwon <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 2eda1c6)
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun
Copy link
Member

Thank you, @HyukjinKwon and all.
Merged to master/3.1.

@HyukjinKwon
Copy link
Member Author

Thanks!

flyrain pushed a commit to flyrain/spark that referenced this pull request Sep 21, 2021
…t memory

### What changes were proposed in this pull request?

This PR removes `.sbtopts` (added in apache#29286) that duplicately sets the default memory. The default memories are set:

https://github.com/apache/spark/blob/3b634f66c3e4a942178a1e322ae65ce82779625d/build/sbt-launch-lib.bash#L119-L124

### Why are the changes needed?

This file disables the memory option from the `build/sbt` script:

```bash
./build/sbt -mem 6144
```
```
.../jdk-11.0.3.jdk/Contents/Home as default JAVA_HOME.
Note, this will be overridden by -java-home if it is set.
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size
```

because it adds these memory options at the last:

```bash
/.../bin/java -Xms6144m -Xmx6144m -XX:ReservedCodeCacheSize=256m -Xmx4G -Xss4m -jar build/sbt-launch-1.5.0.jar
```

and Java respects the rightmost memory configurations.

### Does this PR introduce _any_ user-facing change?

No, dev-only.

### How was this patch tested?

Manually ran SBT. It will be tested in the CIs in this Pr.

Closes apache#32062 from HyukjinKwon/SPARK-34965.

Authored-by: HyukjinKwon <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 2eda1c6)
Signed-off-by: Dongjoon Hyun <[email protected]>
@HyukjinKwon HyukjinKwon deleted the SPARK-34965 branch January 4, 2022 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants