Skip to content

Add cluster ordering by host capacityType doc #524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 60 additions & 1 deletion source/adminguide/vm_volume_allocators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,63 @@ firstfitleastconsumed Selects the first storage pool after sorting elig

**volume.allocation.algorithm**: random (default)

Before 4.21.0, **vm.allocation.algorithm** was used for both VM as well as Volume allocation.
Before 4.21.0, **vm.allocation.algorithm** was used for both VM as well as Volume allocation.


Cluster, Pod and Host Ordering
==============================

Overview
--------

`The host.capacityType.to.order.clusters` is a global advanced configuration parameter in Apache CloudStack that controls how pods, clusters,
and hosts are prioritized during Instance deployment, based on available CPU, RAM, or a weighted combination of both in Host.
This configuration is specifically leveraged when the VM allocation algorithm is set to `firstfitleastconsumed`.

Configuration
-------------

Key: `host.capacityType.to.order.clusters`

.. cssclass:: table-striped table-bordered table-hover

========= ========================
Value Behavior
========= ========================
CPU Prioritizes resources with the most available CPU.
RAM Prioritizes resources with the most available memory.
COMBINED Uses a weighted formula to balance CPU and RAM in prioritization.
========= ========================

**Additional Configuration for COMBINED**

- Key: `host.capacityType.to.order.clusters.cputomemoryweight`
- Type: Float(0.0 to 1.0)
- Default: 0.5
- Purpose: Determines the weight of CPU vs RAM in the combined capacity calculation.

Capacity calculation formula:

.. code:: bash

capacity = (host.capacityType.to.order.clusters.cputomemoryweight * CPU) + ((1 - host.capacityType.to.order.clusters.cputomemoryweight) * RAM)


This allows flexible tuning of prioritization depending on workload sensitivity.

Example Configuration
---------------------

.. code:: bash

host.capacityType.to.order.clusters: COMBINED
host.capacityType.to.order.clusters.cputomemoryweight: 0.7

Above config prioritizes CPU at 70% weight and RAM at 30% when ranking pods, clusters, and hosts.

.. note::
- `host.capacityType.to.order.clusters` is only respected for host ordering when:
.. code:: bash

vm.allocation.algorithm: firstfitleastconsumed
- When using COMBINED, make sure to tune cpu.to.memory.capacity.weight to reflect your environment’s resource constraints and workload profiles.