apache / apache/gluten

[VL] Difference of Spill between Vanilla and Gluten

Open
#6,683 2 comments 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
Scala
Stars
1.6k
Forks
657
Avg merge
2d 14h
Merged PRs (30d)
80

Description

### Description

Here is a summary of difference of Spill policy between Vanilla and Gluten:

• All vanilla spark SQL operators spill support is through external sort
• External sort only spill itself
• External sort will hold all data when it's called
• The spill API in MemoryConsumer
○ Not useful in SparkSQL
• Gluten may spill data before data are cached
○ Hashjoin (already spilled) + sort (parquet write)
○ PR #6480 is essential to Gluten now
• Assume a Sort+sort
○ vanilla sort + vanilla spark: Vanilla spark always spill the 2nd sort
§ PR6480 will break this
○ If both sort are in velox, which one is spilled is decided by Velox
○ Gluten sort + vanilla spark sort. 2nd sort will spill Gluten's sort
○ Vanilla sort + Gluten sort. 2nd sort can't spill Vanilla's sort without PR6480

Contributor guide

Open the contributing guide

Research direction

Start by reading PR #6480 and comparing the Vanilla Spark, Gluten, and Velox spill cases described here. Trace the MemoryConsumer spill API and the sort and hash join scenarios, then establish the intended policy for each Sort+sort combination; the issue does not currently define a concrete completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
data-engineering, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.