dotnet / dotnet/perf-autofiling-issues

[Perf] Linux/x64: 8 Improvements on 6/25/2026 12:43:10 AM +00:00

Open
#75,283 1 comment 0 reactions 0 assignees View on GitHub
arch-x64 branch-refs/heads/main compilationmode-tiered kind-micro_mono llvm-true Look Again mono-aot mono-llvm monoaot-true monointerpreter-false os-linux perf-improvement runkind-micro_mono runtime-mono untriaged
Dominant language
No language data
Stars
10
Forks
8
PR merge metrics
PR metrics pending

Description

### Run Information

Name | Value
-- | --
Architecture | x64
OS | ubuntu 22.04
Queue | ViperUbuntu
Baseline | [9c1fdaea7e4595785db31a5a219f66fb7d2a4ec1](https://github.com/dotnet/runtime/commit/9c1fdaea7e4595785db31a5a219f66fb7d2a4ec1)
Compare | [818cfd5edcda78ac3eb201af392fd301ab9ad46b](https://github.com/dotnet/runtime/commit/818cfd5edcda78ac3eb201af392fd301ab9ad46b)
Diff | [Diff](https://github.com/dotnet/runtime/compare/9c1fdaea7e4595785db31a5a219f66fb7d2a4ec1...818cfd5edcda78ac3eb201af392fd301ab9ad46b)
Configs | CompilationMode:tiered, LLVM:true, MonoAOT:true, MonoInterpreter:false, RunKind:micro_mono

### Improvements in System.Text.Json.Tests.Perf_Strings

Benchmark | Baseline | Test | Test/Base | Test Quality | Edge Detector | Baseline IR | Compare IR | IR Ratio
-- | -- | -- | -- | -- | -- | -- | -- | --
|

  • [WriteStringsUtf8 - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 97.13 ms | 35.73 ms | 0.37 | 0.00 | False | | |
|
  • [WriteStringsUtf8 - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 97.00 ms | 35.73 ms | 0.37 | 0.01 | False | | |
|
  • [WriteStringsUtf8 - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 97.02 ms | 36.10 ms | 0.37 | 0.02 | False | | |
|
  • [WriteStringsUtf8 - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 97.12 ms | 36.22 ms | 0.37 | 0.01 | False | | |
|
  • [WriteStringsUtf16 - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 106.35 ms | 42.87 ms | 0.40 | 0.00 | False | | |
|
  • [WriteStringsUtf16 - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 106.74 ms | 43.06 ms | 0.40 | 0.02 | False | | |
|
  • [WriteStringsUtf16 - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 106.33 ms | 42.92 ms | 0.40 | 0.00 | False | | |
|
  • [WriteStringsUtf16 - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 106.14 ms | 42.92 ms | 0.40 | 0.00 | False | | |

![graph]()
![graph]()
![graph]()
![graph]()
![graph]()
![graph]()
![graph]()
![graph]()
[Test Report]()

### Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Repro Steps

#### Prerequisites (Files either built locally (with build.(sh/cmd) or downloaded from payload above (if same system setup) (in this order))
- Libraries build extracted to `runtime/artifacts` or build instructions: [Libraries README](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/libraries/README.md) args: `-subset libs+libs.tests -rc release -configuration Release -arch $RunArch -framework net8.0`
- CoreCLR product build extracted to `runtime/artifacts/bin/coreclr/$RunOS.$RunArch.Release`, build instructions: [CoreCLR README](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/README.md) args: `-subset clr+libs -rc release -configuration Release -arch $RunArch -framework net8.0`
- AOT MONO build extracted to `runtime/artifacts/bin/mono/$RunOS.$RunArch.Release`, build instructions: [MONO README](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/mono/README.md) args: `-arch $RunArch -os $RunOS -s mono+libs+host+packs -c Release /p:CrossBuild=false /p:MonoLLVMUseCxx11Abi=false`
- Dotnet SDK installed for dotnet commands
- Running commands from the runtime folder

Linux
```cmd
# Set $RunDir to the runtime directory
RunDir=`pwd`

# Set the OS, arch, and OSId
RunOS='linux'
RunOSId='linux'
RunArch='x64'

# Create aot directory
mkdir -p $RunDir/artifacts/bin/aot/sgen
mkdir -p $RunDir/artifacts/bin/aot/pack
cp -r $RunDir/artifacts/obj/mono/$RunOS.$RunArch.Release/mono/* $RunDir/artifacts/bin/aot/sgen
cp -r $RunDir/artifacts/bin/microsoft.netcore.app.runtime.$RunOS-$RunArch/Release/* $RunDir/artifacts/bin/aot/pack

# Create Core Root
$RunDir/src/tests/build.sh release $RunArch generatelayoutonly /p:LibrariesConfiguration=Release

# Clone performance
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $RunDir/performance

# One line run:
python3 $RunDir/performance/scripts/benchmarks_ci.py --csproj $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --incremental no --architecture $RunArch -f net8.0 --filter 'System.Text.Json.Tests.Perf_Strings*' --bdn-artifacts $RunDir/artifacts/BenchmarkDotNet.Artifacts --bdn-arguments="--anyCategories Libraries Runtime --category-exclusion-filter NoAOT NoWASM --runtimes monoaotllvm --aotcompilerpath $RunDir/artifacts/bin/aot/sgen/mini/mono-sgen --customruntimepack $RunDir/artifacts/bin/aot/pack --aotcompilermode llvm --logBuildOutput --generateBinLog"

# Individual Commands:
# Restore
dotnet restore $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --packages $RunDir/performance/artifacts/packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Build
dotnet build $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore /p:NuGetPackageRoot=$RunDir/performance/artifacts/packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Run
dotnet run --project $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore --no-build -- --filter System.Text.Json.Tests.Perf_Strings* --anyCategories Libraries Runtime " --category-exclusion-filter NoAOT NoWASM --runtimes monoaotllvm --aotcompilerpath $RunDir/artifacts/bin/aot/sgen/mini/mono-sgen --customruntimepack $RunDir/artifacts/bin/aot/pack --aotcompilermode llvm --logBuildOutput --generateBinLog " --artifacts $RunDir/artifacts/BenchmarkDotNet.Artifacts --packages $RunDir/performance/artifacts/packages --buildTimeout 1200
```

Windows
```cmd
# Set $RunDir to the runtime directory
$RunDir="FullPathHere"

# Set the OS, arch, and OSId
RunOS='windows'
RunOSId='win'
RunArch='x64'

# Create aot directory
mkdir $RunDir\artifacts\bin\aot\sgen
mkdir $RunDir\artifacts\bin\aot\pack
xcopy $RunDir\artifacts\obj\mono\$RunOS.$RunArch.Release\mono $RunDir\artifacts\bin\aot\sgen\ /e /y
xcopy $RunDir\artifacts\bin\microsoft.netcore.app.runtime.$RunOSId-$RunArch\Release $RunDir\artifacts\bin\aot\pack\ /e /y

# Create Core Root
$RunDir\src\tests\build.cmd release $RunArch generatelayoutonly /p:LibrariesConfiguration=Release

# Clone performance
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $RunDir\performance

# One line run:
python3 $RunDir\performance\scripts\benchmarks_ci.py --csproj $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --incremental no --architecture $RunArch -f net8.0 --filter 'System.Text.Json.Tests.Perf_Strings*' --bdn-artifacts $RunDir\artifacts\BenchmarkDotNet.Artifacts --bdn-arguments="--anyCategories Libraries Runtime --category-exclusion-filter NoAOT NoWASM --runtimes monoaotllvm --aotcompilerpath $RunDir\artifacts\bin\aot\sgen\mini\mono-sgen.exe --customruntimepack $RunDir\artifacts\bin\aot\pack --aotcompilermode llvm --logBuildOutput --generateBinLog"

# Individual Commands:
# Restore
dotnet restore $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --packages $RunDir\performance\artifacts\packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Build
dotnet build $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore /p:NuGetPackageRoot=$RunDir\performance\artifacts\packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Run
dotnet run --project $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore --no-build -- --filter System.Text.Json.Tests.Perf_Strings* --anyCategories Libraries Runtime " --category-exclusion-filter NoAOT NoWASM --runtimes monoaotllvm --aotcompilerpath $RunDir\artifacts\bin\aot\sgen\mini\mono-sgen.exe --customruntimepack $RunDir\artifacts\bin\aot\pack -aotcompilermode llvm --logBuildOutput --generateBinLog " --artifacts $RunDir\artifacts\BenchmarkDotNet.Artifacts --packages $RunDir\performance\artifacts\packages --buildTimeout 1200
```

### System.Text.Json.Tests.Perf_Strings.WriteStringsUtf8(Formatted: False, SkipValidation: True, Escaped: AllEscaped)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Text.Json.Tests.Perf_Strings.WriteStringsUtf8(Formatted: False, SkipValidation: False, Escaped: AllEscaped)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Text.Json.Tests.Perf_Strings.WriteStringsUtf8(Formatted: True, SkipValidation: False, Escaped: AllEscaped)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Text.Json.Tests.Perf_Strings.WriteStringsUtf8(Formatted: True, SkipValidation: True, Escaped: AllEscaped)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Text.Json.Tests.Perf_Strings.WriteStringsUtf16(Formatted: True, SkipValidation: True, Escaped: AllEscaped)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Text.Json.Tests.Perf_Strings.WriteStringsUtf16(Formatted: False, SkipValidation: False, Escaped: AllEscaped)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Text.Json.Tests.Perf_Strings.WriteStringsUtf16(Formatted: False, SkipValidation: True, Escaped: AllEscaped)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Text.Json.Tests.Perf_Strings.WriteStringsUtf16(Formatted: True, SkipValidation: False, Escaped: AllEscaped)

#### ETL Files

#### Histogram

#### JIT Disasms

### Docs

[Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md)
[Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the System.Text.Json benchmark source at src/benchmarks/micro/libraries/System.Text.Json/Utf8JsonWriter/Perf.Strings.cs, especially the Perf.Strings.cs ranges linked in the report, and compare the listed baseline and compare commits. The issue reports generated benchmark improvements but does not specify a code change or acceptance criteria, so no concrete definition of done is provided.

Written by the indexing model from the issue text.

Assessment

Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.