The document discusses Mesos and YARN, two resource management systems for shared clusters. Mesos acts as a common resource sharing layer that allows multiple frameworks like Hadoop and Spark to run on the same cluster. It uses a distributed scheduler and offers resources to frameworks in order to maximize utilization while supporting diverse applications. YARN is also a resource management system but has a different design than Mesos. The document explores challenges in scheduling multiple resource types like CPUs and memory across frameworks in a fair manner.
Hadoop Summit San Jose 2015: Towards SLA-based Scheduling on YARN Clusters Sumeet Singh
In this talk, we look at YARN scheduler choices available today for Apache Hadoop 2 and discuss their pros and cons. We dive deeper into Capacity Scheduler by providing a comprehensive overview of its various settings with examples from real large-scale Hadoop clusters to promoter a broader understanding of schedulers’ current state and best practices in place today when it comes to queue nomenclature, planning, allocations, and ongoing management. We present detailed cluster, queue, and job behaviors from several different capacity management philosophies.
We then propose practical solutions without any change to the scheduler or core Hadoop that allows managing queue creations and capacity allocations while optimizing for cluster utilization and maintaining SLA guarantees. A unified queue nomenclature, admission and capacity re-allocation policies across BUs, applications, and clusters make service automation possible. Transparency in resources consumed allows for defining realistic SLA expectation. Finally, consistent application tagging completes the feedback loop with SLAs observed through application level reporting.
Dominant resource fairness fair allocation of multiple resource typesanet18
DRF algorithm provides fair resource allocation in a system containing different resource types. Dominant Resource Fairness (DRF), is a generalization of max-min fairness to multiple resource types. This algorithm is used in resource allocation of hadoop cluster.
Hadoop Summit - Scheduling policies in YARN - San Jose 2016Wangda Tan
For a long time, YARN has supported scheduling policies and resource types required for batch applications. Allocation policies based on node, and rack locality combined with memory and cpu resource types allowed batch applications to express their requirements. As existing workloads evolve, and new workloads are executed on YARN, these policies and resource types are no longer sufficient. Allowing diverse workloads on YARN requires allowing applications to express diverse scheduling policies and allowing clusters to schedule based on arbitrary resource types. This talk will focus on work in the YARN community to allow applications to express fine grained scheduling concepts such as affinity and anti-affinity, fallback policies, and enhancements to the existing node labels support. In addition, it will focus on work to add support for arbitrary resource types which would allow administrators to add new resource types to the scheduler. It will also touch upon resource profiles, which will make it easier for users to express resource requirements.
Computer Architecture Formulas1. CPU time = Instru.docxzollyjenkins
Computer Architecture Formulas
1. CPU time = Instruction count ! Clock cycles per instruction ! Clock cycle time
2. X is n times faster than Y: n =
3. Amdahl’s Law: Speedupoverall = =
4.
5.
6.
7. Availability = Mean time to fail / (Mean time to fail + Mean time to repair)
8.
where Wafer yield accounts for wafers that are so bad they need not be tested and is a parameter called
the process-complexity factor, a measure of manufacturing difficulty. ranges from 11.5 to 15.5 in 2011.
9. Means—arithmetic (AM), weighted arithmetic (WAM), and geometric (GM):
AM = WAM = GM =
where Timei is the execution time for the ith program of a total of n in the workload, Weighti is the
weighting of the ith program in the workload.
10. Average memory-access time = Hit time + Miss rate ! Miss penalty
11. Misses per instruction = Miss rate ! Memory access per instruction
12. Cache index size: 2index = Cache size /(Block size ! Set associativity)
13. Power Utilization Effectiveness (PUE) of a Warehouse Scale Computer =
Rules of Thumb
1. Amdahl/Case Rule: A balanced computer system needs about 1 MB of main memory capacity and 1
megabit per second of I/O bandwidth per MIPS of CPU performance.
2. 90/10 Locality Rule: A program executes about 90% of its instructions in 10% of its code.
3. Bandwidth Rule: Bandwidth grows by at least the square of the improvement in latency.
4. 2:1 Cache Rule: The miss rate of a direct-mapped cache of size N is about the same as a two-way set-
associative cache of size N/2.
5. Dependability Rule: Design with no single point of failure.
6. Watt-Year Rule: The fully burdened cost of a Watt per year in a Warehouse Scale Computer in North
America in 2011, including the cost of amortizing the power and cooling infrastructure, is about $2.
Execution timeY Execution timeX/ PerformanceX PerformanceY/=
Execution timeold
Execution timenew
-------------------------------------------
1
1 Fractionenhanced–# )
Fractionenhanced
Speedupenhanced
------------------------------------+
---------------------------------------------------------------------------------------------
Energydynamic 1 2/ Capacitive load Voltage
2
!!
Powerdynamic 1 2/ Capacitive load! Voltage
2 Frequency switched! !
Powerstatic Currentstatic Voltage!
Die yield Wafer yield 1 1 Defects per unit area Die area!+ )(/ N!=
1
n
--- Timei
i 1=
n
Weighti Timei!
i 1=
n n
Timei
i 1=
n
Total Facility Power
IT Equipment Power
--------------------------------------------------
(
N
N
In Praise of Computer Architecture: A Quantitative Approach
Sixth Edition
“Although important concepts of architecture are timeless, this edition has been
thoroughly updated with the latest technology developments, costs, examples,
and references. Keeping pace with recent developments in open-sourced architec-
ture, the instruction set architecture used in the book has been updated to use the
RISC-V ISA.”
—from the foreword by Norman P. Jouppi, Google
“.
This Presentation was prepared by Abdussamad Muntahi for the Seminar on High Performance Computing on 11/7/13 (Thursday) Organized by BRAC University Computer Club (BUCC) in collaboration with BRAC University Electronics and Electrical Club (BUEEC).
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Accelerate your Kubernetes clusters with Varnish Caching
Mesos and YARN
1. Mesos and YARN
Amir H. Payberah
amir@sics.se
Amirkabir University of Technology
(Tehran Polytechnic)
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 1 / 49
2. Motivation
Rapid innovation in cloud computing.
No single framework optimal for all applications.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 2 / 49
3. Motivation
Rapid innovation in cloud computing.
No single framework optimal for all applications.
Running each framework on its dedicated cluster:
• Expensive
• Hard to share data
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 2 / 49
5. Proposed Solution
Running multiple frameworks on a single cluster
Maximize utilization
Share data between frameworks
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 3 / 49
6. Two Resource Management Systems ...
Mesos
YARN
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 4 / 49
7. Two Resource Management Systems ...
Mesos
YARN
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 4 / 49
8. Mesos
Mesos
A common resource sharing layer, over which diverse
frameworks can run
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 5 / 49
9. Mesos
Mesos
A common resource sharing layer, over which diverse
frameworks can run
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 5 / 49
10. Mesos Goals
High utilization of resources
Support diverse frameworks (current and future)
Scalability to 10,000’s of nodes
Reliability in face of failures
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 6 / 49
11. Computation Model
A framework (e.g., Hadoop, Spark) manages and runs one or more
jobs.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 7 / 49
12. Computation Model
A framework (e.g., Hadoop, Spark) manages and runs one or more
jobs.
A job consists of one or more tasks.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 7 / 49
13. Computation Model
A framework (e.g., Hadoop, Spark) manages and runs one or more
jobs.
A job consists of one or more tasks.
A task (e.g., map, reduce) consists of one or more processes running
on same machine.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 7 / 49
14. Computation Model
A framework (e.g., Hadoop, Spark) manages and runs one or more
jobs.
A job consists of one or more tasks.
A task (e.g., map, reduce) consists of one or more processes running
on same machine.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 7 / 49
16. Fine-Grained Sharing
Allocation at the level of tasks within a job.
Improves utilization, latency, and data locality.
Coarse-grained sharing Fine-grained sharing
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 9 / 49
17. Resource Offer
Offer available resources to frameworks, let them pick which re-
sources to use and which tasks to launch.
Keeps Mesos simple, lets it support future frameworks.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 10 / 49
18. Question?
How to schedule resource offering among frameworks?
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 11 / 49
20. Global Scheduler (1/2)
Job requirements
• Response time
• Throughput
• Availability
Job execution plan
• Task DAG
• Inputs/outputs
Estimates
• Task duration
• Input sizes
• Transfer sizes
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 13 / 49
21. Global Scheduler (2/2)
Advantages
• Can achieve optimal schedule.
Disadvantages
• Complexity: hard to scale and ensure resilience.
• Hard to anticipate future frameworks requirements.
• Need to refactor existing frameworks.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 14 / 49
23. Distributed Scheduler (2/3)
Unit of allocation: resource offer
• Vector of available resources on a node
• For example, node1: 1CPU, 1GB , node2: 4CPU, 16GB
Master sends resource offers to frameworks.
Frameworks select which offers to accept and which tasks to run.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 16 / 49
24. Distributed Scheduler (3/3)
Advantages
• Simple: easier to scale and make resilient.
• Easy to port existing frameworks, support new ones.
Disadvantages
• Distributed scheduling decision: not optimal.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 17 / 49
25. Mesos Architecture (1/4)
Slaves continuously send status updates about resources to the Master.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 18 / 49
26. Mesos Architecture (2/4)
Pluggable scheduler picks framework to send an offer to.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 19 / 49
27. Mesos Architecture (3/4)
Framework scheduler selects resources and provides tasks.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 20 / 49
29. Question?
How to allocate resources of different types?
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 22 / 49
30. Single Resource: Fair Sharing
n users want to share a resource, e.g., CPU.
• Solution: allocate each 1
n of the shared resource.
CPU
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 23 / 49
31. Single Resource: Fair Sharing
n users want to share a resource, e.g., CPU.
• Solution: allocate each 1
n of the shared resource.
CPU
Generalized by max-min fairness.
• Handles if a user wants less than its fair share.
• E.g., user 1 wants no more than 20%.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 23 / 49
32. Single Resource: Fair Sharing
n users want to share a resource, e.g., CPU.
• Solution: allocate each 1
n of the shared resource.
CPU
Generalized by max-min fairness.
• Handles if a user wants less than its fair share.
• E.g., user 1 wants no more than 20%.
Generalized by weighted max-min fairness.
• Give weights to users according to importance.
• E.g., user 1 gets weight 1, user 2 weight 2.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 23 / 49
33. Max-Min Fairness
1 resource: CPU
Total resources: 20 CPU
User 1 has x tasks and wants 1CPU per task
User 2 has y tasks and wants 2CPU per task
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 24 / 49
34. Max-Min Fairness
1 resource: CPU
Total resources: 20 CPU
User 1 has x tasks and wants 1CPU per task
User 2 has y tasks and wants 2CPU per task
max(x, y) (maximize allocation)
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 24 / 49
35. Max-Min Fairness
1 resource: CPU
Total resources: 20 CPU
User 1 has x tasks and wants 1CPU per task
User 2 has y tasks and wants 2CPU per task
max(x, y) (maximize allocation)
subject to
x + 2y ≤ 20 (CPU constraint)
x = 2y
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 24 / 49
36. Max-Min Fairness
1 resource: CPU
Total resources: 20 CPU
User 1 has x tasks and wants 1CPU per task
User 2 has y tasks and wants 2CPU per task
max(x, y) (maximize allocation)
subject to
x + 2y ≤ 20 (CPU constraint)
x = 2y
so
x = 10
y = 5
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 24 / 49
37. Why is Fair Sharing Useful?
Proportional allocation: user 1 gets weight 2, user 2 weight 1.
Priorities: give user 1 weight 1000, user 2 weight 1.
Reservations: ensure user 1 gets 10% of a resource, so give user 1
weight 10, sum weights ≤ 100.
Isolation policy: users cannot affect others beyond their fair share.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 25 / 49
38. Properties of Max-Min Fairness
Share guarantee
• Each user can get at least 1
n of the resource.
• But will get less if her demand is less.
Strategy proof
• Users are not better off by asking for more than they need.
• Users have no reason to lie.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 26 / 49
39. Properties of Max-Min Fairness
Share guarantee
• Each user can get at least 1
n of the resource.
• But will get less if her demand is less.
Strategy proof
• Users are not better off by asking for more than they need.
• Users have no reason to lie.
Max-Min fairness is the only reasonable mechanism with these two
properties.
Widely used: OS, networking, datacenters, ...
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 26 / 49
40. Question?
When is Max-Min Fairness NOT Enough?
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 27 / 49
41. Question?
When is Max-Min Fairness NOT Enough?
Need to schedule multiple, heterogeneous resources, e.g.,
CPU, memory, etc.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 27 / 49
42. Problem
Single resource example
• 1 resource: CPU
• User 1 wants 1CPU per task
• User 2 wants 2CPU per task
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 28 / 49
43. Problem
Single resource example
• 1 resource: CPU
• User 1 wants 1CPU per task
• User 2 wants 2CPU per task
Multi-resource example
• 2 resources: CPUs and mem
• User 1 wants 1CPU, 4GB per task
• User 2 wants 2CPU, 1GB per task
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 28 / 49
44. Problem
Single resource example
• 1 resource: CPU
• User 1 wants 1CPU per task
• User 2 wants 2CPU per task
Multi-resource example
• 2 resources: CPUs and mem
• User 1 wants 1CPU, 4GB per task
• User 2 wants 2CPU, 1GB per task
• What is a fair allocation?
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 28 / 49
45. A Natural Policy (1/2)
Asset fairness: give weights to resources (e.g., 1 CPU = 1 GB) and
equalize total value given to each user.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 29 / 49
46. A Natural Policy (1/2)
Asset fairness: give weights to resources (e.g., 1 CPU = 1 GB) and
equalize total value given to each user.
Total resources: 28 CPU and 56GB RAM (e.g., 1 CPU = 2 GB)
• User 1 has x tasks and wants 1CPU, 2GB per task
• User 2 has y tasks and wants 1CPU, 4GB per task
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 29 / 49
47. A Natural Policy (1/2)
Asset fairness: give weights to resources (e.g., 1 CPU = 1 GB) and
equalize total value given to each user.
Total resources: 28 CPU and 56GB RAM (e.g., 1 CPU = 2 GB)
• User 1 has x tasks and wants 1CPU, 2GB per task
• User 2 has y tasks and wants 1CPU, 4GB per task
Asset fairness yields:
max(x, y)
x + y ≤ 28
2x + 4y ≤ 56
4x = 6y
User 1: x = 12: 43%CPU, 43%GB ( = 86%)
User 2: y = 8: 28%CPU, 57%GB ( = 86%)
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 29 / 49
48. A Natural Policy (2/2)
Problem: violates share grantee.
User 1 gets less than 50% of both CPU and RAM.
Better off in a separate cluster with half the resources.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 30 / 49
49. Challenge
Can we find a fair sharing policy that provides:
• Share guarantee
• Strategy-proofness
Can we generalize max-min fairness to multiple resources?
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 31 / 49
51. Dominant Resource Fairness (DRF) (1/2)
Dominant resource of a user: the resource that user has the biggest
share of.
• Total resources: 8CPU, 5GB
• User 1 allocation: 2CPU, 1GB
2
8 = 25%CPU and 1
5 = 20%RAM
• Dominant resource of User 1 is CPU (25% > 20%)
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 33 / 49
52. Dominant Resource Fairness (DRF) (1/2)
Dominant resource of a user: the resource that user has the biggest
share of.
• Total resources: 8CPU, 5GB
• User 1 allocation: 2CPU, 1GB
2
8 = 25%CPU and 1
5 = 20%RAM
• Dominant resource of User 1 is CPU (25% > 20%)
Dominant share of a user: the fraction of the dominant resource she
is allocated.
• User 1 dominant share is 25%.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 33 / 49
53. Dominant Resource Fairness (DRF) (2/2)
Apply max-min fairness to dominant shares: give every user an equal
share of her dominant resource.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 34 / 49
54. Dominant Resource Fairness (DRF) (2/2)
Apply max-min fairness to dominant shares: give every user an equal
share of her dominant resource.
Equalize the dominant share of the users.
• Total resources: 9CPU, 18GB
• User 1 wants 1CPU, 4GB ; Dominant resource: RAM 1
9 < 4
18
• User 2 wants 3CPU, 1GB ; Dominant resource: CPU 3
9 > 1
18
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 34 / 49
55. Dominant Resource Fairness (DRF) (2/2)
Apply max-min fairness to dominant shares: give every user an equal
share of her dominant resource.
Equalize the dominant share of the users.
• Total resources: 9CPU, 18GB
• User 1 wants 1CPU, 4GB ; Dominant resource: RAM 1
9 < 4
18
• User 2 wants 3CPU, 1GB ; Dominant resource: CPU 3
9 > 1
18
max(x, y)
x + 3y ≤ 9
4x + y ≤ 18
4x
18 = 3y
9
User 1: x = 3: 33%CPU, 66%GB
User 2: y = 2: 66%CPU, 16%GB
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 34 / 49
56. Online DRF Scheduler
Whenever there are available resources and tasks to run:
Schedule a task to the user with the smallest dominant share.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 35 / 49
57. Two Resource Management Systems ...
Mesos
YARN
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 36 / 49
59. YARN Architecture
Resource Manager (RM)
Application Master (AM)
Node Manager (NM)
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 38 / 49
60. YARN Architecture - Resource Manager (1/2)
One per cluster
• Central: global view
• Enable global properties
• Fairness, capacity, locality
Job requests are submitted to RM.
• To start a job (application), RM finds a container to spawn AM.
Container
• Logical bundle of resources (CPU/memory).
No static resource partitioning.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 39 / 49
61. YARN Architecture - Resource Manager (2/2)
Only handles an overall resource profile for each application.
• Local optimization is up to the application.
Preemption
• Request resources back from an application.
• Checkpoint snapshot instead of explicitly killing jobs / migrate
computation to other containers.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 40 / 49
62. YARN Architecture - Application Manager (1/2)
The head of a job.
Runs as a container.
Request resources from RM.
• # of containers/resource per container/locality ...
Dynamically changing resource consumption,
based on the containers it receives from the RM.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 41 / 49
63. YARN Architecture - Application Manager (2/2)
Requests are late-binding.
• The process spawned is not bound to the request, but to the lease.
• The conditions that caused the AM to issue the request may not
remain true when it receives its resources.
Can run any user code, e.g., MapReduce, Spark, etc.
AM determines the semantics of the success or failure of the con-
tainer.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 42 / 49
64. YARN Architecture - Node Manager (1/2)
The worker daemon.
Registers with RM.
One per node.
Report resources to RM: memory, CPU, ...
Containers are described by a Container Launch Context (CLC).
• The command necessary to create the process
• Environment variables
• Security tokens
• ...
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 43 / 49
65. YARN Architecture - Node Manager (2/2)
Configure the environment for task execution.
Garbage collection.
Auxiliary services.
• A process may produce data that persist beyond the life of the
container.
• Output intermediate data between map and reduce tasks.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 44 / 49
66. YARN Framework (1/2)
Submitting the application: passing a CLC for the AM to the RM.
When RM starts the AM, it should register with the RM.
• Periodically advertise its liveness and requirements over the
heartbeat protocol.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 45 / 49
67. YARN Framework (2/2)
Once the RM allocates a container, AM can construct a CLC to
launch the container on the corresponding NM.
• It monitors the status of the running container and stop it when the
resource should be reclaimed.
Once the AM is done with its work, it should unregister from the
RM and exit cleanly.
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 46 / 49
68. Mesos vs. YARN
Similarities:
• Both have schedulers at two levels.
Differences:
• Mesos is an offer-based resource manager, whereas YARN has a
request-based approach.
• Mesos uses framework schedulers for inter-job scheduling, whereas
YARN uses per-job optimization through AM (however, per-job AM
has higher overhead compare to Mesos).
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 47 / 49
69. Summary
Resource management: Mesos and YARN
Mesos
• Offered-based
• Max-Min fairness: DRF
YARN
• Request-based
• RM, AM, NM
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 48 / 49
70. Questions?
Acknowledgements
Some slides were derived from Ion Stoica and Ali Ghodsi slides
(Berkeley University), and Wei-Chiu Chuang slides (Purdue University).
Amir H. Payberah (Tehran Polytechnic) Mesos and YARN 1393/9/15 49 / 49