Skip to content
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

Unable to allocate more than 32 CPU cores to WSL2 #11860

Open
1 of 2 tasks
KaneGreen opened this issue Jul 31, 2024 · 4 comments
Open
1 of 2 tasks

Unable to allocate more than 32 CPU cores to WSL2 #11860

KaneGreen opened this issue Jul 31, 2024 · 4 comments
Labels
emailed-logs Logs have been emailed

Comments

@KaneGreen
Copy link

KaneGreen commented Jul 31, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3958]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu-24.04

Other Software

OS: Windows 11 Pro for Workstations 23H2

Repro Steps

  1. I'm using a workstation with one AMD EPYC 7K62 48-Core Processor. So, I have 48 physical cores and 96 logical cores.

  2. Enable these features in Control Panel: Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform and Windows Subsystem for Linux.

  3. Install the latest WSL from https://github.com/microsoft/WSL/releases/latest

  4. the WSL configuration in file %USERPROFILE%/.wslconfig

    [wsl2]
    memory=40GB
    processors=40
    defaultVhdSize=256GB
    nestedVirtualization=false
    
    [experimental]
    autoMemoryReclaim=dropcache
    sparseVhd=true
    

    In this configuration, I tried to allocate 40 CPU cores to WSL.

  5. Install Ubuntu-24.04 from Microsoft Store.

  6. Run the command lscpu in the WSL terminal to check how many CPU cores are available.

Expected Behavior

I hope I can get 40 logical cores available in WSL.

    Thread(s) per core:  2
    Core(s) per socket:  20
    Socket(s):           1

or

    Thread(s) per core:  1
    Core(s) per socket:  40
    Socket(s):           1

Actual Behavior

But I get 32 logical cores available in WSL.

    Thread(s) per core:  2
    Core(s) per socket:  16
    Socket(s):           1

I also tried to set processors to other values, and I found that:

  • When its value is less than or equal to 32, the number of CPU cores of WSL is equal to the specified value.
  • When its value is greater than 32, the number of CPU cores of WSL is always equal to 32.

In short, I can't use more than 32 cores.

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@KaneGreen
Copy link
Author

/emailed-logs

Copy link

Diagnostic information
Found '/emailed-logs', adding tag 'emailed-logs'

@github-actions github-actions bot added the emailed-logs Logs have been emailed label Jul 31, 2024
@xiaokentrl
Copy link

I really love the Dynamic-Wallpaper software. If there were a Windows or Linux version, I would be willing to purchase it for a lifetime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emailed-logs Logs have been emailed
Projects
None yet
Development

No branches or pull requests

2 participants