GitHub user sudo87 added a comment to the discussion: I'd like a clarification on CS planner algorythms
```vm.allocation.algorithm = userdispersing``` algorithm takes only Running Instances into consideration for allocation. Query used in the allocation logic indicates the same: ``` SELECT host.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id WHERE host.data_center_id = ? AND host.type = 'Routing' AND host.removed is null ``` It explains the scenario and outcome of uneven distribution of multiple instances if created in short span of time. I am not sure about considering "Starting" state instances for allocation decision, as Host allocation is not finalized until Instance is in Running State. However feel free to open an improvement issue. GitHub link: https://github.com/apache/cloudstack/discussions/11412#discussioncomment-14347208 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
