Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-15260] Atomically resize memory pools #13039

Closed
wants to merge 2 commits into from

Conversation

andrewor14
Copy link
Contributor

What changes were proposed in this pull request?

When we acquire execution memory, we do a lot of things between shrinking the storage memory pool and enlarging the execution memory pool. In particular, we call memoryStore.evictBlocksToFreeSpace, which may do a lot of I/O and can throw exceptions. If an exception is thrown, the pool sizes on that executor will be in a bad state.

This patch minimizes the things we do between the two calls to make the resizing more atomic.

How was this patch tested?

Jenkins.

@davies
Copy link
Contributor

davies commented May 11, 2016

LGTM

@andrewor14
Copy link
Contributor Author

@davies @JoshRosen

@SparkQA
Copy link

SparkQA commented May 11, 2016

Test build #58294 has finished for PR 13039 at commit 632ae14.

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

@SparkQA
Copy link

SparkQA commented May 11, 2016

Test build #58298 has finished for PR 13039 at commit df67bda.

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

@andrewor14
Copy link
Contributor Author

attest this please

@SparkQA
Copy link

SparkQA commented May 11, 2016

Test build #58388 has finished for PR 13039 at commit df67bda.

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

@davies
Copy link
Contributor

davies commented May 11, 2016

Merging this into master and 2.0 and 1.6, thanks!

@asfgit asfgit closed this in bb88ad4 May 11, 2016
asfgit pushed a commit that referenced this pull request May 11, 2016
## What changes were proposed in this pull request?

When we acquire execution memory, we do a lot of things between shrinking the storage memory pool and enlarging the execution memory pool. In particular, we call `memoryStore.evictBlocksToFreeSpace`, which may do a lot of I/O and can throw exceptions. If an exception is thrown, the pool sizes on that executor will be in a bad state.

This patch minimizes the things we do between the two calls to make the resizing more atomic.

## How was this patch tested?

Jenkins.

Author: Andrew Or <[email protected]>

Closes #13039 from andrewor14/safer-pool.

(cherry picked from commit bb88ad4)
Signed-off-by: Davies Liu <[email protected]>
@davies
Copy link
Contributor

davies commented May 11, 2016

@andrewor14 Could you create a patch for 1.6? this one can't be clean cherry-picked

@andrewor14 andrewor14 deleted the safer-pool branch May 11, 2016 20:36
@andrewor14
Copy link
Contributor Author

ok

@andrewor14 andrewor14 restored the safer-pool branch May 11, 2016 20:50
@andrewor14 andrewor14 deleted the safer-pool branch May 11, 2016 20:58
@andrewor14 andrewor14 restored the safer-pool branch May 11, 2016 20:58
@andrewor14 andrewor14 deleted the safer-pool branch May 11, 2016 21:04
asfgit pushed a commit that referenced this pull request May 12, 2016
## What changes were proposed in this pull request?

(This is the branch-1.6 version of #13039)

When we acquire execution memory, we do a lot of things between shrinking the storage memory pool and enlarging the execution memory pool. In particular, we call memoryStore.evictBlocksToFreeSpace, which may do a lot of I/O and can throw exceptions. If an exception is thrown, the pool sizes on that executor will be in a bad state.

This patch minimizes the things we do between the two calls to make the resizing more atomic.

## How was this patch tested?

Jenkins.

Author: Andrew Or <[email protected]>

Closes #13058 from andrewor14/safer-pool-1.6.
zzcclp pushed a commit to zzcclp/spark that referenced this pull request May 12, 2016
## What changes were proposed in this pull request?

(This is the branch-1.6 version of apache#13039)

When we acquire execution memory, we do a lot of things between shrinking the storage memory pool and enlarging the execution memory pool. In particular, we call memoryStore.evictBlocksToFreeSpace, which may do a lot of I/O and can throw exceptions. If an exception is thrown, the pool sizes on that executor will be in a bad state.

This patch minimizes the things we do between the two calls to make the resizing more atomic.

## How was this patch tested?

Jenkins.

Author: Andrew Or <[email protected]>

Closes apache#13058 from andrewor14/safer-pool-1.6.

(cherry picked from commit fd2da7b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants