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

Add project for running microbenchmarks #81

Merged
merged 19 commits into from
Mar 25, 2024

Conversation

PaulusParssinen
Copy link
Contributor

@PaulusParssinen PaulusParssinen commented Mar 22, 2024

This PR adds a BenchmarkDotNet project to the benchmarks directory for future microbenchmarks. I included some initial RESP-protocol low-level integer reading and writing benchmarks as an example, which will likely be tweaked more later. The fact that everything takes pointers instead of, say Span<T> makes it a little bit painful to write microbenchmarks at the moment.

Having shared benchmark suite that is precise and reproducible will allow us to substantiate future performance PRs with real data. BenchmarkDotNet also has loads of knobs to configure it for pretty much any benchmarking needs.

@PaulusParssinen PaulusParssinen marked this pull request as draft March 22, 2024 20:49
@PaulusParssinen PaulusParssinen marked this pull request as ready for review March 22, 2024 20:51
@PaulusParssinen PaulusParssinen changed the title Add project for running microbenchmerks Add project for running microbenchmarks Mar 22, 2024
benchmark/README.md Outdated Show resolved Hide resolved
@PaulusParssinen PaulusParssinen marked this pull request as draft March 25, 2024 07:55
* In the low-level read benchmarks, OperationsPerInvoke should amortize the small noise from the pinning
* In write benchmarks, OperationsPerInvoke should allow the comparing the benchmarks which use random values to the other constant integer benches
@PaulusParssinen
Copy link
Contributor Author

PaulusParssinen commented Mar 25, 2024

Tweaked the benchmarks a bit more and added link to the BDN best practices in the docs.

edit: 9d1fd74 adds default configuration to remove the Dynamic PGO overhead for .NET 8 which enable it by default. Also removed .NET 6 and 7 TFMs to simplify the command as the BDN project is primarily intended for contributors.

@PaulusParssinen PaulusParssinen marked this pull request as ready for review March 25, 2024 09:55
@PaulusParssinen PaulusParssinen marked this pull request as draft March 25, 2024 10:07
Garnet.sln Show resolved Hide resolved
@PaulusParssinen PaulusParssinen marked this pull request as ready for review March 25, 2024 18:27
@badrishc badrishc merged commit 934dad3 into microsoft:main Mar 25, 2024
12 checks passed
@PaulusParssinen PaulusParssinen deleted the resp-microbenchmarks branch March 26, 2024 06:12
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants