Skip to content

Conversation

@aarondav
Copy link
Contributor

Turns out we are allocating an allocator pool for every TransportClient (which means that the number increases with the number of nodes in the cluster), when really we should just reuse one for all clients.

This patch, as expected, greatly decreases off-heap memory allocation, and appears to make allocation only proportional to the number of cores.

…tors

Turns out we are allocating an allocator pool for every TransportClient (which means that the number increases with the number of nodes in the cluster), when really we should just reuse one for all clients.

This patch, as expected, massively decreases off-heap memory allocation, and appears to make allocation only proportional to the number of cores.
@aarondav
Copy link
Contributor Author

This should be merged into 1.2, as it should simply reduce memory issues in containerized environments.

@rxin
Copy link
Contributor

rxin commented Nov 26, 2014

LGTM.

@SparkQA
Copy link

SparkQA commented Nov 26, 2014

Test build #23866 has started for PR 3465 at commit 36c49da.

  • This patch merges cleanly.

@pwendell
Copy link
Contributor

Thanks aaron, waiting on this to cut rc1

@aarondav aarondav changed the title [SPARK-4516] Avoid allocating unnecessarily Netty PooledByteBufAllocators [SPARK-4516] Avoid allocating Netty PooledByteBufAllocators unnecessarily Nov 26, 2014
@SparkQA
Copy link

SparkQA commented Nov 26, 2014

Test build #23866 has finished for PR 3465 at commit 36c49da.

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

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/23866/
Test PASSed.

@lianhuiwang
Copy link
Contributor

thanks aaron. that 's very great.

@zzcclp
Copy link
Contributor

zzcclp commented Nov 26, 2014

Thanks aaron, it's great.

mengxr pushed a commit to mengxr/spark that referenced this pull request Nov 26, 2014
…rily

Turns out we are allocating an allocator pool for every TransportClient (which means that the number increases with the number of nodes in the cluster), when really we should just reuse one for all clients.

This patch, as expected, greatly decreases off-heap memory allocation, and appears to make allocation only proportional to the number of cores.

Author: Aaron Davidson <[email protected]>

Closes apache#3465 from aarondav/fewer-pools and squashes the following commits:

36c49da [Aaron Davidson] [SPARK-4516] Avoid allocating unnecessarily Netty PooledByteBufAllocators

(cherry picked from commit 346bc17)
Signed-off-by: Patrick Wendell <[email protected]>
@aarondav
Copy link
Contributor Author

Merging into master and branch-1.2.

@liuxinglanyue
Copy link

thanks

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.

8 participants