Software Development

What are the pros and cons of Fair Scheduler vs Capacity Scheduler in YARN?

CH Asked by Christopher Reed · 08-11-2023
0 upvotes 15,538 views 0 comments
The question

I am setting up a multi-tenant Hadoop cluster and I need to decide between the Fair Scheduler and the Capacity Scheduler. Our workload is a mix of long-running batch jobs and short, ad-hoc Hive queries. Which one provides better resource guarantees for the Finance team while ensuring that the Data Science team doesn't hog the entire cluster during their model training?

 

3 answers

0
BA
Answered on 10-11-2023

The choice depends on your organizational structure. The Capacity Scheduler is designed for large shared clusters where you want to guarantee a minimum percentage of resources to specific departments (queues). It’s very "strict"—if Finance is guaranteed 30%, they get it, and others only use it if Finance is idle. The Fair Scheduler, on the other hand, aims to give every running application an equal share of resources over time. It’s better for "dynamic" environments. For your mix of batch and ad-hoc queries, the Fair Scheduler with "Preemption" enabled is usually better. It allows a small Hive query to "preempt" or take back resources from a massive Spark job so the user doesn't have to wait two hours for a simple count(*) result. 

0
RO
Answered on 12-11-2023

I’ve heard that Capacity Scheduler is now the default in many distributions like Cloudera. Does the Fair Scheduler have a future in the Hadoop ecosystem, or are we being pushed toward a Capacity-only model for long-term support?

MI 13-11-2023

Robert, you're observant. With the merger of major distributions, the Capacity Scheduler has indeed become the primary focus for enterprise support. However, the core logic of "fair sharing" has been integrated into the newer versions of the Capacity Scheduler via "priority" and "intra-queue" policies. You can effectively mimic Fair Scheduler behavior within a Capacity Scheduler setup now, giving you the best of both worlds.

0
NA
Answered on 15-11-2023

Always monitor your "Vcores" and "Memory" metrics regardless of the scheduler. Even the best scheduler can't help if your team keeps requesting 64GB for every tiny mapper! 

CH 16-11-2023

So true, Nancy! Resource requests are often the real bottleneck. I always suggest setting "Max Resource" limits on the Data Science queue to prevent runaway jobs.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session