-
Notifications
You must be signed in to change notification settings - Fork 24
Update Windows VM templates with performance optimizations #1247
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,13 +26,7 @@ spec: | |
| kubevirt.io/vm: winfio-{{ kind }}-{{ trunc_uuid }} | ||
| {%- endif %} | ||
| spec: | ||
| terminationGracePeriodSeconds: 0 | ||
| evictionStrategy: LiveMigrate | ||
| domain: | ||
| firmware: | ||
| bootloader: | ||
| efi: | ||
| secureBoot: false | ||
| clock: | ||
| timer: | ||
| hpet: | ||
|
|
@@ -49,16 +43,17 @@ spec: | |
| sockets: {{ sockets }} | ||
| threads: 1 | ||
| devices: | ||
| autoattachMemBalloon: false | ||
| blockMultiQueue: false | ||
|
Comment on lines
+46
to
47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚀 Performance & Scalability | 🟡 Minor 🧩 Analysis chain🌐 Web query:
💡 Result: Yes, using the KubeVirt supplementalPool ioThreads policy requires enabling blockMultiQueue for virtual machine disk devices [1][2]. The supplementalPool policy is designed to improve storage performance by utilizing multiple host-level IOThreads that are mapped to virtio disk queues [3][1]. Authoritative KubeVirt and OpenShift Virtualization documentation explicitly states that multiple IOThreads are supported and work correctly only when blockMultiQueue is enabled and the disk bus is set to virtio [2]. Enabling blockMultiQueue allows these host-level IOThreads to be automatically mapped to multiple queues inside the guest, ensuring that I/O workload is effectively distributed across vCPUs [1]. Citations:
🏁 Script executed: #!/bin/bash
set -euo pipefail
# Inspect the referenced template and related usages of supplementalPool/blockMultiQueue.
git ls-files benchmark_runner/common/template_operations/templates/winfio/internal_data/winfio_vm_template.yaml
echo '---'
cat -n benchmark_runner/common/template_operations/templates/winfio/internal_data/winfio_vm_template.yaml | sed -n '35,120p'
echo '--- SEARCH supplementalPool / blockMultiQueue ---'
rg -n "supplementalPool|blockMultiQueue|ioThreadsPolicy|supplementalPoolThreadCount" benchmark_runner -SRepository: redhat-performance/benchmark-runner Length of output: 4577 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Look for repo-local guidance or prior discussion of blockMultiQueue and ioThreadsPolicy.
rg -n "blockMultiQueue|ioThreadsPolicy|supplementalPoolThreadCount|networkInterfaceMultiqueue" \
benchmark_runner tests docs README.md HOW_TO.md -S
echo '--- WINDOWS / WINMSSQL / WINFIO diffs context ---'
for f in \
benchmark_runner/common/template_operations/templates/windows/internal_data/windows_vm_template.yaml \
benchmark_runner/common/template_operations/templates/winmssql/internal_data/winmssql_vm_template.yaml \
benchmark_runner/common/template_operations/templates/winfio/internal_data/winfio_vm_template.yaml
do
echo "### $f"
cat -n "$f" | sed -n '40,110p'
echo
doneRepository: redhat-performance/benchmark-runner Length of output: 39424 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Check whether the documented KubeVirt behavior ties supplementalPool to blockMultiQueue.
python3 - <<'PY'
from urllib.request import urlopen
urls = [
"https://docs.okd.io/4.19/virt/managing_vms/virt-edit-vms.html",
]
for u in urls:
print(f"URL: {u}")
with urlopen(u, timeout=15) as r:
text = r.read().decode("utf-8", "ignore")
for needle in ("supplementalPool", "blockMultiQueue", "ioThreadsPolicy", "multiqueue"):
idx = text.lower().find(needle.lower())
print(needle, idx)
print("--- snippet ---")
idx = text.lower().find("supplementalpool")
if idx != -1:
print(text[max(0, idx-300): idx+900])
PYRepository: redhat-performance/benchmark-runner Length of output: 2822 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Gather exact local evidence from the docs page around the relevant terms.
python3 - <<'PY'
from urllib.request import urlopen
u = "https://docs.okd.io/4.19/virt/managing_vms/virt-edit-vms.html"
with urlopen(u, timeout=15) as r:
text = r.read().decode("utf-8", "ignore")
lower = text.lower()
for needle in ("supplementalpool", "blockmultiqueue", "iothreads", "virtio queue"):
idx = lower.find(needle.lower())
print(f"needle={needle!r} idx={idx}")
if idx != -1:
print(text[max(0, idx-250): idx+700])
print("\n---\n")
PYRepository: redhat-performance/benchmark-runner Length of output: 2755 Enable 🤖 Prompt for AI Agents |
||
| disks: | ||
| - disk: | ||
| bus: virtio | ||
| {% if scale -%} | ||
| - {% if scale -%} | ||
| name: winfio-{{ kind }}-root-disk-{{ trunc_uuid }}-{{ scale }} | ||
| {%- else -%} | ||
| name: winfio-{{ kind }}-root-disk-{{ trunc_uuid }} | ||
| {%- endif %} | ||
| dedicatedIOThread: false | ||
| disk: | ||
| bus: virtio | ||
| bootOrder: 1 | ||
| - disk: | ||
| bus: virtio | ||
| {% if scale -%} | ||
|
|
@@ -69,40 +64,53 @@ spec: | |
| - disk: | ||
| bus: virtio | ||
| name: cloudinitdisk | ||
| inputs: | ||
| - bus: virtio | ||
| name: tablet | ||
| type: tablet | ||
| tpm: {} | ||
| interfaces: | ||
| - masquerade: {} | ||
| - name: nic-0 | ||
| masquerade: {} | ||
| model: virtio | ||
| name: nic-0 | ||
| networkInterfaceMultiqueue: true | ||
| tpm: { } | ||
| networkInterfaceMultiqueue: true | ||
| features: | ||
| acpi: {} | ||
| apic: {} | ||
| hyperv: | ||
| frequencies: {} | ||
| ipi: {} | ||
| reenlightenment: {} | ||
| tlbflush: {} | ||
| relaxed: {} | ||
| reset: {} | ||
| runtime: {} | ||
| spinlocks: | ||
| spinlocks: 8191 | ||
| synic: {} | ||
| synictimer: | ||
| direct: {} | ||
| vapic: {} | ||
| direct: {} | ||
| spinlocks: | ||
| spinlocks: 8191 | ||
| evmcs: | ||
| enabled: true | ||
| relaxed: {} | ||
| vpindex: {} | ||
| runtime: {} | ||
| tlbflush: {} | ||
| frequencies: {} | ||
| vapic: {} | ||
| smm: {} | ||
| firmware: | ||
| bootloader: | ||
| efi: | ||
| secureBoot: false | ||
| ioThreads: | ||
| supplementalPoolThreadCount: 8 | ||
| ioThreadsPolicy: supplementalPool | ||
| machine: | ||
| type: q35 | ||
| resources: | ||
| requests: | ||
| cpu: {{ requests_cpu }} | ||
| memory: {{ requests_memory }} | ||
| evictionStrategy: LiveMigrate | ||
| networks: | ||
| - name: nic-0 | ||
| pod: {} | ||
| terminationGracePeriodSeconds: 180 | ||
| volumes: | ||
| - dataVolume: | ||
| {% if scale -%} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
🚀 Performance & Scalability | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
Repository: redhat-performance/benchmark-runner
Length of output: 20041
🌐 Web query:
KubeVirt VirtualMachineInstanceSpec devices blockMultiQueue true enables virtio block multiqueue💡 Result:
Yes, setting blockMultiQueue: true under the devices section of a KubeVirt VirtualMachineInstanceSpec enables virtio block multiqueue [1][2]. Virtio block multiqueue is a framework for the Linux block layer that maps device I/O queries to multiple queues, which improves performance by splitting I/O processing across multiple threads and CPUs [1][2]. When this feature is enabled, KubeVirt configures the number of queues to match the number of CPUs allocated to the VirtualMachineInstance [1][2]. Key technical considerations include: 1. Resource Allocation: For optimal performance, libvirt recommends that the number of queues matches the number of allocated CPUs [1][2]. While earlier implementations of KubeVirt strictly required explicit CPU requests or limits to enable this feature to prevent over-allocation [1][3][2], subsequent updates improved how queues are calculated based on vCPUs [4]. 2. Configuration: It is specified within the domain devices block [1][2]: spec: domain: devices: blockMultiQueue: true disks: - disk: bus: virtio name: mydisk 3. Default Behavior: The blockMultiQueue setting defaults to false [5][6][7].
Citations:
🏁 Script executed:
Repository: redhat-performance/benchmark-runner
Length of output: 338
🏁 Script executed:
Repository: redhat-performance/benchmark-runner
Length of output: 264
🏁 Script executed:
Repository: redhat-performance/benchmark-runner
Length of output: 10096
Enable block multiqueue in the Windows VM template
benchmark_runner/common/template_operations/templates/windows/internal_data/windows_vm_template.yaml:47still hasblockMultiQueue: false; switch it totrueand regenerate the affected Windows VM goldens.🤖 Prompt for AI Agents
Source: Coding guidelines
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.
why switch to true blockMultiQueue ?
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.
@ebattatI was basing that suggestion on the PR’s stated goal of “enabling multiqueue I/O” across the Windows-family templates.Specifically:
networkInterfaceMultiqueue: trueonly enables multiqueue for the NIC.blockMultiQueue: trueis the separate KubeVirt knob for virtio disk multiqueue.So my read was: if the intent here is to enable multiqueue broadly and keep
windows,winfio, andwinmssqlaligned, then leavingblockMultiQueue: falseat Line 47 means storage multiqueue is still off in this template.That said, if this template is intentionally only enabling NIC multiqueue, or if disk multiqueue was left off for Windows compatibility/stability reasons, then this comment doesn’t apply and I’m happy to drop it.
(•ㅅ•)🐇
🧠 Learnings used