-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Enhance support for real time workloads #6182
Conversation
c72ee37
to
934ccce
Compare
31512e3
to
2f30de5
Compare
1caaa4a
to
5c62642
Compare
@vladikr @davidvossel @rmohr I've finished implementing the changes for the real-time enhancements. Can you take a look whenever you have time? Thanks! /Jordi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any thoughts on how to approach functional testing? I don't think it's realistic to actually test realtime consistency or anything with the way our CI is set up. However, there should be some basic validations we can test to ensure realtime guests bootup properly.
5c62642
to
8088b6f
Compare
/test pull-kubevirt-e2e-kind-1.19-sriov |
@davidvossel @rmohr @vladikr @fabiand Development for this PR is completed. When you have time, can you take a look and let me know what you think? Thanks! |
Signed-off-by: Jordi Gil <jgil@redhat.com>
74a18e8
to
670b78f
Compare
/test pull-kubevirt-e2e-k8s-1.22-sig-compute-realtime |
/retest |
670b78f
to
e9b4112
Compare
Signed-off-by: Jordi Gil <jgil@redhat.com>
e9b4112
to
307cf35
Compare
/retest |
/test pull-kubevirt-e2e-k8s-1.22-sig-compute-realtime |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vladikr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
/test pull-kubevirt-e2e-k8s-1.20-sig-compute-nonroot |
@jordigilh perhaps you could also add a user-guide section about this. |
/retest |
1 similar comment
/retest |
I can just second Vladik - Thank you very much for this contribution! And all the work that specifically went into testing it. |
@jordigilh did you also add a user-guide section for this new feature? |
Thanks! it was a pleasure working in this project 😄 |
I plan to write a user-guide. I can also do the blog post as well 😄 . I'll PM you about it. |
Yep, I'll work on that as soon as the other related PRs in project-infra and kubevirtci are merged 😄 |
What this PR does / why we need it:
This PR aims to improve the support for real-time workloads and tune the libvirt's XML for low CPU latency. The motivation for this change is to make kubevirt aware of realtime workloads and tune libvirt's XML to reduce the CPU latency, following libvirt's recommendation. It archieves this goal by implementing the following changes:
spec.domain.cpu
namedrealtime
. This new knob is on itself a new structure that so far only contains the fieldmask
. Themask
field allows the user to define the range of vcpus to pin in thevcpusched
xml field for scheduling type asfifo
priority1
. If this field is left undefined, the logic will pin all allocated vcpus for real-time workload.Example when enabling the
realtime
knob without defining the mask:realtime
knob is enabled, the virt-launcher will add the following libvirt XML elements:<nosharepages/>
virt-handler
will set the memory lock limits for the qemu-kvm process.<pmu state="off"/>
vcpusched
element in theCPUTune
section:<vcpusched scheduler="fifo" priority="1" vcpus="<pinned vcpus>">
kernel.sched_rt_runtime_us=-1
to allow unlimited runtime of processes running with realtime scheduling) will be labeled withkubevirt.io/realtime
.realtime
knob enabled in its manifest, the generated pod manifest will be mutated to include the node label selectorkubevirt.io/realtime
, so that the pod is scheduled to run in a node that supports realtime workloads.realtime
knob enabled will require a node that is capable of running realtime workloads (kubevirt.io/realtime
label), is able to isolate CPUs (cpumanager=true
label) and has been configured with hugepages.Example of a complete VM manifest:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):TBD
Special notes for your reviewer:
/cc @rmohr @vladikr @davidvossel
/cc @pkliczewski @fabiand
Release note: