Skip to content

Commit

Permalink
[SPARK-2856] Decrease initial buffer size for Kryo to 64KB.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Aug 5, 2014
1 parent 05bf4e4 commit 551b935
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ class KryoSerializer(conf: SparkConf)
with Logging
with Serializable {

private val bufferSize = conf.getInt("spark.kryoserializer.buffer.mb", 2) * 1024 * 1024
private val bufferSize =
(conf.getDouble("spark.kryoserializer.buffer.mb", 0.064) * 1024 * 1024).toInt

private val maxBufferSize = conf.getInt("spark.kryoserializer.buffer.max.mb", 64) * 1024 * 1024
private val referenceTracking = conf.getBoolean("spark.kryo.referenceTracking", true)
private val registrationRequired = conf.getBoolean("spark.kryo.registrationRequired", false)
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ Apart from these, the following properties are also available, and may be useful
</tr>
<tr>
<td><code>spark.kryoserializer.buffer.mb</code></td>
<td>2</td>
<td>0.064</td>
<td>
Initial size of Kryo's serialization buffer, in megabytes. Note that there will be one buffer
<i>per core</i> on each worker. This buffer will grow up to
Expand Down

0 comments on commit 551b935

Please sign in to comment.