Skip to content

Conversation

@ylmrx
Copy link
Contributor

@ylmrx ylmrx commented Jun 12, 2025

 pvecontrol -c dev balance --rich-display --anti-affinity test,VM --anti-affinity-tags 'my-tag' --help           
Usage: pvecontrol balance [OPTIONS]

  Balances VMs across nodes in the cluster, bear in mind the model used won't
  give the same result upon every calls

Options:
  -a, --anti-affinity TEXT        Balance machines with comma-separated
                                  patterns across nodes
  -t, --anti-affinity-tags TEXT   Balance machines with comma-separated tags
                                  across nodes
  -p, --movement-penalty INTEGER  Higher values minimize VM movements
  -r, --running                   Balance only the currently running instances
  -R, --rich-display              Use rich display
  --timeout FLOAT                 Limit calculation time, tiny values will
                                  result in sub-optimal solution
  --overcommit FLOAT              Sets an overcommit ratio regarding CPU nodes
                                  requirements
  --help                          Show this message and exit.
  • Uses ortools https://or-tools.github.io/docs/pdoc/ortools.html to constrain and solve balancing of basic VMs across many nodes.
  • Can use anti-affinity with name patterns and tags
  • Can overcommit (cpu), and deal with movement penalty (to move as few VM as possible)

Anti-affinity definitions could happen in config.yaml too

@ylmrx ylmrx force-pushed the feat/add_balance_command branch from 72314b6 to 12b3f76 Compare June 12, 2025 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant