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

Refactor benchmarks #853

Merged
merged 7 commits into from
Nov 13, 2023
Merged

Refactor benchmarks #853

merged 7 commits into from
Nov 13, 2023

Conversation

Jake-Shadle
Copy link
Collaborator

This refactors the benchmarks from using criterion to divan. Divan is far more lightweight in general, and should make benchmarks easier to add in the future versus criterion. There are some missing features like HTML reports (planned?) and perf diffing (maybe?) from last runs, but IMO those are okay to lose for now in favor of easier benchmarking.

Here is the current output:

Timer precision: 20 ns
read_write     fastest       │ slowest       │ median        │ mean          │ samples │ iters
├─ read                      │               │               │               │         │
│  ├─ direct                 │               │               │               │         │
│  │  ├─ 254   51.63 ms      │ 56.87 ms      │ 54.57 ms      │ 54.47 ms      │ 10      │ 10
│  │  │        49.18 MB/s    │ 44.65 MB/s    │ 46.54 MB/s    │ 46.62 MB/s    │         │
│  │  ├─ 508   54.71 ms      │ 57.86 ms      │ 56.47 ms      │ 56.39 ms      │ 10      │ 10
│  │  │        92.84 MB/s    │ 87.79 MB/s    │ 89.94 MB/s    │ 90.07 MB/s    │         │
│  │  ╰─ 1500  56.2 ms       │ 58.71 ms      │ 57.66 ms      │ 57.6 ms       │ 10      │ 10
│  │           266.8 MB/s    │ 255.4 MB/s    │ 260.1 MB/s    │ 260.3 MB/s    │         │
│  ╰─ quilkin                │               │               │               │         │
│     ├─ 254   117.7 ms      │ 147.6 ms      │ 118.3 ms      │ 121.5 ms      │ 10      │ 10
│     │        21.56 MB/s    │ 17.2 MB/s     │ 21.45 MB/s    │ 20.9 MB/s     │         │
│     ├─ 508   115.7 ms      │ 123.4 ms      │ 122.7 ms      │ 121.4 ms      │ 10      │ 10
│     │        43.9 MB/s     │ 41.15 MB/s    │ 41.38 MB/s    │ 41.83 MB/s    │         │
│     ╰─ 1500  121.1 ms      │ 130.8 ms      │ 124.1 ms      │ 124.6 ms      │ 10      │ 10
│              123.7 MB/s    │ 114.6 MB/s    │ 120.8 MB/s    │ 120.3 MB/s    │         │
╰─ write                     │               │               │               │         │
   ├─ direct                 │               │               │               │         │
   │  ├─ 254   51.24 ms      │ 60.71 ms      │ 54.83 ms      │ 55.22 ms      │ 10      │ 10
   │  │        49.57 MB/s    │ 41.83 MB/s    │ 46.32 MB/s    │ 45.99 MB/s    │         │
   │  ├─ 508   50.65 ms      │ 58.14 ms      │ 55.77 ms      │ 55.27 ms      │ 10      │ 10
   │  │        100.2 MB/s    │ 87.36 MB/s    │ 91.07 MB/s    │ 91.9 MB/s     │         │
   │  ╰─ 1500  56.42 ms      │ 58.23 ms      │ 57.12 ms      │ 57.19 ms      │ 10      │ 10
   │           265.8 MB/s    │ 257.5 MB/s    │ 262.6 MB/s    │ 262.2 MB/s    │         │
   ╰─ quilkin                │               │               │               │         │
      ├─ 254   115.7 ms      │ 119.8 ms      │ 119.3 ms      │ 118.5 ms      │ 10      │ 10
      │        21.93 MB/s    │ 21.18 MB/s    │ 21.28 MB/s    │ 21.42 MB/s    │         │
      ├─ 508   120 ms        │ 124.4 ms      │ 120.9 ms      │ 121.3 ms      │ 10      │ 10
      │        42.32 MB/s    │ 40.83 MB/s    │ 41.98 MB/s    │ 41.84 MB/s    │         │
      ╰─ 1500  123.7 ms      │ 132.6 ms      │ 124.6 ms      │ 125.7 ms      │ 10      │ 10
               121.2 MB/s    │ 113 MB/s      │ 120.2 MB/s    │ 119.3 MB/s    │         │

@Jake-Shadle
Copy link
Collaborator Author

Note there is a slight bug somewhere where starting a quilkin proxy in the benchmarks will spin up, but no socket writes will reach it. I think this might be some form of leak/resource exhaustion since starting a new benchmark process will "fix" the issue. I'm fairly sure this issue exists on main, but it's not noticed since the current benchmarks only spinup 2 instances for all of the benchmarks, whereas these spinup a new instance for each package size on both read and write.

@quilkin-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 0850f05c-e64f-4226-a170-016ca3d78420

The following development images have been built, and will exist for the next 30 days:

To build this version:

git fetch git@github.com:googleforgames/quilkin.git pull/853/head:pr_853 && git checkout pr_853
cargo build

@XAMPPRocky XAMPPRocky merged commit 044de43 into main Nov 13, 2023
3 checks passed
@Jake-Shadle Jake-Shadle deleted the divan branch November 24, 2023 08:46
@markmandel markmandel added area/performance Anything to do with Quilkin being slow, or making it go faster. kind/cleanup Refactoring code, fixing up documentation, etc area/build-tools Development tooling. labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. area/performance Anything to do with Quilkin being slow, or making it go faster. kind/cleanup Refactoring code, fixing up documentation, etc size/l
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants