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

fix: benchmark dead channels #4359

Merged
merged 2 commits into from
Jan 25, 2025
Merged

Conversation

fraidev
Copy link
Contributor

@fraidev fraidev commented Jan 24, 2025

Should fix #4360

@fraidev fraidev force-pushed the fix_bench_deadlocks branch from f8522e2 to cb526c0 Compare January 24, 2025 00:34
@fraidev fraidev requested a review from sehz January 24, 2025 00:36
@fraidev fraidev marked this pull request as ready for review January 24, 2025 00:36
@sehz
Copy link
Contributor

sehz commented Jan 24, 2025

it's bit weird, last iteration seems to slow down:

36344 records sent, 41584 records/sec: (208.9 MB/sec), 0.72ms avg latency, 2.69ms max latency
42168 records sent, 41895 records/sec: (210.4 MB/sec), 0.71ms avg latency, 3.55ms max latency
21460 records sent, 34783 records/sec: (174.7 MB/sec), 0.72ms avg latency, 2.22ms max latency

0.72ms avg latency, 3.55ms max latency, 0.69ms p0.50, 0.81ms p0.95, 1.93ms p0.99
100000 total records sent, 34783 records/sec: (174.7 MB/sec) 
Benchmark completed

It only uses numbers from last iteration. not from e2e.

Here's suggested strategy:

Suppose you have window of 1 seconds. compute stat for that window (min/max latencies), number of events, total count. when you event has exceed window, compute rate then send them to aggregate stat

@fraidev fraidev force-pushed the fix_bench_deadlocks branch from cb526c0 to d40477b Compare January 24, 2025 01:33
@fraidev
Copy link
Contributor Author

fraidev commented Jan 24, 2025

it's bit weird, last iteration seems to slow down:

36344 records sent, 41584 records/sec: (208.9 MB/sec), 0.72ms avg latency, 2.69ms max latency
42168 records sent, 41895 records/sec: (210.4 MB/sec), 0.71ms avg latency, 3.55ms max latency
21460 records sent, 34783 records/sec: (174.7 MB/sec), 0.72ms avg latency, 2.22ms max latency

0.72ms avg latency, 3.55ms max latency, 0.69ms p0.50, 0.81ms p0.95, 1.93ms p0.99
100000 total records sent, 34783 records/sec: (174.7 MB/sec) 
Benchmark completed

It only uses numbers from last iteration. not from e2e.

Here's suggested strategy:

Suppose you have window of 1 seconds. compute stat for that window (min/max latencies), number of events, total count. when you event has exceed window, compute rate then send them to aggregate stat

Good catch! I added a sleep to send the end command. That was decreasing performance. I remade it without that.

@sehz
Copy link
Contributor

sehz commented Jan 24, 2025

last number doesn't show up:

(base) $> target/release/fluvio-benchmark   producer --num-records 100000 --record-size 5012 
Benchmark started
35896 records sent, 40287 records/sec: (202.3 MB/sec), 0.74ms avg latency, 2.19ms max latency
42392 records sent, 41400 records/sec: (207.9 MB/sec), 0.71ms avg latency, 3.54ms max latency

0.73ms avg latency, 7.03ms max latency, 0.70ms p0.50, 0.82ms p0.95, 1.85ms p0.99
100000 total records sent, 41374 records/sec: (207.8 MB/sec) 
Benchmark completed

@fraidev
Copy link
Contributor Author

fraidev commented Jan 24, 2025

last number doesn't show up:

(base) $> target/release/fluvio-benchmark   producer --num-records 100000 --record-size 5012 
Benchmark started
35896 records sent, 40287 records/sec: (202.3 MB/sec), 0.74ms avg latency, 2.19ms max latency
42392 records sent, 41400 records/sec: (207.9 MB/sec), 0.71ms avg latency, 3.54ms max latency

0.73ms avg latency, 7.03ms max latency, 0.70ms p0.50, 0.82ms p0.95, 1.85ms p0.99
100000 total records sent, 41374 records/sec: (207.8 MB/sec) 
Benchmark completed

Do you mean the blank line? I added it before in another PR to separate the progress of the total result.

Maybe change it for a separator like "---------------"? 😅

Got it, it's not showing all the results if sum all records. I'll fix it.

@fraidev fraidev force-pushed the fix_bench_deadlocks branch from d40477b to 4a80134 Compare January 24, 2025 03:47
@fraidev
Copy link
Contributor Author

fraidev commented Jan 24, 2025

last number doesn't show up:

(base) $> target/release/fluvio-benchmark   producer --num-records 100000 --record-size 5012 
Benchmark started
35896 records sent, 40287 records/sec: (202.3 MB/sec), 0.74ms avg latency, 2.19ms max latency
42392 records sent, 41400 records/sec: (207.9 MB/sec), 0.71ms avg latency, 3.54ms max latency

0.73ms avg latency, 7.03ms max latency, 0.70ms p0.50, 0.82ms p0.95, 1.85ms p0.99
100000 total records sent, 41374 records/sec: (207.8 MB/sec) 
Benchmark completed

I added a fix for it!

@fraidev fraidev force-pushed the fix_bench_deadlocks branch from 4a80134 to 8e70022 Compare January 24, 2025 04:24
@sehz
Copy link
Contributor

sehz commented Jan 24, 2025

Benchmark started
40528 records sent, 46584 records/sec: (234.0 MB/sec), 6.78ms avg latency, 36.93ms max latency
50145 records sent, 48578 records/sec: (244.0 MB/sec), 6.40ms avg latency, 11.45ms max latency
9110 records sent, 34819 records/sec: (174.9 MB/sec), 6.49ms avg latency, 9.61ms max latency

6.56ms avg latency, 36.93ms max latency, 6.25ms p0.50, 8.04ms p0.95, 11.08ms p0.99
100000 total records sent, 48757 records/sec: (244.9 MB/sec) 

can you add total elapsed time as well? summary time 244.9 MB/Sec doesn't seem to be align with numbers from 3 rows.

@fraidev fraidev force-pushed the fix_bench_deadlocks branch 4 times, most recently from 38b6d26 to e35a409 Compare January 24, 2025 18:47
@fraidev
Copy link
Contributor Author

fraidev commented Jan 24, 2025

Benchmark started
40528 records sent, 46584 records/sec: (234.0 MB/sec), 6.78ms avg latency, 36.93ms max latency
50145 records sent, 48578 records/sec: (244.0 MB/sec), 6.40ms avg latency, 11.45ms max latency
9110 records sent, 34819 records/sec: (174.9 MB/sec), 6.49ms avg latency, 9.61ms max latency

6.56ms avg latency, 36.93ms max latency, 6.25ms p0.50, 8.04ms p0.95, 11.08ms p0.99
100000 total records sent, 48757 records/sec: (244.9 MB/sec) 

can you add total elapsed time as well? summary time 244.9 MB/Sec doesn't seem to be align with numbers from 3 rows.

Sure, also fixed that last item slow.

@fraidev fraidev force-pushed the fix_bench_deadlocks branch 7 times, most recently from 64cf096 to 1a391a0 Compare January 24, 2025 23:22
@fraidev fraidev force-pushed the fix_bench_deadlocks branch 4 times, most recently from bfbaf66 to 6277708 Compare January 25, 2025 00:28
@fraidev fraidev force-pushed the fix_bench_deadlocks branch from 6277708 to 4718aec Compare January 25, 2025 00:28
@fraidev fraidev added this pull request to the merge queue Jan 25, 2025
Merged via the queue into infinyon:master with commit 4b46d63 Jan 25, 2025
102 checks passed
@fraidev fraidev deleted the fix_bench_deadlocks branch January 25, 2025 01:36
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.

[Bug]: Benchmark dead channels
2 participants