Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
kubevirt.io/vm: windows-{{ kind }}-{{ trunc_uuid }}-{{ scale }}
{%- else -%}
name: windows-{{ kind }}-{{ trunc_uuid }}
name: windows-{{ kind }}-{{ trunc_uuid }}
labels:
kubevirt.io/vm: windows-{{ kind }}-{{ trunc_uuid }}
{%- endif %}
Expand All @@ -26,13 +26,7 @@ spec:
kubevirt.io/vm: windows-{{ kind }}-{{ trunc_uuid }}
{%- endif %}
spec:
terminationGracePeriodSeconds: 0
evictionStrategy: LiveMigrate
domain:
firmware:
bootloader:
efi:
secureBoot: false
clock:
timer:
hpet:
Expand All @@ -44,46 +38,58 @@ spec:
tickPolicy: catchup
utc: {}
cpu:
cores: 1
model: host-passthrough
cores: 1
sockets: {{ sockets }}
threads: 1
devices:
autoattachMemBalloon: false
blockMultiQueue: false

@coderabbitai coderabbitai Bot Jun 25, 2026

Copy link
Copy Markdown

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:

#!/bin/bash
set -euo pipefail

rg -n 'blockMultiQueue|networkInterfaceMultiqueue' \
  benchmark_runner/common/template_operations/templates/windows/internal_data/windows_vm_template.yaml \
  tests/unittest/benchmark_runner/common/template_operations/golden_files

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:

#!/bin/bash
set -euo pipefail

# Find the referenced template and inspect the relevant area.
fd -a 'windows_vm_template.yaml' benchmark_runner/common/template_operations/templates
printf '\n---\n'
if [ -f benchmark_runner/common/template_operations/templates/windows/internal_data/windows_vm_template.yaml ]; then
  nl -ba benchmark_runner/common/template_operations/templates/windows/internal_data/windows_vm_template.yaml | sed -n '1,140p'
fi
printf '\n---\n'
# Search for blockMultiQueue across the repo.
rg -n "blockMultiQueue|block multi|multiqueue" benchmark_runner tests -S

Repository: redhat-performance/benchmark-runner

Length of output: 338


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="benchmark_runner/common/template_operations/templates/windows/internal_data/windows_vm_template.yaml"

printf '--- file exists ---\n'
if [ -f "$FILE" ]; then
  sed -n '1,180p' "$FILE" | cat -n
else
  echo "missing: $FILE"
fi

printf '\n--- search ---\n'
rg -n "blockMultiQueue|multiqueue|BlockMultiQueue" benchmark_runner tests -S

Repository: redhat-performance/benchmark-runner

Length of output: 264


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="benchmark_runner/common/template_operations/templates/windows/internal_data/windows_vm_template.yaml"

echo "--- file exists ---"
if [ -f "$FILE" ]; then
  sed -n '1,180p' "$FILE" | cat -n
else
  echo "missing: $FILE"
fi

