Skip to content

Commit 1656aae

Browse files
Lewuatheaarondav
authored andcommitted
[SPARK-5073] spark.storage.memoryMapThreshold have two default value
Because major OS page sizes is about 4KB, the default value of spark.storage.memoryMapThreshold is integrated to 2 * 4096 Author: lewuathe <[email protected]> Closes apache#3900 from Lewuathe/integrate-memoryMapThreshold and squashes the following commits: e417acd [lewuathe] [SPARK-5073] Update docs/configuration 834aba4 [lewuathe] [SPARK-5073] Fix style adcea33 [lewuathe] [SPARK-5073] Integrate memory map threshold to 2MB fcce2e5 [lewuathe] [SPARK-5073] spark.storage.memoryMapThreshold have two default value
1 parent 3313260 commit 1656aae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/src/main/scala/org/apache/spark/storage/DiskStore.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import org.apache.spark.util.Utils
3131
private[spark] class DiskStore(blockManager: BlockManager, diskManager: DiskBlockManager)
3232
extends BlockStore(blockManager) with Logging {
3333

34-
val minMemoryMapBytes = blockManager.conf.getLong("spark.storage.memoryMapThreshold", 2 * 4096L)
34+
val minMemoryMapBytes = blockManager.conf.getLong(
35+
"spark.storage.memoryMapThreshold", 2 * 1024L * 1024L)
3536

3637
override def getSize(blockId: BlockId): Long = {
3738
diskManager.getFile(blockId.name).length

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ Apart from these, the following properties are also available, and may be useful
678678
</tr>
679679
<tr>
680680
<td><code>spark.storage.memoryMapThreshold</code></td>
681-
<td>8192</td>
681+
<td>2097152</td>
682682
<td>
683683
Size of a block, in bytes, above which Spark memory maps when reading a block from disk.
684684
This prevents Spark from memory mapping very small blocks. In general, memory

0 commit comments

Comments
 (0)