-
Notifications
You must be signed in to change notification settings - Fork 848
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
Uploading data to D3D12 PBO from WSL 2 got very slow performance. #12489
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
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 |
Failed to parse logs. Unexpected file: full_kernel_trace.txt Diagnostic information
|
Failed to parse logs. Unexpected file: full_kernel_trace.txt Diagnostic information
|
Diagnostic information
|
This is the WSL log |
Diagnostic information
|
View similar issuesPlease 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:
Diagnostic information
|
WslLogs-2025-01-22_16-11-24.zip
Windows Version
10.0.19044.5371
WSL Version
2.3.26.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.167.4-1
Distro Version
OPEN EULER
Other Software
No response
Repro Steps
I uploaded data to a DirectX PBO in WSL 2, and the code is shown below. The performance is very slow; uploading 512 * 512 * 274 * 2 = 143,654,912 bytes took 470 milliseconds. I recorded a kernel trace log and, after analysis, extracted 120 functions with excessively long execution times (the log is attached). There are two scenarios:
After returning to user mode from a page fault interrupt, the execution time of the exit_to_user_mode_prepare function is exceptionally long, ranging from 1 to 10 milliseconds (normally it should be less than 1 microsecond).
During task switching in the idle process scheduler, when the CPU time slice is switched to another process, the execution time of the default_idle function is also exceptionally long, ranging from 1 to 10 milliseconds (normally it should be less than 1 microsecond).
These two scenarios combined account for most of the memcpy time, totaling 430 milliseconds, with the overall copy time being approximately 470–500 milliseconds. Moreover, these kernel activities are serialized and run on different CPU cores.
My WSL 2 environment is as follows:
The code is as follows:
Part of full trace log: exit_to_user_mode_prepare takes 7 ms:
The log of functions with excessively long execution times is as follows:
Expected Behavior
upload takes about 50 ms
Actual Behavior
upload takes more than 450 ms
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: