A scikit-learn job runs out of memory on a 64 GB node. What does vertical versus horizontal scaling offer here?
- Exam domain
- Model Development44% of the exam
- Difficulty
- Medium
- In this mock
- 22 questions on this domainPractise this domain
Why the exam asks this
Model Development (44% of the exam)
Objective in the exam guide: Evaluate the trade-offs between vertical and horizontal scaling for machine learning workloads in Databricks environments.
Vertical versus horizontal scaling is named.
Why B is the answer
Only a bigger node helps; more workers need distributed code
Single-node libraries use one machine, so only a bigger node helps them. More workers help when the code is distributed.
Remember: Scale up single-node, out distributed.
How it works
The scaling direction must match how the code runs.
In detail
- Single node: scale up.
- Distributed: scale out.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Horizontal scaling always costs less than verticalWrong
Cost depends on the workload.
B. Only a bigger node helps; more workers need distributed codeRight
Scale up single-node, out distributed.
C. Horizontal scaling, because adding workers automatically splits a single-node scikit-learn fit across themWrongMost tempting
scikit-learn fits do not spread across workers by themselves.
Why it tempts: More workers sounds like more power.
D. Neither helps; out-of-memory errors cannot be fixedWrong
Memory errors are fixable.
Use case
An illustrative scenario, not a real incident.
Illustrative: moving to a 256 GB node fixes the fit; adding workers did nothing.
See it in different ways
flowchart TD
Q{"Is the code distributed?"}
Q -->|"No"| A0["Vertical bigger node"]
Q -->|"Yes"| A1["Horizontal more workers"]How to read this chart
- At "Is the code distributed?": if "No", go to "Vertical bigger node"; if "Yes", go to "Horizontal more workers".
mindmap
root(("Scaling"))
n1["Vertical"]
n2["Bigger node"]
n3["Single-node code"]
n4["Horizontal"]
n5["More nodes"]
n6["Distributed code"]How to read this chart
- The centre is "Scaling".
- "Vertical" covers "Bigger node", "Single-node code".
- "Horizontal" covers "More nodes", "Distributed code".