A Dask-cuDF job runs close to GPU memory limits during large joins. Which Dask-CUDA feature helps it finish instead of crashing?
- Exam domain
- Data Manipulation and Software Literacy19% of the exam
- Difficulty
- Medium
- In this mock
- 10 questions on this domainPractise this domain
Why the exam asks this
Data Manipulation and Software Literacy (19% of the exam)
Objective in the exam guide: Implementing data parallelism using Dask for multi-GPU scaling
Multi-GPU scaling with Dask includes memory handling.
Why C is the answer
Spilling from device memory to host memory
Dask-CUDA can spill data from GPU memory to host memory when a device memory limit is reached, trading some speed for completing the job.
Remember: Dask-CUDA can spill device memory to host.
How it works
Dask-CUDA supports device memory limits and spilling to host memory.
In detail
- Set a device memory limit.
- Spilling trades speed for stability.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Lower the number of GPUs to one so the scheduler has fewer devices to trackWrongMost tempting
Fewer GPUs means less memory.
Why it tempts: Fewer devices sounds simpler.
B. Disable all partitioningWrong
Partitions are how data fits.
C. Spilling from device memory to host memoryRight
Dask-CUDA can spill device memory to host.
D. Converting columns to Python objectsWrong
Python objects use more memory and run on CPU.
Use case
An illustrative scenario, not a real incident.
Illustrative: with spilling enabled, a join that crashed at 95% memory finishes 20% slower.
See it in different ways
stateDiagram-v2 state "Normal" as s0 state "Near limit" as s1 state "Spilling" as s2 state "Completed" as s3 [*] --> s0 s0 --> s1: large join s1 --> s2: device limit reached s2 --> s3 s3 --> [*]
How to read this chart
- It starts at "Normal".
- From "Normal", "large join" moves it to "Near limit".
- From "Near limit", "device limit reached" moves it to "Spilling".
- From "Spilling", it moves to "Completed".
- It ends at "Completed".
flowchart TD
Q{"Can you add GPUs?"}
Q -->|"Yes"| A0["Add workers"]
Q -->|"No"| A1["Enable spilling, reduce partition size"]How to read this chart
- At "Can you add GPUs?": if "Yes", go to "Add workers"; if "No", go to "Enable spilling, reduce partition size".