GitHub user cloud-fan opened a pull request:

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

    [SPARK-12837][SQL] reduce the serialized size of accumulator

    ## What changes were proposed in this pull request?
    
    When sending accumulator updates back to driver, the network overhead is 
pretty big as there are a lot of accumulators, e.g. `TaskMetrics` will send 
about 20 accumulators everytime, there may be a lot of `SQLMetric` if the query 
plan is complicated.
    
    Therefore, it's critical to reduce the size of serialized accumulator. This 
PR proposed 2 ways:
    
    1. Do not send the accumulator name to executor side, as it's unnecessary. 
When executor sends accumulator updates back to driver, we can look up the 
accumulator name in `AccumulatorContext` easily.
    2. Introduce `InternalLongAccumulator` which can slightly reduce the size, 
but can also take over the `setValue` functionality from `LongAccumulator`, 
which doesn't fit well.
    
    Tried on the example in https://issues.apache.org/jira/browse/SPARK-12837, 
the size of serialized accumulator has been cut down around 50%.
    
    ## How was this patch tested?
    
    existing tests.

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

    $ git pull https://github.com/cloud-fan/spark oom

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

    https://github.com/apache/spark/pull/17596.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 #17596
    
----
commit 67044b34ac60863d3fbdbe37ba89fffa85ffb2fe
Author: Wenchen Fan <[email protected]>
Date:   2017-04-10T12:31:47Z

    reduce the serialized size of accumulator

----


---
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