GitHub user liyezhang556520 opened a pull request:
https://github.com/apache/spark/pull/12038
[SPARK-14242][CORE][Network] avoid using compositeBuffer for frame decoder
## What changes were proposed in this pull request?
In this patch, we avoid using `compositeBuffer` in `TransportFrameDecoder`
because `compositeBuffer` will introduce too many memory copies when the frame
size is large (which result in many transport messages). For details, please
refer to [SPARK-14242](https://issues.apache.org/jira/browse/SPARK-14242).
## How was this patch tested?
spark unit tests and manual tests.
For manual tests, we can reproduce the performance issue with following
code:
`sc.parallelize(Array(1,2,3),3).mapPartitions(a=>Array(new
Array[Double](1024 * 1024 * 50)).iterator).reduce((a,b)=> a).length`
It's easy to see the performance gain, both from the running time and CPU
usage.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/liyezhang556520/spark spark-14242
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12038.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 #12038
----
commit 8908585c3029de005e9816d711b0d7ee86398a12
Author: Zhang, Liye <[email protected]>
Date: 2016-03-29T15:04:36Z
spark-14242 avoid using compositeBuffer for frame decoder
----
---
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]