You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Andrew Ash (JIRA)" <ji...@apache.org> on 2014/09/07 10:35:28 UTC

[jira] [Commented] (SPARK-2048) Optimizations to CPU usage of external spilling code

    [ https://issues.apache.org/jira/browse/SPARK-2048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14124841#comment-14124841 ] 

Andrew Ash commented on SPARK-2048:
-----------------------------------

All subtasks of this umbrella task have been completed and will be included in 1.1.0 -- are we good to close this ticket?

> Optimizations to CPU usage of external spilling code
> ----------------------------------------------------
>
>                 Key: SPARK-2048
>                 URL: https://issues.apache.org/jira/browse/SPARK-2048
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>            Reporter: Matei Zaharia
>             Fix For: 1.1.0
>
>
> In the external spilling code in ExternalAppendOnlyMap and CoGroupedRDD, there are a few opportunities for optimization:
> - There are lots of uses of pattern-matching on Tuple2 (e.g. val (k, v) = pair), which we found to be much slower than accessing fields directly
> - Hash codes for each element are computed many times in StreamBuffer.minKeyHash, which will be expensive for some data types
> - Uses of buffer.remove() may be expensive if there are lots of hash collisions (better to swap in the last element into that position)
> - More objects are allocated than is probably necessary, e.g. ArrayBuffers and pairs
> - Because ExternalAppendOnlyMap is only given one key-value pair at a time, it allocates a new update function on each one, unlike the way we pass a single update function to AppendOnlyMap in Aggregator
> These should help because situations where we're spilling are also ones where there is presumably a lot of GC pressure in the new generation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org