Add syslog adaptor benchmarks#3463
Conversation
|
Benchmark smoke results from this workspace. These used tiny inputs to validate the scripts and the RFC6587 sink wiring, so treat the relative ordering as a sanity check only, not as production throughput data. Direct formatter + TCP send: Broadway end-to-end: Interpretation: The direct send benchmark is mostly isolating formatter cost plus the number of TCP sends. With this tiny input, batching wins clearly because it does fewer The Broadway smoke run includes pipeline startup, BufferProducer polling, processor/batcher handoff, NimblePool checkout, TCP send, and receiver parsing. At this very small event count, fixed Broadway overhead dominates, so the no-batcher path can look slightly faster than the batched path. The preformat variant is much slower here because it pays formatting cost in For useful throughput comparison, run the same scripts with larger inputs, for example: SYSLOG_BENCH_MESSAGE_BYTES=200,2000,50000 \
SYSLOG_BENCH_CONCURRENCY=1,5 \
SYSLOG_BENCH_BATCH_SIZE=50 \
SYSLOG_BENCH_EVENTS=5000 \
SYSLOG_BENCH_PUSH_CHUNK=1000 \
mix run --no-start test/profiling/syslog_broadway_bench.exs |
aae1cb5 to
7d9eb2d
Compare
| @behaviour Broadway.Acknowledger | ||
|
|
||
| def start_link(opts) do | ||
| Broadway.start_link(__MODULE__, |
There was a problem hiding this comment.
instead of copying the pipeline, can we make the pipeline parameterized such that we can pass opts to it, see BigQuery.Pipeline for how the args are passed for benchmarking
Please ignore this PR for now :)
Adds benchmark-only syslog profiling scripts under test/profiling.
The benchmarks compare current batcher routing, no-batcher per-message sends, and preformatted batch sends using a local RFC6587 octet-counting TCP sink.
The Broadway benchmark runs through real Broadway processors/batchers, BufferProducer, a local NimblePool TCP sender, and fake cache entries so it can run with mix run --no-start.
Validated with mix format and small smoke runs for both benchmark scripts.