Adds seapath provided generic qemu hook - #808
Conversation
ebail
left a comment
There was a problem hiding this comment.
Hi, I think that is a great to streamline the priority setting.
I think that functions should be documented.
Also I would consider adding units tests specially considering that it is a critical component.
Also I am wondering if we could plug this tool to vm-manager (https://github.com/seapath/vm_manager/tree/main) so that Ansible could be optionally used.
Once a VM is started with vm-manager, correct priorities could be applied.
|
Hi @insatomcat, I am surprised to see this PR closed. I think that it is a good idea. |
|
Hi all
What do you think of that ? |
This cannot be done by vm-manager, because the script has to be run everytime the VM starts/restarts. |
This hook will run tasks that needs to be run everytime a guest is started: - parse the guest xml - override the network speed of all declared network interfaces to 1Gb (instead of the default 10Mb that make all supervision software believe they use more than 100%) - set all vhost- threads to RR1 if guest is realtime (= use vcpusched) - set cpu affinity of those threads to the same as main qemu thread if guest is realtime Signed-off-by: Florent CARLI <florent.carli@rte-france.com> Signed-off-by: Erwann Roussy <erwann.roussy@savoirfairelinux.com>
Signed-off-by: Erwann Roussy <erwann.roussy@savoirfairelinux.com>
Only deploy the script when the value is true. Signed-off-by: Erwann Roussy <erwann.roussy@savoirfairelinux.com>
Signed-off-by: Erwann Roussy <erwann.roussy@savoirfairelinux.com>
|
I pushed the modifications and add some molecule tests. The last thing that troubles me is this br0 related vhost thread that is also caught by the script and put to RR 41. I would like to put only the correct vhost thread to RR 41. What is your opinion on that ? |
|
Hi @eroussy, thanks for reviving this. The need is real, and I hit exactly the two limits you describe. I would rather attack them at the cause, which is what I proposed in #996: the VM declares an intent (isolation, scheduler, priority per thread group) and a libvirt hook resolves it at start and on incoming migration, against the live state of the node. Compared to this PR that gives your point 2 for free and without a new host flag (a VM with no profile is not touched at all), vhost policy and priority stated separately from the emulator ( Being honest about your point 1: #996 does not solve it either. Its vhost intent is per group, not per interface, and thread discovery is a So I would suggest closing this PR in favour of #996, where the vhost part lands in step 4. Nothing is lost, this PR is why vhost handling is a first-class requirement there. One exception: the 1 Gb link speed override is orthogonal to pinning and is not covered by #996, it deserves its own small hook drop-in and its own PR. |
This hook will run tasks that needs to be run everytime a guest is started: