This document discusses hypervisor agnostic Distributed Resource Scheduler (DRS) in CloudStack 4.19. It describes DRS as a feature that rebalances virtual machines across a cluster to assist with power savings while building on existing live migration capabilities. Two main DRS algorithms are covered - Balanced, which balances load across hosts, and Condensed, which reduces the number of active hosts. Implementation details and how to configure DRS for a cluster are also outlined. The document concludes with an offer to demonstrate DRS and take any questions.
2. About Me
• Software Engineer @ ShapeBlue
• Worked as a Backend & Infrastructure engineer
in the past
• Experience managing and administering
kubernetes, AWS, PostgreSQL in production
• Passionate about cloud infrastructure, security,
and AI
3. Agenda
• What is DRS?
• Algorithms
• Configuring DRS for a cluster
• Peek into the implementation details
• Demo
• Questions
4. What is DRS?
•Upcoming feature in CloudStack 4.19
•Hypervisor agnostic
•Rebalances VMs across a cluster
•Assists in power savings
•Builds on top of existing Live Migration feature
7. Balanced
• Balances the load across hosts in a cluster
• Higher power consumption
• In case of a host failure, minimal impact
on running VMs
• Ideal for production environments
• Less likely to cause contention issues
• Like VMWare DRS
Condensed
• Reduces the number of hosts in use
• Lower power consumption
• In case of a host failure, huge impact on
running VMs
• Ideal for staging/testing environments
• More likely to cause contention issues
• Like VMWare DPS
8. Peek into the implementation
Iteration ← 0
while needsDRS() AND Iteration < MaxIterations do
BestMigration ← NULL
MaxImprovement ← 0
foreach VM v in the cluster do
foreach compatible destination host h do
improvement ← getMetrics()
if improvement > MaxImprovement then
BestMigration ← migrate v to h
MaxImprovement ← improvement
if BestMigration is NULL then
break
Perform BestMigration
Iteration++ *Actual implementation is a little different
9. Configuring/Executing DRS for a cluster
Parameter Default Description
drs.algorithm balanced
DRS algorithm to be executed on the cluster. Available
algorithms - condensed, balanced.
drs.imbalance 0.4
Percentage (as a value between 0.0 and 1.0) of
imbalance allowed in the cluster. 1.0 means no
imbalance is allowed and 0.0 means imbalance is
allowed.
drs.metric memory
The cluster imbalance metric to use when considering
the imbalance in cluster. Possible values are memory,
cpu.
drs.max.
migrations
50
Maximum number of instances to be migrated in one
DRS execution.
10. Configuring/Executing DRS for a cluster
Parameter Default Description
drs.automatic.
enable
false Enable/disable automatic DRS on a cluster.
drs.automatic.
interval
60
The interval in minutes after which a periodic background
thread will schedule DRS for a cluster.
drs.plan.
expire.interval
30
The interval in days after which the DRS events will be
cleaned up from the database.