WSL2 runs only on the first Windows processor group (64 of 128 threads) under the default root scheduler

Open
#42,074 7 comments 4 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
linux

Research direction

Start by tracing how WSL configures VM virtual processors from the processors setting and how that interacts with Hyper-V’s root scheduler and Windows processor groups. The issue provides reproduction steps and measurements but names no WSL source files or tests; first identify the VM configuration entry point and relevant tests. Done means the VM can use processors across groups under the root scheduler, with guest-visible steal time and guidance for the workaround.

Written by the indexing model from the issue text.

Description

hypervisor-platform wsl2
Windows Version

Microsoft Windows [Version 10.0.26300.9711]

WSL Version

2.7.10.0

Are you using WSL 1, WSL 2, or WSLC?
  • WSL 2
Kernel Version

6.18.33.2-microsoft-standard-WSL2

Distro Version

Ubuntu 26.04 LTS

Other Software

None needed. Any workload that keeps more than 64 threads busy shows it. I saw it with several parallel cargo builds.

Repro Steps
  1. Use a host with more than 64 logical processors, so that Windows creates more than one processor group. Mine is an AMD Ryzen Threadripper PRO 9985WX: 64 cores, 128 threads, 127 GB RAM. GetActiveProcessorGroupCount returns 2, with 64 logical processors in each group.
  2. Keep the default Hyper-V scheduler on Windows 11. The Microsoft-Windows-Hyper-V-Hypervisor event 2 says "Hypervisor scheduler type is 0x4" (root scheduler).
  3. Use this .wslconfig:
    [wsl2]
    memory=100GB
    processors=120
    
  4. In WSL, run a parallel workload that keeps more than 64 threads busy.
  5. On Windows, read per-processor run time from a normal (non-admin) PowerShell:
    Get-Counter "\Hyper-V Hypervisor Logical Processor(*)\% Total Run Time"
    Get-Counter "\Hyper-V Hypervisor Virtual Processor(*)\% Total Run Time"
    
Expected Behavior

The VM's 120 virtual processors run on all 128 host threads, as they do with the core scheduler.

Linux does see all 120 CPUs. WSL 2.4.8 fixed the older limit on how many CPUs Linux sees (#5423, #4137). This report is about where Windows runs those CPUs.

Actual Behavior

With the root scheduler, the VM runs only on processor group 0:

Measurement Value
Host logical processors 0–63, average run time 100%
Host logical processors 64–127, average run time 1.3%
Virtual processors actually running (sum of % Total Run Time over 120 VPs) about 62
CPUs busy according to Linux /proc/stat, same 8-second window 95 of 120 (59.7% system time)
Steal time in Linux 0

Each core's two threads are adjacent (core 0 is logical processors 0 and 1), so group 0 is cores 0–31. The VM gets 32 of the 64 cores, and the other 32 stay idle.

Linux gets no steal time, so it can't tell that a virtual processor is waiting for a host thread. That waiting time shows up inside Linux as user or system time, and the load average reached 230 on 120 CPUs while Windows showed half the machine idle. That makes the problem very hard to diagnose from inside WSL.

Workaround: bcdedit /set hypervisorschedulertype core, then reboot. After that, event 2 says "Hypervisor scheduler type is 0x3", and under the same workload logical processors 0–63 ran at 81.5% and 64–127 at 88.1%.

Requests
  1. Run the VM's virtual processors across all processor groups under the default root scheduler.
  2. Until then, tell users of hosts with more than 64 threads that they need the core scheduler, for example in wsl --status or the .wslconfig documentation for processors.
  3. Report steal time to the guest, so that waiting for host CPUs is visible inside Linux.
Related issues
  • #5423: WSL 2.4.8 made Linux see all CPUs. On 2024-12-27, a comment there reported this same limit to the first processor group, fixed by switching to the core scheduler. The issue was closed for inactivity on 2026-01-01, with a request to file a new issue if the problem remained.
  • #4137: the earlier "half the cores" report. A 2019 comment noted that the VM still used only one processor group.
  • #8735: Threadripper 3990X (64 cores, 128 threads) with half the threads unused. Closed for inactivity.
  • #6923: a 4-socket, 144-thread server limited to 64 CPUs. Closed for inactivity.
  • #12323: the November 2024 discussion of the 64-CPU limit and the fix that shipped in 2.4.8. Closed as a duplicate of #1115.
Diagnostic Logs

Processor groups were read with GetActiveProcessorGroupCount and GetActiveProcessorCount (kernel32), and core-to-thread mapping with GetLogicalProcessorInformationEx(RelationProcessorCore). Both work from a non-admin PowerShell through Add-Type. The scheduler type comes from Get-WinEvent -FilterHashtable @{ProviderName="Microsoft-Windows-Hyper-V-Hypervisor"; Id=2} -MaxEvents 1.

Dominant language
C++
Stars
34.4k
Forks
1.9k
Avg merge
1d 23h
Merged PRs (30d)
166

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/WSL

All issues in microsoft/WSL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.