Performance regressions found in Brotli v1.1.0 #520

Open
opened 2026-01-29 20:45:08 +00:00 by claunia · 3 comments
Owner

Originally created by @carlossanlop on GitHub (Sep 19, 2024).

The dotnet/runtime repo recently updated its in-tree copy of its Brotli dependency from v1.0.9 to v1.1.0.

We ran our performance benchmarks, and we noticed regressions in Linux-x64 and Windows-x64.

Most of our regression results were under 15%, but 6 results were between 39% an 49%.

Here's a list of the tests that showed regressions:

Windows x64

  • 49% - Decompress_WithState(level: Fastest, file: "TestDocument.pdf")
  • 47% - Decompress_WithState(level: Optimal, file: "TestDocument.pdf")
  • 47% - Decompress_WithoutState(level: Fastest, file: "TestDocument.pdf")
  • 47% - Decompress_WithoutState(level: Optimal, file: "TestDocument.pdf")
  • 39% - Decompress(level: Fastest, file: "TestDocument.pdf")
  • 39% - Decompress(level: Optimal, file: "TestDocument.pdf")
  • 13% - Decompress_WithoutState(level: Fastest, file: "alice29.txt")
  • 12% - Decompress_WithoutState(level: Optimal, file: "alice29.txt")
  • 12% - Decompress_WithState(level: Fastest, file: "alice29.txt")
  • 11% - Decompress_WithState(level: Optimal, file: "alice29.txt")
  • 11% - Decompress(level: Fastest, file: "alice29.txt")
  • 10% - Decompress(level: Optimal: file: "alice29.txt")
  • 10% - Decompress_WithState(level: Fastest, file: "sum")
  • 10% - Decompress_WithoutState(level: Fastest, file: "sum")
  • 09% - Decompress(level: Fastest, file: "sum")

Linux x64

  • 16% - Compress_WithoutState(level: Optimal, file: "TestDocument.pdf")
  • 16% - Compress_WithState(level: Optimal, file: "TestDocument.pdf")
  • 15% - Compress_WithoutState(level: Optimal, file: "alice29.txt")
  • 15% - Compress_WithoutState(level: Optimal, file: "sum")
  • 14% - Compress_WithState(level: Optimal, file: "sum")
  • 13% - Compress_WithState(level: Optimal, file: "alice29.txt")

Some more info:

Unfortunately, the v1.1.0 tag has no mention of known perf regressions, so we were wondering if you were aware of these results and if you could help us figure out the possible root causes.

Originally created by @carlossanlop on GitHub (Sep 19, 2024). The [dotnet/runtime](https://github.com/dotnet/runtime) repo recently [updated](https://github.com/dotnet/runtime/pull/107102/files) its in-tree copy of its Brotli dependency from [v1.0.9](https://github.com/google/brotli/releases/tag/v1.0.9) to [v1.1.0](https://github.com/google/brotli/releases/tag/v1.1.0). We ran our performance benchmarks, and we noticed regressions in [Linux-x64](https://github.com/dotnet/perf-autofiling-issues/issues/40587) and [Windows-x64](https://github.com/dotnet/runtime/issues/107302). Most of our regression results were under **15%**, but 6 results were between **39%** an **49%**. Here's a list of the tests that showed regressions: #### Windows x64 - 49% - Decompress_WithState(level: Fastest, file: "TestDocument.pdf") - 47% - Decompress_WithState(level: Optimal, file: "TestDocument.pdf") - 47% - Decompress_WithoutState(level: Fastest, file: "TestDocument.pdf") - 47% - Decompress_WithoutState(level: Optimal, file: "TestDocument.pdf") - 39% - Decompress(level: Fastest, file: "TestDocument.pdf") - 39% - Decompress(level: Optimal, file: "TestDocument.pdf") - 13% - Decompress_WithoutState(level: Fastest, file: "alice29.txt") - 12% - Decompress_WithoutState(level: Optimal, file: "alice29.txt") - 12% - Decompress_WithState(level: Fastest, file: "alice29.txt") - 11% - Decompress_WithState(level: Optimal, file: "alice29.txt") - 11% - Decompress(level: Fastest, file: "alice29.txt") - 10% - Decompress(level: Optimal: file: "alice29.txt") - 10% - Decompress_WithState(level: Fastest, file: "sum") - 10% - Decompress_WithoutState(level: Fastest, file: "sum") - 09% - Decompress(level: Fastest, file: "sum") #### Linux x64 - 16% - Compress_WithoutState(level: Optimal, file: "TestDocument.pdf") - 16% - Compress_WithState(level: Optimal, file: "TestDocument.pdf") - 15% - Compress_WithoutState(level: Optimal, file: "alice29.txt") - 15% - Compress_WithoutState(level: Optimal, file: "sum") - 14% - Compress_WithState(level: Optimal, file: "sum") - 13% - Compress_WithState(level: Optimal, file: "alice29.txt") Some more info: - Our benchmark methods can be found [here](https://github.com/dotnet/performance/blob/main/src/benchmarks/micro/libraries/System.IO.Compression/Brotli.cs Files tested: https://github.com/dotnet/performance/tree/main/src/benchmarks/micro/libraries/System.IO.Compression/TestData). - Our in-tree copy of Brotli v1.1.0 is found [here](https://github.com/dotnet/runtime/tree/release/9.0/src/native/external/brotli). - The managed code that consumes the in-tree copy of Brotli can be found [here](https://github.com/dotnet/runtime/tree/release/9.0/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression). - [These](https://github.com/dotnet/runtime/blob/a95d038411e80f07b5ef1264cc8425f55fbc5ec9/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/BrotliUtils.cs) are the mappings of the `CompressionLevel` enum to Brotli quality values: - "Fastest" => 1 - "Optimal" => 4: Unfortunately, the [v1.1.0 tag](https://github.com/google/brotli/releases/tag/v1.1.0) has no mention of known perf regressions, so we were wondering if you were aware of these results and if you could help us figure out the possible root causes.
Author
Owner

@eustas commented on GitHub (Nov 19, 2024):

Hello. Thanks for the report. I'll investigate soon.

We thoroughly test and polish changes until they are at least as performant as before. Likely regression happens on arch / compiler / OS combination we do not track.

@eustas commented on GitHub (Nov 19, 2024): Hello. Thanks for the report. I'll investigate soon. We thoroughly test and polish changes until they are at least as performant as before. Likely regression happens on arch / compiler / OS combination we do not track.
Author
Owner

@carlossanlop commented on GitHub (Nov 19, 2024):

Likely regression happens on arch / compiler / OS combination we do not track.

We found them in Linux-x64 and Windows-x64.

@carlossanlop commented on GitHub (Nov 19, 2024): > Likely regression happens on arch / compiler / OS combination we do not track. We found them in [Linux-x64](https://github.com/dotnet/perf-autofiling-issues/issues/40587) and [Windows-x64](https://github.com/dotnet/runtime/issues/107302).
Author
Owner

@pps83 commented on GitHub (Apr 24, 2025):

Hello. Thanks for the report. I'll investigate soon.

any news? Seems like these regressions reserve to be addressed

@pps83 commented on GitHub (Apr 24, 2025): > Hello. Thanks for the report. I'll investigate soon. any news? Seems like these regressions reserve to be addressed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#520