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

Optimize write buffer capacity #971

Closed

Conversation

caspervonb
Copy link
Collaborator

@caspervonb caspervonb commented May 17, 2023

Default capacity is 8k, this bumps it to 64k and makes it configurable.

@caspervonb caspervonb requested a review from Jarema May 17, 2023 10:27
@caspervonb caspervonb force-pushed the optimize-write-buffer-capacity branch from 362b548 to 5ddc6eb Compare May 17, 2023 11:29
@caspervonb
Copy link
Collaborator Author

caspervonb commented May 17, 2023

Not completely trusting the benchmark in this but might be something in bumping the buffer size a bit more.

async-nats: publish throughput/32                                                                           
                        time:   [51.839 µs 52.507 µs 53.419 µs]
                        thrpt:  [57.129 MiB/s 58.121 MiB/s 58.870 MiB/s]
                 change:
                        time:   [-2.2753% -0.1841% +1.9606%] (p = 0.88 > 0.05)
                        thrpt:  [-1.9229% +0.1845% +2.3283%]
                        No change in performance detected.
Found 1 outliers among 30 measurements (3.33%)
  1 (3.33%) high mild
async-nats: publish throughput/1024                                                                           
                        time:   [75.575 µs 76.391 µs 77.555 µs]
                        thrpt:  [1.2297 GiB/s 1.2484 GiB/s 1.2619 GiB/s]
                 change:
                        time:   [-42.047% -40.781% -39.589%] (p = 0.00 < 0.05)
                        thrpt:  [+65.532% +68.864% +72.554%]
                        Performance has improved.
Found 3 outliers among 30 measurements (10.00%)
  3 (10.00%) high mild
async-nats: publish throughput/8192                                                                           
                        time:   [193.45 µs 201.42 µs 208.77 µs]
                        thrpt:  [3.6545 GiB/s 3.7877 GiB/s 3.9438 GiB/s]
                 change:
                        time:   [-77.907% -77.243% -76.602%] (p = 0.00 < 0.05)
                        thrpt:  [+327.39% +339.43% +352.64%]
                        Performance has improved.
Found 2 outliers among 30 measurements (6.67%)
  2 (6.67%) high mild

async-nats: publish messages amount/32                                                                           
                        time:   [50.903 µs 51.252 µs 51.622 µs]
                        thrpt:  [1.9371 Melem/s 1.9512 Melem/s 1.9645 Melem/s]
                 change:
                        time:   [-3.5160% -2.2907% -1.0012%] (p = 0.00 < 0.05)
                        thrpt:  [+1.0114% +2.3444% +3.6442%]
                        Performance has improved.
Found 1 outliers among 30 measurements (3.33%)
  1 (3.33%) high mild
async-nats: publish messages amount/1024                                                                           
                        time:   [75.895 µs 76.682 µs 77.578 µs]
                        thrpt:  [1.2890 Melem/s 1.3041 Melem/s 1.3176 Melem/s]
                 change:
                        time:   [-45.543% -44.339% -43.167%] (p = 0.00 < 0.05)
                        thrpt:  [+75.953% +79.659% +83.631%]
                        Performance has improved.
async-nats: publish messages amount/8192                                                                           
                        time:   [199.41 µs 202.28 µs 205.71 µs]
                        thrpt:  [486.13 Kelem/s 494.36 Kelem/s 501.49 Kelem/s]
                 change:
                        time:   [-77.858% -77.177% -76.493%] (p = 0.00 < 0.05)
                        thrpt:  [+325.41% +338.15% +351.64%]
                        Performance has improved.

subscribe amount/32     time:   [1.2371 ms 1.2466 ms 1.2570 ms]                                
                        thrpt:  [79.555 Kelem/s 80.219 Kelem/s 80.832 Kelem/s]
                 change:
                        time:   [+258.28% +262.69% +267.42%] (p = 0.00 < 0.05)
                        thrpt:  [-72.783% -72.428% -72.089%]
                        Performance has regressed.
Found 1 outliers among 30 measurements (3.33%)
  1 (3.33%) low mild
subscribe amount/1024   time:   [319.44 µs 322.63 µs 325.78 µs]                                 
                        thrpt:  [306.95 Kelem/s 309.96 Kelem/s 313.04 Kelem/s]
                 change:
                        time:   [-20.470% -18.955% -17.315%] (p = 0.00 < 0.05)
                        thrpt:  [+20.941% +23.388% +25.738%]
                        Performance has improved.
Found 1 outliers among 30 measurements (3.33%)
  1 (3.33%) high mild
subscribe amount/8192   time:   [1.3011 ms 1.7104 ms 2.1781 ms]                                  
                        thrpt:  [45.911 Kelem/s 58.464 Kelem/s 76.860 Kelem/s]
                 change:
                        time:   [-53.005% -38.319% -21.793%] (p = 0.00 < 0.05)
                        thrpt:  [+27.866% +62.126% +112.79%]
                        Performance has improved.

@caspervonb caspervonb marked this pull request as ready for review July 26, 2023 14:11
@caspervonb caspervonb mentioned this pull request Jul 27, 2023
5 tasks
@caspervonb caspervonb mentioned this pull request Aug 3, 2023
7 tasks
@Jarema Jarema closed this in #1060 Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant