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

System.Diagnostics.Perf_Process.GetProcessById has regressed 50% on Windows #67847

Closed
adamsitnik opened this issue Apr 11, 2022 · 3 comments
Closed

Comments

@adamsitnik
Copy link
Member

System.Diagnostics.Perf_Process.GetProcessById has regressed 50% on Windows

Reporting System:

image

Looking at the commit diff it's most likely caused by #64723 (cc @epeshk)

Repro:

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_monthly.py net7.0-preview2 net7.0-preview3 --filter System.Diagnostics.Perf_Process.GetProcessById

System.Diagnostics.Perf_Process.GetProcessById

Result Ratio Operating System Bit
Slower 0.48 Windows 10 X64
Slower 0.50 Windows 11 X64
Slower 0.49 Windows 11 X64
Slower 0.44 Windows 11 X64
Same 1.02 alpine 3.13 X64
Same 1.02 centos 7 X64
Same 0.97 debian 11 X64
Same 0.96 pop 20.04 X64
Same 1.00 ubuntu 18.04 X64
Faster 1.15 ubuntu 18.04 X64
Same 0.96 alpine 3.12 Arm64
Faster 1.18 debian 11 Arm64
Same 1.01 ubuntu 18.04 Arm64
Slower 0.47 Windows 10 Arm64
Slower 0.42 Windows 11 Arm64
Slower 0.43 Windows 10 X86
Slower 0.48 Windows 11 X86
Slower 0.49 Windows 11 X86
Slower 0.34 Windows 7 SP1 X86
Same 1.07 ubuntu 18.04 Arm
Slower 0.44 Windows 10 Arm
Same 1.02 macOS Monterey 12.2.1 X64
Same 1.05 macOS Monterey 12.3.1 X64
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Apr 11, 2022
@ghost
Copy link

ghost commented Apr 11, 2022

Tagging subscribers to this area: @dotnet/area-system-diagnostics-process
See info in area-owners.md if you want to be subscribed.

Issue Details

System.Diagnostics.Perf_Process.GetProcessById has regressed 50% on Windows

Reporting System:

image

Looking at the commit diff it's most likely caused by #64723 (cc @epeshk)

Repro:

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_monthly.py net7.0-preview2 net7.0-preview3 --filter System.Diagnostics.Perf_Process.GetProcessById

System.Diagnostics.Perf_Process.GetProcessById

Result Ratio Operating System Bit
Slower 0.48 Windows 10 X64
Slower 0.50 Windows 11 X64
Slower 0.49 Windows 11 X64
Slower 0.44 Windows 11 X64
Same 1.02 alpine 3.13 X64
Same 1.02 centos 7 X64
Same 0.97 debian 11 X64
Same 0.96 pop 20.04 X64
Same 1.00 ubuntu 18.04 X64
Faster 1.15 ubuntu 18.04 X64
Same 0.96 alpine 3.12 Arm64
Faster 1.18 debian 11 Arm64
Same 1.01 ubuntu 18.04 Arm64
Slower 0.47 Windows 10 Arm64
Slower 0.42 Windows 11 Arm64
Slower 0.43 Windows 10 X86
Slower 0.48 Windows 11 X86
Slower 0.49 Windows 11 X86
Slower 0.34 Windows 7 SP1 X86
Same 1.07 ubuntu 18.04 Arm
Slower 0.44 Windows 10 Arm
Same 1.02 macOS Monterey 12.2.1 X64
Same 1.05 macOS Monterey 12.3.1 X64
Author: adamsitnik
Assignees: -
Labels:

area-System.Diagnostics.Process, os-windows

Milestone: -

@stephentoub
Copy link
Member

I believe this is expected. The previous code was simply wrong, and doing the right thing is more expensive.

@danmoseley
Copy link
Member

Right, the new call to GetExitCodeProcess is necessary.

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Apr 16, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants