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 with multiple producers #4348

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

fraidev
Copy link
Contributor

@fraidev fraidev commented Jan 21, 2025

This PR fixes benchmark with many producers and the output interval for latencies:

▷ RELEASE=true make build-cli && flvdr bench producer --num-records 300000
# Fluvio Benchmark Results
created topic benchmark-mrnxowicwc
starting up producer 0
Benchmark started
producer send batch
producer is sending batch
27412 records sent, 41787 records/sec: (213.5 MB/sec), 0.72ms avg latency, 2.59ms max latency
42644 records sent, 42304 records/sec: (216.2 MB/sec), 0.70ms avg latency, 7.33ms max latency
42840 records sent, 42506 records/sec: (217.2 MB/sec), 0.70ms avg latency, 1.93ms max latency
42420 records sent, 42482 records/sec: (217.1 MB/sec), 0.71ms avg latency, 6.18ms max latency
42168 records sent, 42415 records/sec: (216.8 MB/sec), 0.72ms avg latency, 1.90ms max latency
41356 records sent, 42228 records/sec: (215.8 MB/sec), 0.73ms avg latency, 2.42ms max latency
41944 records sent, 42185 records/sec: (215.6 MB/sec), 0.72ms avg latency, 1.97ms max latency

0.71ms avg latency, 7.33ms max latency, 0.69ms p0.50, 0.80ms p0.95, 1.79ms p0.99
300000 total records sent, 42188 records/sec: (215.6 MB/sec) 
Benchmark completed

@fraidev fraidev force-pushed the fix_benchmark_many_producers branch from 9fccfda to 6f780f6 Compare January 21, 2025 05:08
@fraidev fraidev requested a review from sehz January 21, 2025 06:14
@fraidev fraidev marked this pull request as ready for review January 21, 2025 06:14
@fraidev fraidev enabled auto-merge January 21, 2025 06:15
@fraidev fraidev changed the title Fix benchmark many producers fix: benchmark many producers Jan 21, 2025
@fraidev fraidev changed the title fix: benchmark many producers fix: benchmark with multiple producers Jan 21, 2025
@fraidev fraidev force-pushed the fix_benchmark_many_producers branch from d9c1f9a to 2d77c66 Compare January 21, 2025 06:39
let hist = hist.clone();
let stats = stats.clone();
let latencies = latency_histogram.clone();
let stats = total_stats.clone();
spawn(async move {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double spawn loop is inefficient. it may contribute to some latency. not show stopper for this PR, but should flatten this. it's probably better perform accumulator with atomic counter callback then perform analytics in the stat collector

@fraidev fraidev added this pull request to the merge queue Jan 21, 2025
Merged via the queue into infinyon:master with commit 58c526b Jan 21, 2025
102 checks passed
@fraidev fraidev deleted the fix_benchmark_many_producers branch January 21, 2025 17:00
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.

2 participants