SlideShare a Scribd company logo
1 of 35
Download to read offline
© 2016 Mesosphere, Inc. All Rights Reserved. 1
FRAMEWORKS IN HARMONY
MesosCon 2016
© 2016 Mesosphere, Inc. All Rights Reserved. 2
BRENDEN MATTHEWS
Engineer
Core Mesos committer, contributor to numerous Mesos
frameworks, and various other projects in the Mesos
ecosystem. He spends his free time contemplating
existentialism, cooking steak, and craigslist furniture hacking.
@brndnmtthws
VISHNU MOHAN
Solutions Engineer
Works closely with customers in the field on Performance and
Automation. When he’s not analyzing sandbox logs or coding
against some API for fun, he may be found rock climbing,
hiking, running or scuba diving.
@vm_mesos
© 2016 Mesosphere, Inc. All Rights Reserved. 3
AGENDA
MesosCon 2016:
Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 4
● Problem Definition, Motivations and Applications
● Intro to Roles, Weights, Quotas, Reservations, Revocation & Oversubscription
● Theory
● Dominant Resource Fairness (DRF)
● Hierarchical Dominant Resource Fairness (H-DRF)
● Mesos Quotas
● Scenarios and putting it all together
● Demo on
AGENDA
MesosCon 2016: Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 5
MOTIVATIONS/
APPLICATIONS
MesosCon 2016:
Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 6
MOTIVATIONS
Running multiple environments on one
cluster
Guaranteeing resource availability
APPLICATIONS
Multitenancy
Isolation
Introducing new frameworks
MOTIVATIONS/APPLICATIONS
MesosCon 2016: Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 7
DEFINITIONS
MesosCon 2016:
Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 8
ROLES
A method of identifying frameworks for use with
reservations, auth, ACLs, and other Mesos features.
WEIGHTS
Control the relative share of resources that is
offered to different roles
INVERSE OFFERS
Mechanism to reclaim resources for maintenance,
reallocation and pre-emption
DEFINITIONS
MesosCon 2016: Frameworks in Harmony
RESERVATIONS
Mechanism to reserve resources on specific agents
(Static and Dynamic)
QUOTAS
Lay away resources for consumption via cluster-
wide dynamic reservation
OVERSUBSCRIPTION
Temporarily take advantage of unused resources
© 2016 Mesosphere, Inc. All Rights Reserved. 9
DOMINANT
RESOURCE
FAIRNESS
(DRF)
MesosCon 2016:
Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 10
DRF
Core resource allocation algorithm for
Mesos
Generalization of Max-Min Fairness to
multiple resources
WHY MAX-MIN FAIRNESS?
Generality
Ability to provide performance isolation
https://www.cs.berkeley.edu/~alig/papers/drf.pdf
WEIGHTED MAX-MIN FAIRNESS
Priority
Reservation
Deadline-Based Allocation
User is guaranteed to receive her fair
share irrespective of the demands of
others
Applicable to a wide variety of resources
DOMINANT RESOURCE FAIRNESS
MesosCon 2016: Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 11
DRF CORE CONCEPTS
In a multi-resource environment, the
allocation of a user should be
determined by the user’s “dominant
share”, which is the maximum share that
the user has been allocated of any
resource
DRF then seeks to maximize the
minimum dominant share across all
users
DRF CORE PROPERTIES
Sharing Incentive
Strategy Proofness
Pareto Efficiency
Envy Freeness
NICE-TO-HAVE PROPERTIES
Single Resource Fairness
Bottleneck Fairness
Population Monotonicity
Resource Monotonicity
DOMINANT RESOURCE FAIRNESS contd.
MesosCon 2016: Frameworks in Harmony
© 2015 Mesosphere, Inc. All Rights Reserved. 12
EXAMPLE
Total Capacity: 9 CPUs, 18 GB RAM
ROLE A
<1 CPU, 4 GB>, Dominant Resource: Mem
<x CPU, 4x GB>, Dominant Share: 2/9 (i.e., 4/18)
ROLE B
<3 CPUs, 1 GB>, Dominant Resource: CPU
<3y CPU, y GB>, Dominant Share: 1/3 (i.e., 3/9)
DRF IN ACTION
MesosCon 2016: Frameworks In Harmony
SOLUTION
x = 3, y = 2
© 2015 Mesosphere, Inc. All Rights Reserved. 13
DRF IN ACTION contd.
MesosCon 2016: Frameworks In Harmony
© 2015 Mesosphere, Inc. All Rights Reserved. 14
DRF ALLOCATION SCHEDULE (Quantum 1)
MesosCon 2016: Frameworks in Harmony
Schedule
Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB>
CPU
Total Alloc.
RAM
Total Alloc.
res. shares dom. share res. shares dom. share
Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18
© 2015 Mesosphere, Inc. All Rights Reserved. 15
DRF ALLOCATION SCHEDULE (Quantum 2)
MesosCon 2016: Frameworks in Harmony
Schedule
Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB>
CPU
Total Alloc.
RAM
Total Alloc.
res. shares dom. share res. shares dom. share
Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18
Role A <1/9, 4/18> 2/9 <3/9, 1/18> 1/3 4/9 5/18
© 2015 Mesosphere, Inc. All Rights Reserved. 16
DRF ALLOCATION SCHEDULE (Quantum 3)
MesosCon 2016: Frameworks in Harmony
Schedule
Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB>
CPU
Total Alloc.
RAM
Total Alloc.
res. shares dom. share res. shares dom. share
Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18
Role A <1/9, 4/18> 2/9 <3/9, 1/18> 1/3 4/9 5/18
Role A <2/9, 8/18> 4/9 <3/9, 1/18> 1/3 5/9 9/18
© 2015 Mesosphere, Inc. All Rights Reserved. 17
DRF ALLOCATION SCHEDULE (Quantum 4)
MesosCon 2016: Frameworks in Harmony
Schedule
Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB>
CPU
Total Alloc.
RAM
Total Alloc.
res. shares dom. share res. shares dom. share
Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18
Role A <1/9, 4/18> 2/9 <3/9, 1/18> 1/3 4/9 5/18
Role A <2/9, 8/18> 4/9 <3/9, 1/18> 1/3 5/9 9/18
Role B <2/9, 8/18> 4/9 <6/9, 2/18> 2/3 8/9 10/18
© 2015 Mesosphere, Inc. All Rights Reserved. 18
DRF ALLOCATION SCHEDULE (Quantum 5) - CPU Maxed Out
MesosCon 2016: Frameworks in Harmony
Schedule
Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB>
CPU
Total Alloc.
RAM
Total Alloc.
res. shares dom. share res. shares dom. share
Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18
Role A <1/9, 4/18> 2/9 <3/9, 1/18> 1/3 4/9 5/18
Role A <2/9, 8/18> 4/9 <3/9, 1/18> 1/3 5/9 9/18
Role B <2/9, 8/18> 4/9 <6/9, 2/18> 2/3 8/9 10/18
Role A <3/9, 12/18> 2/3 <6/9, 2/18> 2/3 1 14/18
© 2015 Mesosphere, Inc. All Rights Reserved. 19
DRF ALLOCATION AND RESOURCE CONSUMPTION
MesosCon 2016: Frameworks In Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 20
HIERARCHICAL
DOMINANT
RESOURCE
FAIRNESS
(H-DRF)
https://www.cs.berkeley.edu/~alig/papers/h-drf.pdf
MesosCon 2016:
Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 21
MESOS
ROLES
MesosCon 2016:
Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 22
USE CASES
● Ensuring that resources on a particular agent are only offered to a particular
framework
● Partitioning a cluster between organizations: resources reserved for use by
Organization A will only be offered to frameworks that have registered using
Organization A’s role (also, Reservations)
● Expressing that one group of frameworks has “higher priority” (and offered more
resources) than another group of frameworks (also, Weights)
● Setting a guaranteed resource allocation for one or more frameworks belonging
to a role (also, Quotas)
● Ensuring that persistent volumes created by one framework are not offered to
frameworks registered with a different role
MESOS ROLES
MesosCon 2016: Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 23
MESOS
QUOTAS
MesosCon 2016:
Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 24
QUOTA
Quotas are a mechanism for dynamically
reserving resources.
WHY QUOTA?
DRF may offer resources to frameworks
beyond their fair share. Operators can
use quotas to ensure that frameworks
always receive enough resources.
MESOS QUOTAS
MesosCon 2016: Frameworks in Harmony
QUOTA CORE CONCEPTS
Quotas provide a mechanism for
guaranteeing resources for roles.
Frameworks may register with that role,
and will be allocated at least the
specified amount of resources for that
role.
In other words, quotas are an
implementation of cluster-wide dynamic
resource reservations by role.
© 2016 Mesosphere, Inc. All Rights Reserved.
LIMITATIONS
Can’t specify granularity or constraints
(e.g., can’t distribute resources evenly
across fault domains).
Cannot update an existing quota (must
be removed and re-added).
The current implementation is both the
minimum and the limit. No more offers
will be sent once all reserved resources
are allocated for that role.
25
QUOTA FEATURES
Minimum Guarantee
Dynamically Allocated
Configured at Runtime
Applies Per Role
Cluster-wide
Easy Reasoning
Complementary to Dynamic Reservations
MESOS QUOTAS contd.
MesosCon 2016: Frameworks in Harmony
© 2015 Mesosphere, Inc. All Rights Reserved. 26
QUOTA USAGE
MesosCon 2016: Frameworks in Harmony
core@ip-10-0-6-151 ~ $ curl -d '{"role":"myRole","guarantee":[{"name":"cpus","
type":"SCALAR","scalar":{"value":1}},{"name":"mem","type":"SCALAR","scalar":
{"value":100}}]}' -X POST http://master.mesos:5050/quota
core@ip-10-0-6-151 ~ $ curl http://master.mesos:5050/quota
{"infos":[{"guarantee":[{"name":"cpus","role":"*","scalar":{"value":1.0},"
type":"SCALAR"},{"name":"mem","role":"*","scalar":{"value":100.0},"type":"
SCALAR"}],"role":"myRole"}]}
core@ip-10-0-6-151 ~ $ curl -X DELETE http://master.mesos:5050/quota/myRole
core@ip-10-0-6-151 ~ $ curl http://master.mesos:5050/quota
{}
© 2016 Mesosphere, Inc. All Rights Reserved. 27
DEMO!
MesosCon 2016:
Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 28
CONCLUSIONS
& FUTURE
WORK
MesosCon 2016:
Frameworks in Harmony
© 2016 Mesosphere, Inc. All Rights Reserved. 29
Q&A
MesosCon 2016:
Frameworks in Harmony
Thursday, 11:00am: Quota: Reliable
Guarantees - Jörg Schad & Joris Van
Remoortere, Mesosphere - Grand Mesa A,
http://sched.co/6jtn
Thursday, 12:00pm: Maintenance:
Automating Collaboration Between
Frameworks and Operators - Joseph Wu,
Mesosphere - Chasm Creek (this room),
http://sched.co/6jtt
Thursday, 2:00pm: Resource Allocation in
Apache Mesos: Present and Future -
Benjamin Mahler, Mesosphere - Grand
Mesa A, http://sched.co/6jtm
© 2016 Mesosphere, Inc. All Rights Reserved. 30
VISIT OUR BOOTH
Located at D1, near the main entrance
Learn more by visiting dcos.io and mesosphere.com
Vishnu’s Office Hours
Thursday 10-12:50pm
© 2016 Mesosphere, Inc. All Rights Reserved. 31
Charlie
© 2016 Mesosphere, Inc. All Rights Reserved. 32
Charlie
© 2016 Mesosphere, Inc. All Rights Reserved. 33
Charlie
© 2016 Mesosphere, Inc. All Rights Reserved. 34
References
MesosCon 2016:
Frameworks in Harmony
DRF: https://www.cs.berkeley.edu/~alig/papers/drf.pdf
H-DRF: http://www.cs.berkeley.edu/~alig/papers/h-drf.pdf
https://www.usenix.org/conference/nsdi11/dominant-resource-fairness-fair-
allocation-multiple-resource-types
Mesos Docs:
https://www.cs.berkeley.edu/~alig/papers/mesos.pdf
https://mesos.apache.org/documentation/latest/roles/
https://mesos.apache.org/documentation/latest/weights/
https://mesos.apache.org/documentation/latest/attributes-resources/
https://mesos.apache.org/documentation/latest/reservation/
https://mesos.apache.org/documentation/latest/quota/
https://mesos.apache.org/documentation/latest/oversubscription/
n-level Hierarchies: https://issues.apache.org/jira/browse/MESOS-1763
© 2016 Mesosphere, Inc. All Rights Reserved.
THANK YOU!
Slides: http://sched.co/6ju7
35

More Related Content

Similar to MesosCon 2016: Frameworks in Harmony

Kubernetes One-Click Deployment: Hands-on Workshop (Munich)
Kubernetes One-Click Deployment: Hands-on Workshop (Munich)Kubernetes One-Click Deployment: Hands-on Workshop (Munich)
Kubernetes One-Click Deployment: Hands-on Workshop (Munich)
QAware GmbH
 
Highly efficient container orchestration and continuous delivery with DC/OS a...
Highly efficient container orchestration and continuous delivery with DC/OS a...Highly efficient container orchestration and continuous delivery with DC/OS a...
Highly efficient container orchestration and continuous delivery with DC/OS a...
Christian Bogeberg
 
[DO16] Mesosphere : Microservices meet Fast Data on Azure
[DO16] Mesosphere : Microservices meet Fast Data on Azure [DO16] Mesosphere : Microservices meet Fast Data on Azure
[DO16] Mesosphere : Microservices meet Fast Data on Azure
de:code 2017
 

Similar to MesosCon 2016: Frameworks in Harmony (20)

Modern Container Orchestration (Without Breaking the Bank)
Modern Container Orchestration (Without Breaking the Bank)Modern Container Orchestration (Without Breaking the Bank)
Modern Container Orchestration (Without Breaking the Bank)
 
Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...
Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...
Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...
 
Container Orchestration Wars (Micro Edition)
Container Orchestration Wars (Micro Edition)Container Orchestration Wars (Micro Edition)
Container Orchestration Wars (Micro Edition)
 
Downtime is not an option - day 2 operations - Jörg Schad
Downtime is not an option - day 2 operations -  Jörg SchadDowntime is not an option - day 2 operations -  Jörg Schad
Downtime is not an option - day 2 operations - Jörg Schad
 
CI/CD with Docker, DC/OS, and Jenkins
CI/CD with Docker, DC/OS, and JenkinsCI/CD with Docker, DC/OS, and Jenkins
CI/CD with Docker, DC/OS, and Jenkins
 
Kubernetes One-Click Deployment: Hands-on Workshop (Munich)
Kubernetes One-Click Deployment: Hands-on Workshop (Munich)Kubernetes One-Click Deployment: Hands-on Workshop (Munich)
Kubernetes One-Click Deployment: Hands-on Workshop (Munich)
 
Mesos: A State-of-the-art Container Orchestrator
Mesos: A State-of-the-art Container OrchestratorMesos: A State-of-the-art Container Orchestrator
Mesos: A State-of-the-art Container Orchestrator
 
Dealing with kubesprawl tetris style !
Dealing with kubesprawl   tetris style !Dealing with kubesprawl   tetris style !
Dealing with kubesprawl tetris style !
 
Multi-Core (MC) Processor Qualification for Safety Critical Systems
Multi-Core (MC) Processor Qualification for Safety Critical SystemsMulti-Core (MC) Processor Qualification for Safety Critical Systems
Multi-Core (MC) Processor Qualification for Safety Critical Systems
 
Mesos and the Architecture of the New Datacenter
Mesos and the Architecture of the New DatacenterMesos and the Architecture of the New Datacenter
Mesos and the Architecture of the New Datacenter
 
Container Orchestration Wars (2017 Edition)
Container Orchestration Wars (2017 Edition)Container Orchestration Wars (2017 Edition)
Container Orchestration Wars (2017 Edition)
 
Highly efficient container orchestration and continuous delivery with DC/OS a...
Highly efficient container orchestration and continuous delivery with DC/OS a...Highly efficient container orchestration and continuous delivery with DC/OS a...
Highly efficient container orchestration and continuous delivery with DC/OS a...
 
Oracle SOA Tips & Tricks
Oracle SOA Tips & TricksOracle SOA Tips & Tricks
Oracle SOA Tips & Tricks
 
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...
 
DOD 2016 - Jörg Schad - How Fast Data and Microservices Change the Datacenter.
DOD 2016 - Jörg Schad - How Fast Data and Microservices Change the Datacenter.DOD 2016 - Jörg Schad - How Fast Data and Microservices Change the Datacenter.
DOD 2016 - Jörg Schad - How Fast Data and Microservices Change the Datacenter.
 
Container Orchestration Wars
Container Orchestration WarsContainer Orchestration Wars
Container Orchestration Wars
 
Scaling Like Twitter with Apache Mesos
Scaling Like Twitter with Apache MesosScaling Like Twitter with Apache Mesos
Scaling Like Twitter with Apache Mesos
 
[DO16] Mesosphere : Microservices meet Fast Data on Azure
[DO16] Mesosphere : Microservices meet Fast Data on Azure [DO16] Mesosphere : Microservices meet Fast Data on Azure
[DO16] Mesosphere : Microservices meet Fast Data on Azure
 
Powering Predictive Mapping at Scale with Spark, Kafka, and Elastic Search: S...
Powering Predictive Mapping at Scale with Spark, Kafka, and Elastic Search: S...Powering Predictive Mapping at Scale with Spark, Kafka, and Elastic Search: S...
Powering Predictive Mapping at Scale with Spark, Kafka, and Elastic Search: S...
 
Mesos, DC/OS and the Architecture of the New Datacenter
Mesos, DC/OS and the Architecture of the New DatacenterMesos, DC/OS and the Architecture of the New Datacenter
Mesos, DC/OS and the Architecture of the New Datacenter
 

Recently uploaded

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

MesosCon 2016: Frameworks in Harmony

  • 1. © 2016 Mesosphere, Inc. All Rights Reserved. 1 FRAMEWORKS IN HARMONY MesosCon 2016
  • 2. © 2016 Mesosphere, Inc. All Rights Reserved. 2 BRENDEN MATTHEWS Engineer Core Mesos committer, contributor to numerous Mesos frameworks, and various other projects in the Mesos ecosystem. He spends his free time contemplating existentialism, cooking steak, and craigslist furniture hacking. @brndnmtthws VISHNU MOHAN Solutions Engineer Works closely with customers in the field on Performance and Automation. When he’s not analyzing sandbox logs or coding against some API for fun, he may be found rock climbing, hiking, running or scuba diving. @vm_mesos
  • 3. © 2016 Mesosphere, Inc. All Rights Reserved. 3 AGENDA MesosCon 2016: Frameworks in Harmony
  • 4. © 2016 Mesosphere, Inc. All Rights Reserved. 4 ● Problem Definition, Motivations and Applications ● Intro to Roles, Weights, Quotas, Reservations, Revocation & Oversubscription ● Theory ● Dominant Resource Fairness (DRF) ● Hierarchical Dominant Resource Fairness (H-DRF) ● Mesos Quotas ● Scenarios and putting it all together ● Demo on AGENDA MesosCon 2016: Frameworks in Harmony
  • 5. © 2016 Mesosphere, Inc. All Rights Reserved. 5 MOTIVATIONS/ APPLICATIONS MesosCon 2016: Frameworks in Harmony
  • 6. © 2016 Mesosphere, Inc. All Rights Reserved. 6 MOTIVATIONS Running multiple environments on one cluster Guaranteeing resource availability APPLICATIONS Multitenancy Isolation Introducing new frameworks MOTIVATIONS/APPLICATIONS MesosCon 2016: Frameworks in Harmony
  • 7. © 2016 Mesosphere, Inc. All Rights Reserved. 7 DEFINITIONS MesosCon 2016: Frameworks in Harmony
  • 8. © 2016 Mesosphere, Inc. All Rights Reserved. 8 ROLES A method of identifying frameworks for use with reservations, auth, ACLs, and other Mesos features. WEIGHTS Control the relative share of resources that is offered to different roles INVERSE OFFERS Mechanism to reclaim resources for maintenance, reallocation and pre-emption DEFINITIONS MesosCon 2016: Frameworks in Harmony RESERVATIONS Mechanism to reserve resources on specific agents (Static and Dynamic) QUOTAS Lay away resources for consumption via cluster- wide dynamic reservation OVERSUBSCRIPTION Temporarily take advantage of unused resources
  • 9. © 2016 Mesosphere, Inc. All Rights Reserved. 9 DOMINANT RESOURCE FAIRNESS (DRF) MesosCon 2016: Frameworks in Harmony
  • 10. © 2016 Mesosphere, Inc. All Rights Reserved. 10 DRF Core resource allocation algorithm for Mesos Generalization of Max-Min Fairness to multiple resources WHY MAX-MIN FAIRNESS? Generality Ability to provide performance isolation https://www.cs.berkeley.edu/~alig/papers/drf.pdf WEIGHTED MAX-MIN FAIRNESS Priority Reservation Deadline-Based Allocation User is guaranteed to receive her fair share irrespective of the demands of others Applicable to a wide variety of resources DOMINANT RESOURCE FAIRNESS MesosCon 2016: Frameworks in Harmony
  • 11. © 2016 Mesosphere, Inc. All Rights Reserved. 11 DRF CORE CONCEPTS In a multi-resource environment, the allocation of a user should be determined by the user’s “dominant share”, which is the maximum share that the user has been allocated of any resource DRF then seeks to maximize the minimum dominant share across all users DRF CORE PROPERTIES Sharing Incentive Strategy Proofness Pareto Efficiency Envy Freeness NICE-TO-HAVE PROPERTIES Single Resource Fairness Bottleneck Fairness Population Monotonicity Resource Monotonicity DOMINANT RESOURCE FAIRNESS contd. MesosCon 2016: Frameworks in Harmony
  • 12. © 2015 Mesosphere, Inc. All Rights Reserved. 12 EXAMPLE Total Capacity: 9 CPUs, 18 GB RAM ROLE A <1 CPU, 4 GB>, Dominant Resource: Mem <x CPU, 4x GB>, Dominant Share: 2/9 (i.e., 4/18) ROLE B <3 CPUs, 1 GB>, Dominant Resource: CPU <3y CPU, y GB>, Dominant Share: 1/3 (i.e., 3/9) DRF IN ACTION MesosCon 2016: Frameworks In Harmony SOLUTION x = 3, y = 2
  • 13. © 2015 Mesosphere, Inc. All Rights Reserved. 13 DRF IN ACTION contd. MesosCon 2016: Frameworks In Harmony
  • 14. © 2015 Mesosphere, Inc. All Rights Reserved. 14 DRF ALLOCATION SCHEDULE (Quantum 1) MesosCon 2016: Frameworks in Harmony Schedule Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB> CPU Total Alloc. RAM Total Alloc. res. shares dom. share res. shares dom. share Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18
  • 15. © 2015 Mesosphere, Inc. All Rights Reserved. 15 DRF ALLOCATION SCHEDULE (Quantum 2) MesosCon 2016: Frameworks in Harmony Schedule Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB> CPU Total Alloc. RAM Total Alloc. res. shares dom. share res. shares dom. share Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18 Role A <1/9, 4/18> 2/9 <3/9, 1/18> 1/3 4/9 5/18
  • 16. © 2015 Mesosphere, Inc. All Rights Reserved. 16 DRF ALLOCATION SCHEDULE (Quantum 3) MesosCon 2016: Frameworks in Harmony Schedule Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB> CPU Total Alloc. RAM Total Alloc. res. shares dom. share res. shares dom. share Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18 Role A <1/9, 4/18> 2/9 <3/9, 1/18> 1/3 4/9 5/18 Role A <2/9, 8/18> 4/9 <3/9, 1/18> 1/3 5/9 9/18
  • 17. © 2015 Mesosphere, Inc. All Rights Reserved. 17 DRF ALLOCATION SCHEDULE (Quantum 4) MesosCon 2016: Frameworks in Harmony Schedule Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB> CPU Total Alloc. RAM Total Alloc. res. shares dom. share res. shares dom. share Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18 Role A <1/9, 4/18> 2/9 <3/9, 1/18> 1/3 4/9 5/18 Role A <2/9, 8/18> 4/9 <3/9, 1/18> 1/3 5/9 9/18 Role B <2/9, 8/18> 4/9 <6/9, 2/18> 2/3 8/9 10/18
  • 18. © 2015 Mesosphere, Inc. All Rights Reserved. 18 DRF ALLOCATION SCHEDULE (Quantum 5) - CPU Maxed Out MesosCon 2016: Frameworks in Harmony Schedule Role A <1 CPU, 4 GB> Role B <3 CPU, 1 GB> CPU Total Alloc. RAM Total Alloc. res. shares dom. share res. shares dom. share Role B <0,0> 0 <3/9, 1/18> 1/3 3/9 1/18 Role A <1/9, 4/18> 2/9 <3/9, 1/18> 1/3 4/9 5/18 Role A <2/9, 8/18> 4/9 <3/9, 1/18> 1/3 5/9 9/18 Role B <2/9, 8/18> 4/9 <6/9, 2/18> 2/3 8/9 10/18 Role A <3/9, 12/18> 2/3 <6/9, 2/18> 2/3 1 14/18
  • 19. © 2015 Mesosphere, Inc. All Rights Reserved. 19 DRF ALLOCATION AND RESOURCE CONSUMPTION MesosCon 2016: Frameworks In Harmony
  • 20. © 2016 Mesosphere, Inc. All Rights Reserved. 20 HIERARCHICAL DOMINANT RESOURCE FAIRNESS (H-DRF) https://www.cs.berkeley.edu/~alig/papers/h-drf.pdf MesosCon 2016: Frameworks in Harmony
  • 21. © 2016 Mesosphere, Inc. All Rights Reserved. 21 MESOS ROLES MesosCon 2016: Frameworks in Harmony
  • 22. © 2016 Mesosphere, Inc. All Rights Reserved. 22 USE CASES ● Ensuring that resources on a particular agent are only offered to a particular framework ● Partitioning a cluster between organizations: resources reserved for use by Organization A will only be offered to frameworks that have registered using Organization A’s role (also, Reservations) ● Expressing that one group of frameworks has “higher priority” (and offered more resources) than another group of frameworks (also, Weights) ● Setting a guaranteed resource allocation for one or more frameworks belonging to a role (also, Quotas) ● Ensuring that persistent volumes created by one framework are not offered to frameworks registered with a different role MESOS ROLES MesosCon 2016: Frameworks in Harmony
  • 23. © 2016 Mesosphere, Inc. All Rights Reserved. 23 MESOS QUOTAS MesosCon 2016: Frameworks in Harmony
  • 24. © 2016 Mesosphere, Inc. All Rights Reserved. 24 QUOTA Quotas are a mechanism for dynamically reserving resources. WHY QUOTA? DRF may offer resources to frameworks beyond their fair share. Operators can use quotas to ensure that frameworks always receive enough resources. MESOS QUOTAS MesosCon 2016: Frameworks in Harmony QUOTA CORE CONCEPTS Quotas provide a mechanism for guaranteeing resources for roles. Frameworks may register with that role, and will be allocated at least the specified amount of resources for that role. In other words, quotas are an implementation of cluster-wide dynamic resource reservations by role.
  • 25. © 2016 Mesosphere, Inc. All Rights Reserved. LIMITATIONS Can’t specify granularity or constraints (e.g., can’t distribute resources evenly across fault domains). Cannot update an existing quota (must be removed and re-added). The current implementation is both the minimum and the limit. No more offers will be sent once all reserved resources are allocated for that role. 25 QUOTA FEATURES Minimum Guarantee Dynamically Allocated Configured at Runtime Applies Per Role Cluster-wide Easy Reasoning Complementary to Dynamic Reservations MESOS QUOTAS contd. MesosCon 2016: Frameworks in Harmony
  • 26. © 2015 Mesosphere, Inc. All Rights Reserved. 26 QUOTA USAGE MesosCon 2016: Frameworks in Harmony core@ip-10-0-6-151 ~ $ curl -d '{"role":"myRole","guarantee":[{"name":"cpus"," type":"SCALAR","scalar":{"value":1}},{"name":"mem","type":"SCALAR","scalar": {"value":100}}]}' -X POST http://master.mesos:5050/quota core@ip-10-0-6-151 ~ $ curl http://master.mesos:5050/quota {"infos":[{"guarantee":[{"name":"cpus","role":"*","scalar":{"value":1.0}," type":"SCALAR"},{"name":"mem","role":"*","scalar":{"value":100.0},"type":" SCALAR"}],"role":"myRole"}]} core@ip-10-0-6-151 ~ $ curl -X DELETE http://master.mesos:5050/quota/myRole core@ip-10-0-6-151 ~ $ curl http://master.mesos:5050/quota {}
  • 27. © 2016 Mesosphere, Inc. All Rights Reserved. 27 DEMO! MesosCon 2016: Frameworks in Harmony
  • 28. © 2016 Mesosphere, Inc. All Rights Reserved. 28 CONCLUSIONS & FUTURE WORK MesosCon 2016: Frameworks in Harmony
  • 29. © 2016 Mesosphere, Inc. All Rights Reserved. 29 Q&A MesosCon 2016: Frameworks in Harmony Thursday, 11:00am: Quota: Reliable Guarantees - Jörg Schad & Joris Van Remoortere, Mesosphere - Grand Mesa A, http://sched.co/6jtn Thursday, 12:00pm: Maintenance: Automating Collaboration Between Frameworks and Operators - Joseph Wu, Mesosphere - Chasm Creek (this room), http://sched.co/6jtt Thursday, 2:00pm: Resource Allocation in Apache Mesos: Present and Future - Benjamin Mahler, Mesosphere - Grand Mesa A, http://sched.co/6jtm
  • 30. © 2016 Mesosphere, Inc. All Rights Reserved. 30 VISIT OUR BOOTH Located at D1, near the main entrance Learn more by visiting dcos.io and mesosphere.com Vishnu’s Office Hours Thursday 10-12:50pm
  • 31. © 2016 Mesosphere, Inc. All Rights Reserved. 31 Charlie
  • 32. © 2016 Mesosphere, Inc. All Rights Reserved. 32 Charlie
  • 33. © 2016 Mesosphere, Inc. All Rights Reserved. 33 Charlie
  • 34. © 2016 Mesosphere, Inc. All Rights Reserved. 34 References MesosCon 2016: Frameworks in Harmony DRF: https://www.cs.berkeley.edu/~alig/papers/drf.pdf H-DRF: http://www.cs.berkeley.edu/~alig/papers/h-drf.pdf https://www.usenix.org/conference/nsdi11/dominant-resource-fairness-fair- allocation-multiple-resource-types Mesos Docs: https://www.cs.berkeley.edu/~alig/papers/mesos.pdf https://mesos.apache.org/documentation/latest/roles/ https://mesos.apache.org/documentation/latest/weights/ https://mesos.apache.org/documentation/latest/attributes-resources/ https://mesos.apache.org/documentation/latest/reservation/ https://mesos.apache.org/documentation/latest/quota/ https://mesos.apache.org/documentation/latest/oversubscription/ n-level Hierarchies: https://issues.apache.org/jira/browse/MESOS-1763
  • 35. © 2016 Mesosphere, Inc. All Rights Reserved. THANK YOU! Slides: http://sched.co/6ju7 35