spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-14277) UnsafeSorterSpillReader should do buffered read from underlying compression stream
Date Wed, 30 Mar 2016 21:50:25 GMT

     [ https://issues.apache.org/jira/browse/SPARK-14277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Apache Spark reassigned SPARK-14277:
------------------------------------

    Assignee:     (was: Apache Spark)

> UnsafeSorterSpillReader should do buffered read from underlying compression stream
> ----------------------------------------------------------------------------------
>
>                 Key: SPARK-14277
>                 URL: https://issues.apache.org/jira/browse/SPARK-14277
>             Project: Spark
>          Issue Type: Improvement
>          Components: Shuffle
>    Affects Versions: 1.6.1
>            Reporter: Sital Kedia
>
> While running a Spark job which is spilling a lot of data in reduce phase, we see that
significant amount of CPU is being consumed in native Snappy ArrayCopy method (Please see
the stack trace below). 
> Stack trace - 
> org.xerial.snappy.SnappyNative.$$YJP$$arrayCopy(Native Method)
> org.xerial.snappy.SnappyNative.arrayCopy(SnappyNative.java)
> org.xerial.snappy.Snappy.arrayCopy(Snappy.java:85)
> org.xerial.snappy.SnappyInputStream.rawRead(SnappyInputStream.java:190)
> org.xerial.snappy.SnappyInputStream.read(SnappyInputStream.java:163)
> java.io.DataInputStream.readFully(DataInputStream.java:195)
> java.io.DataInputStream.readLong(DataInputStream.java:416)
> org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillReader.loadNext(UnsafeSorterSpillReader.java:71)
> org.apache.spark.util.collection.unsafe.sort.UnsafeSorterSpillMerger$2.loadNext(UnsafeSorterSpillMerger.java:79)
> org.apache.spark.sql.execution.UnsafeExternalRowSorter$1.next(UnsafeExternalRowSorter.java:136)
> org.apache.spark.sql.execution.UnsafeExternalRowSorter$1.next(UnsafeExternalRowSorter.java:123)
> The reason for that is the SpillReader does a lot of small reads from the underlying
snappy compressed stream and we pay a heavy cost of jni calls for these small reads. The SpillReader
should instead do a buffered read from the underlying snappy compressed stream.



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


Mime
View raw message