Skip to content

Cap storage hw queue count to 4#40975

Open
chemwolf6922 wants to merge 3 commits into
masterfrom
user/chemwolf6922/cap-storage-hw-queue-count
Open

Cap storage hw queue count to 4#40975
chemwolf6922 wants to merge 3 commits into
masterfrom
user/chemwolf6922/cap-storage-hw-queue-count

Conversation

@chemwolf6922

@chemwolf6922 chemwolf6922 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Cap the hv_storvsc.storvsc_max_hw_queues to 4 to reduce memory overhead on CPUs with high core counts.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Test platform

CPU: 13900, 32 logical cores.
Drive backing the vhd: WDC SN810 1T

RAM overhead comparison

RAM overhead measured with wsl-benchmarking. VM RAM = 2G, vhd size = 100G. Noise (std) ~= 5 - 10
image

IO performance comparison

IO performance measured with fio-bench. --numjobs = 32. VM CPU count = 32.

queue count random read/IOps random write/IOps sequential read/MBps random read p99/ms
1 255800 262900 6174 8.2
2 433900 231200 6343 4.2
4 437700 234300 6354 4.3
8 431900 238700 6367 4.1
16 443300 229200 6246 4.1
32 432300 232800 6299 4.5

@chemwolf6922 chemwolf6922 requested a review from a team as a code owner July 2, 2026 06:13
Copilot AI review requested due to automatic review settings July 2, 2026 06:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Caps the Linux kernel storage driver hardware queue count (hv_storvsc.storvsc_max_hw_queues) for WSL’s HCS-based VM instances to reduce VM memory overhead on high-core-count machines, by appending the appropriate kernel command-line argument when CPU count exceeds a threshold.

Changes:

  • Introduces a MAX_STORAGE_HW_QUEUES constant (set to 4).
  • Appends hv_storvsc.storvsc_max_hw_queues=4 to the VM kernel command line when Settings->CpuCount > 4.

Comment thread src/windows/service/exe/HcsVirtualMachine.cpp
@chemwolf6922 chemwolf6922 changed the title Cap storage hw queue count to 4 Cap storage hw queue count to 4 for wslc Jul 2, 2026
Comment thread src/windows/service/exe/HcsVirtualMachine.cpp Outdated
@benhillis

Copy link
Copy Markdown
Member

Can you please clarify what the labels on the X and Y axis of the above graph represent?

Copilot AI review requested due to automatic review settings July 3, 2026 03:01
@chemwolf6922

Copy link
Copy Markdown
Contributor Author

Can you please clarify what the labels on the X and Y axis of the above graph represent?

Graph updated. The X axis is the VM CPU count. The Y axis is the ram overhead measured with wsl-benchmarking.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread src/windows/service/exe/WslCoreVm.cpp
@chemwolf6922 chemwolf6922 changed the title Cap storage hw queue count to 4 for wslc Cap storage hw queue count to 4 Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants