Repository: spark
Updated Branches:
  refs/heads/master 9862c614c -> 184048f80


[SPARK-2856] Decrease initial buffer size for Kryo to 64KB.

Author: Reynold Xin <[email protected]>

Closes #1780 from rxin/kryo-init-size and squashes the following commits:

551b935 [Reynold Xin] [SPARK-2856] Decrease initial buffer size for Kryo to 
64KB.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/184048f8
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/184048f8
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/184048f8

Branch: refs/heads/master
Commit: 184048f80b6fa160c89d5bb47b937a0a89534a95
Parents: 9862c61
Author: Reynold Xin <[email protected]>
Authored: Tue Aug 5 01:30:46 2014 -0700
Committer: Reynold Xin <[email protected]>
Committed: Tue Aug 5 01:30:46 2014 -0700

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/serializer/KryoSerializer.scala  | 4 +++-
 docs/configuration.md                                            | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/184048f8/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala 
b/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala
index e60b802..407cb9d 100644
--- a/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala
+++ b/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala
@@ -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)

http://git-wip-us.apache.org/repos/asf/spark/blob/184048f8/docs/configuration.md
----------------------------------------------------------------------
diff --git a/docs/configuration.md b/docs/configuration.md
index 870343f..b3dee3f 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to