Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 18, 2024

Results

We send data to the _bulk endpoint and benchmark the results with and without the https://github.com/klauspost/compress library.

Results with varying compression level and event size

Time per operation

Test without_klauspost.txt with_klauspost.txt Improvement
Publish/5_events_with_compression_level_1-12 91.52µ ± 11% 76.34µ ± 2% -16.58%
Publish/5_events_with_compression_level_4-12 126.78µ ± 8% 82.20µ ± 0% -35.16%
Publish/5_events_with_compression_level_7-12 118.2µ ± 1% 109.5µ ± 0% -7.34%
Publish/5_events_with_compression_level_9-12 131.1µ ± 8% 147.3µ ± 3% +12.36%
Publish/50_events_with_compression_level_1-12 453.8µ ± 5% 347.3µ ± 2% -23.47%
Publish/50_events_with_compression_level_4-12 676.3µ ± 5% 422.7µ ± 2% -37.50%
Publish/50_events_with_compression_level_7-12 704.8µ ± 2% 592.2µ ± 1% -15.98%
Publish/50_events_with_compression_level_9-12 878.8µ ± 3% 991.6µ ± 2% +12.84%
Publish/500_events_with_compression_level_1-12 435.4µ ± 1% 343.6µ ± 2% -21.09%
Publish/500_events_with_compression_level_4-12 636.7µ ± 1% 428.6µ ± 12% -32.68%
Publish/500_events_with_compression_level_7-12 681.7µ ± 1% 601.5µ ± 1% -11.77%
Publish/500_events_with_compression_level_9-12 855.8µ ± 2% 992.4µ ± 2% +15.96%
Geomean 364.7µ 309.3µ -15.17%

Bytes per operation

Test without_klauspost.txt with_klauspost.txt Improvement
Publish/5_events_with_compression_level_1-12 18.78Ki ± 0% 18.74Ki ± 0% -0.20%
Publish/5_events_with_compression_level_4-12 18.83Ki ± 0% 18.68Ki ± 0% -0.79%
Publish/5_events_with_compression_level_7-12 18.83Ki ± 0% 18.75Ki ± 0% -0.41%
Publish/5_events_with_compression_level_9-12 18.79Ki ± 0% 18.82Ki ± 0% ~
Publish/50_events_with_compression_level_1-12 88.73Ki ± 0% 88.46Ki ± 0% -0.31%
Publish/50_events_with_compression_level_4-12 88.27Ki ± 0% 88.32Ki ± 0% ~
Publish/50_events_with_compression_level_7-12 88.31Ki ± 0% 88.51Ki ± 0% +0.23%
Publish/50_events_with_compression_level_9-12 88.37Ki ± 0% 88.83Ki ± 0% +0.52%
Publish/500_events_with_compression_level_1-12 88.39Ki ± 0% 88.44Ki ± 0% ~
Publish/500_events_with_compression_level_4-12 88.30Ki ± 0% 88.47Ki ± 0% +0.19%
Publish/500_events_with_compression_level_7-12 88.28Ki ± 0% 88.55Ki ± 0% +0.31%
Publish/500_events_with_compression_level_9-12 88.27Ki ± 0% 88.86Ki ± 0% +0.66%
Geomean 52.76Ki 52.78Ki +0.04%

Summary

With the ' klauspost ' library, there is a significant speedup across tests for most compression levels with varying event sizes. But with compression level 9, it is slower - resulting in a performance drop of around 12-16%.

This PR also replaces compress/gzip to klauspost/compress/gzip

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues


This is an automatic backport of pull request #41584 done by [Mergify](https://mergify.com).

#41584)

- This PR replaces compress/gzip to klauspost/compress/gzip
- We send data to the _bulk endpoint and benchmark the results

(cherry picked from commit 18e256f)
@mergify mergify bot requested review from a team as code owners November 18, 2024 18:56
@mergify mergify bot added the backport label Nov 18, 2024
@mergify mergify bot requested review from khushijain21 and leehinman and removed request for a team November 18, 2024 18:56
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 18, 2024
@botelastic
Copy link

botelastic bot commented Nov 18, 2024

This pull request doesn't have a Team:<team> label.

@khushijain21 khushijain21 merged commit 6061efc into 8.x Nov 19, 2024
7 checks passed
@khushijain21 khushijain21 deleted the mergify/bp/8.x/pr-41584 branch November 19, 2024 04:07
@khushijain21 khushijain21 mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport needs_team Indicates that the issue/PR needs a Team:* label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants