[
https://issues.apache.org/jira/browse/SPARK-4550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14372232#comment-14372232
]
Sandy Ryza commented on SPARK-4550:
-----------------------------------
I spoke briefly with Reynold about this offline, and he pointed out that, with
the patch, we now flush the Kryo serialization stream after every object we
write. I put together a micro-benchmark to stress this that writes a bunch of
small records to a Kryo serialization stream with and without flushing:
runs without flush: (count: 30, mean: 226.400000, stdev: 3.929377, max:
241.000000, min: 222.000000)
runs with flush: (count: 30, mean: 226.300000, stdev: 2.084067, max:
234.000000, min: 224.000000)
There doesn't appear to be a significant difference. The benchmark code is
attached.
> In sort-based shuffle, store map outputs in serialized form
> -----------------------------------------------------------
>
> Key: SPARK-4550
> URL: https://issues.apache.org/jira/browse/SPARK-4550
> Project: Spark
> Issue Type: Improvement
> Components: Shuffle, Spark Core
> Affects Versions: 1.2.0
> Reporter: Sandy Ryza
> Assignee: Sandy Ryza
> Priority: Critical
> Attachments: SPARK-4550-design-v1.pdf
>
>
> One drawback with sort-based shuffle compared to hash-based shuffle is that
> it ends up storing many more java objects in memory. If Spark could store
> map outputs in serialized form, it could
> * spill less often because the serialized form is more compact
> * reduce GC pressure
> This will only work when the serialized representations of objects are
> independent from each other and occupy contiguous segments of memory. E.g.
> when Kryo reference tracking is left on, objects may contain pointers to
> objects farther back in the stream, which means that the sort can't relocate
> objects without corrupting them.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]