Ben Chuanlong Du's Blog

It is never too late to learn.

Memory in JVM

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Stack, heap and off-heap are all memory that stored in a computer's RAM.

Stack

Stack is used for static memory allocation. Variables allocated on the stack are stored directly to the …

Spark Issue: IllegalArgumentException: System Memory Must Be At Least

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Symptom

Exception in thread "main" java.lang.IllegalArgumentException: System memory 466092032 must be at least 471859200. Please increase heap size using the --driver-memory option or spark.driver.memory in Spark configuration …

Spark Issue: High Disk and Memory Spill When Doing Shuffle

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Symtom

High disk and memory spill when doing shuffle.

Cause

Insufficient executor memory (you can monitor this spill metrics from Spark UI).

Solution

  1. Increase executor memory.

    --executor-memory=4G
    
  2. For jobs that …