echo
echo "--- search ---"
rg -n "blockMultiQueue|multiqueue|BlockMultiQueue" benchmark_runner tests -S

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:47 still has blockMultiQueue: false; switch it to true and regenerate the affected Windows VM goldens.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@benchmark_runner/common/template_operations/templates/windows/internal_data/windows_vm_template.yaml`
at line 47, The Windows VM template still disables block multiqueue, so update
the Windows VM template configuration by changing the blockMultiQueue setting in
the windows VM template to enabled and then regenerate the affected Windows VM
goldens. Use the windows VM template entry and its blockMultiQueue field to
locate the change, and make sure the generated artifacts reflect the new
default.

Source: Coding guidelines

Copy link
Copy Markdown
Member Author

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 ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ebattat I was basing that suggestion on the PR’s stated goal of “enabling multiqueue I/O” across the Windows-family templates.

Specifically:

  • networkInterfaceMultiqueue: true only enables multiqueue for the NIC.
  • blockMultiQueue: true is 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, and winmssql aligned, then leaving blockMultiQueue: false at 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
Learnt from: ebattat
Repo: redhat-performance/benchmark-runner PR: 1226
File: benchmark_runner/common/template_operations/templates/fio/internal_data/fio_vm_template.yaml:13-15
Timestamp: 2026-05-19T14:25:39.153Z
Learning: In benchmark-runner VM template YAMLs (e.g., fio_vm_template.yaml and other *_vm_template.yaml files, including vdbench VM templates), the cloud-init configuration may intentionally hardcode `password: centos` together with `ssh_pwauth: true`. This is a known project convention for short-lived, network-isolated CI VMs where authentication is primarily handled via SSH key injection. During code review, do not treat this as an unintended security issue; only flag it if the template changes the intended authentication model or the “network-isolated short-lived CI VM” assumption no longer holds. A broader hardening pass is planned for all VM templates.

disks:
- disk:
bus: virtio
{% if scale -%}
- {% if scale -%}
name: windows-{{ kind }}-root-disk-{{ trunc_uuid }}-{{ scale }}
{%- else -%}
name: windows-{{ kind }}-root-disk-{{ trunc_uuid }}
{%- endif %}
dedicatedIOThread: false
disk:
bus: virtio
bootOrder: 1
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:
Expand All @@ -93,9 +99,11 @@ spec:
limits:
cpu: {{ limit_cpu }}
memory: {{ limit_memory }}
evictionStrategy: LiveMigrate
networks:
- name: nic-0
pod: {}
terminationGracePeriodSeconds: 180
volumes:
- dataVolume:
{% if scale -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ template_data:
perf_ci:
requests_memory: 2G
requests_cpu: 1
limit_memory: 2G
limit_cpu: 1
limit_memory: 4G
limit_cpu: 2
sockets: 1
storage: 76Gi
default:
requests_memory: 2G
requests_cpu: 1
limit_memory: 2G
limit_cpu: 1
limit_memory: 4G
limit_cpu: 2
sockets: 1
storage: 76Gi
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -49,16 +43,17 @@ spec:
sockets: {{ sockets }}
threads: 1
devices:
autoattachMemBalloon: false
blockMultiQueue: false
Comment on lines +46 to 47

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

KubeVirt supplementalPool ioThreads policy requires blockMultiQueue enabled for virtio queue mapping?

💡 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 -S

Repository: 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
done

Repository: 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])
PY

Repository: 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")
PY

Repository: redhat-performance/benchmark-runner

Length of output: 2755


Enable blockMultiQueue with supplementalPool
ioThreadsPolicy: supplementalPool only improves disk parallelism when blockMultiQueue is enabled; with it set to false, the 8-thread pool won’t distribute virtio I/O as intended. The same pattern appears in the sibling Windows VM templates too.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@benchmark_runner/common/template_operations/templates/winfio/internal_data/winfio_vm_template.yaml`
around lines 46 - 47, The Windows VM template currently leaves blockMultiQueue
disabled even though ioThreadsPolicy is set to supplementalPool, so update the
VM template configuration to enable blockMultiQueue in the same section as
autoattachMemBalloon; use the existing winfio_vm_template settings as the
reference point and apply the same fix to the sibling Windows VM templates that
use supplementalPool.

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 -%}
Expand All @@ -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 -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ spec:
kubevirt.io/vm: windows-{{ kind }}-{{ trunc_uuid }}
{%- endif %}
spec:
terminationGracePeriodSeconds: 0
evictionStrategy: LiveMigrate
domain:
firmware:
bootloader:
efi:
secureBoot: false
clock:
timer:
hpet:
Expand All @@ -49,16 +43,17 @@ spec:
sockets: {{ sockets }}
threads: 1
devices:
autoattachMemBalloon: false
blockMultiQueue: false
disks:
- disk:
bus: virtio
{% if scale -%}
- {% if scale -%}
name: windows-{{ kind }}-root-disk-{{ trunc_uuid }}-{{ scale }}
{%- else -%}
name: windows-{{ kind }}-root-disk-{{ trunc_uuid }}
{%- endif %}
dedicatedIOThread: false
disk:
bus: virtio
bootOrder: 1
- disk:
bus: virtio
{% if scale -%}
Expand All @@ -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: {{ database_requests_cpu }}
memory: {{ database_requests_memory }}
evictionStrategy: LiveMigrate
networks:
- name: nic-0
pod: {}
terminationGracePeriodSeconds: 180
volumes:
- dataVolume:
{% if scale -%}
Expand Down
Loading