GitHub user lianhuiwang opened a pull request:

    https://github.com/apache/spark/pull/7130

    [SPARK-4452][Core]Shuffle data structures can starve others on the same 
thread for memory

    Currently when there are 2 spillable objects in a thread, 
ShuffleMemoryManager does not work well. some time latter spillable just can 
ask 5MB. 
    when join on #5868#, because join has ExternalAppendOnlyMap and 
UnsafeShuffleExternalSorter’s page size is 128MB, UnsafeShuffleExternalSorter 
always cannot ask PAGE_SIZE memory and throw IOException("Unable to acquire " + 
PAGE_SIZE + " bytes of memory”).
    in the future, when using #6444’s binary processing sort on 
unsafe-shuffle-sort, the problem is more serious.
    in this PR, when previous spillable is finished,add it to 
ShuffleMemoryManager’s reserved list. when latter spillable ask memory,but 
ShuffleMemoryManager has no enough memory, it spill previous spillable and get 
its memory. that make latter spoilable get more memory.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lianhuiwang/spark fix-memory

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/7130.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #7130
    
----
commit f149147f0283d8c0e53bb850b1548ee6d84d8a70
Author: Lianhui Wang <[email protected]>
Date:   2015-06-29T16:35:11Z

    init commit

commit eb04478ca1f10fb1d40a3c4114aef681d4fa7289
Author: Lianhui Wang <[email protected]>
Date:   2015-06-29T16:41:42Z

    refractor code

commit 4ede7ea34273034708feacc05d12bbb6f746e834
Author: Lianhui Wang <[email protected]>
Date:   2015-06-29T16:43:29Z

    Merge branch 'master' of https://github.com/apache/spark into fix-memory

commit 02749c1785f63020c7b998e83353bb9f14e87304
Author: Lianhui Wang <[email protected]>
Date:   2015-06-30T15:37:43Z

    add unit test

commit 5cc88ab51cd974a8ad2438019a5e04052c7e2b0b
Author: Lianhui Wang <[email protected]>
Date:   2015-06-30T16:10:07Z

    refactor style

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to