Skip to main content
InterviewHubPRO
Section Overview
Q15

Question 15 of 50

Part 2: Core Architecture & Implementation (Mid-Level)

30%
Apache Spark Big Data (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)

What are the memory regions in Spark's Unified Memory Manager?

senior LevelSystem Design

In Simple Words: An Executor's memory is divided into:

  1. Reserved Memory (300 MB): Hardcoded for Spark internal system processes.
  2. User Memory (25% of remaining): Stores user data structures, UDF variables, and metadata.
  3. Spark Memory (75% of remaining):
    • Execution Memory: Used for shuffles, joins, sorts, and aggregations.
    • Storage Memory: Used for cached DataFrames (cache(), persist()) and broadcast variables.
    • Dynamic Borrowing: Execution and Storage can dynamically borrow memory from each other! Execution has priority and can evict storage.