Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Aug 23, 2024
1 parent 185fa65 commit c924c22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cpp/core/config/GlutenConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const std::string kIgnoreMissingFiles = "spark.sql.files.ignoreMissingFiles";

const std::string kDefaultSessionTimezone = "spark.gluten.sql.session.timeZone.default";

const std::string kSparkOverheadMemory = "spark.gluten.memoryOverhead.size.in.bytes";

const std::string kSparkOffHeapMemory = "spark.gluten.memory.offHeap.size.in.bytes";

const std::string kSparkTaskOffHeapMemory = "spark.gluten.memory.task.offHeap.size.in.bytes";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ object SparkResourceUtil extends Logging {
}

def getMemoryOverheadSize(conf: SparkConf): Long = {
conf.get(EXECUTOR_MEMORY_OVERHEAD).getOrElse {
val overheadMib = conf.get(EXECUTOR_MEMORY_OVERHEAD).getOrElse {
val executorMemMib = conf.get(EXECUTOR_MEMORY)
val factor =
conf.getDouble("spark.executor.memoryOverheadFactor", 0.1D)
val minMib = conf.getLong("spark.executor.minMemoryOverhead", 384L)
ByteUnit.MiB.toBytes((executorMemMib * factor).toLong max minMib)
(executorMemMib * factor).toLong max minMib
}
ByteUnit.MiB.toBytes(overheadMib)
}
}

0 comments on commit c924c22

Please sign in to comment.