From 6790908b119484be88dec47bd833bd78e27ec516 Mon Sep 17 00:00:00 2001 From: Shivaram Venkataraman Date: Thu, 2 Aug 2012 12:05:05 -0700 Subject: [PATCH] Use maxMemory to better estimate memory available for BlockManager cache --- core/src/main/scala/spark/storage/BlockManager.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/spark/storage/BlockManager.scala b/core/src/main/scala/spark/storage/BlockManager.scala index 5067601198..cde74e5805 100644 --- a/core/src/main/scala/spark/storage/BlockManager.scala +++ b/core/src/main/scala/spark/storage/BlockManager.scala @@ -580,6 +580,6 @@ class BlockManager(val master: BlockManagerMaster, val serializer: Serializer, m object BlockManager { def getMaxMemoryFromSystemProperties(): Long = { val memoryFraction = System.getProperty("spark.storage.memoryFraction", "0.66").toDouble - (Runtime.getRuntime.totalMemory * memoryFraction).toLong + (Runtime.getRuntime.maxMemory * memoryFraction).toLong } }