r/openstack • u/khoinh5 • Jan 18 '26
Openstack Workload Balancer
Hello,
I have a script to make Openstack workload balance(CPU and RAM). I
would like to share it. This script is not perfect but I hope it will
be useful for you.
3
u/The_Valyard Jan 18 '26
Have you considered converting that approach to be a strategy under the Watcher project? Red Hat just revived that project and is incorporating it into their current RHOSO release?
Strategies — Watcher 15.1.0.dev81 documentation https://share.google/RhblqzvEiwZD8zykl
1
u/khoinh5 Jan 19 '26
I am not good about coding, i would like to share my logic. You can do anything my script. :)
3
u/pakeha_nisei Jan 18 '26
We have a script that determines capacity across all hypervisors from the currently running instances and suggests migrations, but does not automatically run them. We do that manually.
In practice we never do migrations without a reason, only in response to individual instances causing so much load on hypervisors that they steal CPU time from other instances (on our overprovisioned flavours), or after hypervisor maintenance when the distribution is heavily unbalanced. The scheduler actually does a pretty good job at keeping things balanced when you have at least a certain amount of churn for your instances.
0
-1
3
u/redfoobar Jan 18 '26
Cool in theory, in practice I would not ever run such a thing in production.
Are there any people with a 100% success rate with live migrations?
Talking about bigger workloads with serious memory and cpu load.
I know you can tune some things (e.g. pre copy vs post copy) but if your customers care about consistent performance without hiccups you will run into unhappy customers while the VM is gone for a few seconds or performing badly.
Maybe for some random small website no one will notice but for private cloud deployments with big critical workloads I would stay far away from fully automated live migrations.