Benchmarks
What ruststream-sqs-sns costs on every message: throughput against the raw aws-sdk-sqs client,
and instructions and allocations of its code.
Against a raw client
The first chart runs each scenario three ways against the same SQS endpoint. Raw client drives
aws-sdk-sqs directly. Broker crate drives this crate's subscription with a loop of its own and
no runtime. RustStream is the service a user writes, a #[subscriber] handler in an app. The
first gap is what this crate costs over the client it wraps, and the second is what the runtime
adds on top.
Each loop is a bar from its best round to its slowest, with a dot at the best round and a notch at the median. The zero of the axis is the raw client's best round, and a dot right of zero is slower. A hollow dot is a loop whose difference from the raw client is smaller than the spread of the rounds. The table under the chart prints the best round with the median in parentheses.
Both scenarios delete every message with a DeleteMessage of its own, because that is what an
ack does here. The FIFO scenario spreads its messages over 64 message groups, so a held group
never sets the pace, as Groups draws.
Cost of the code
The second chart counts what one message costs on the service's thread: instructions under
callgrind and allocations under DHAT, in the steady state. Each scenario is a service on
SqsBroker against the same endpoint. The count includes the
framework's dispatch and this crate's code. It also includes the AWS SDK's work on that thread:
building and signing every request, the HTTP exchange and parsing every answer. That work is most
of every figure, so these numbers are not comparable with those of a broker whose client works on
threads of its own. Cold start is what loading the AWS configuration, resolving the queue,
reading its visibility timeout and taking the first message cost once.
Results
- Raw client
- Broker crate
- RustStream
- rounds, best to slowest
- best round
- median round
- spread of the rounds
- indistinguishable
ruststream-sqs-sns 0.7.0 on ruststream 0.7.0, AMD Ryzen 9 7900X 12-Core Processor, Linux 7.2.10-x64v3-xanmod1-1, localstack/localstack:4.14.0 (the LocalStack emulator, not the hosted service) in Docker on localhost, measured 2026-10-18. How the numbers were taken
- indistinguishable
- indistinguishable
- indistinguishable
- +1.8%
Show the numbers as a table
| Scenario | Raw client | Broker crate | RustStream | Overhead |
|---|---|---|---|---|
| Standard queue, 512 B JSON, delete per message | 724 msg/s (711) | 705 msg/s (621) (indistinguishable over the client) | 718 msg/s (687) | indistinguishable |
| FIFO queue, 64 message groups, 512 B JSON, delete per message | 692 msg/s (691) | 686 msg/s (685) (indistinguishable over the client) | 679 msg/s (679) | +1.8% |
AMD Ryzen 9 7900X 12-Core Processor, x86_64, 427-5912 MHz, 12 physical, 24 logical, 62.4 GiB, unknown, Linux 7.2.10-x64v3-xanmod1-1, 1.99.0, 3.25.1, bench, inheriting release (opt-level = 3, lto = fat, codegen-units = 16, debug = line-tables-only), ruststream-sqs-sns default (none), ruststream macros,json. ruststream-sqs-sns 0.7.0, ruststream 0.7.0, measured 2026-10-18.
Show the numbers as a table
| Scenario | Instructions | Allocations | Cold start |
|---|---|---|---|
| standard queue, JSON decode into a small struct, delete per message | 454,735.5 | 461.3 | 2,514,593 / 2,728 |
| reply through the default SqsPublish policy, one SendMessage each | 823,549.6 | 871.3 | 2,541,645 / 2,729 |
| batches of 10, one ReceiveMessage each, delete per message | 452,297.8 | 461.3 | 2,534,373 / 2,730 |
The machine
| Processor | AMD Ryzen 9 7900X 12-Core Processor |
|---|---|
| Architecture | x86_64 |
| Frequency | 427-5912 MHz |
| Cores | 12 physical, 24 logical |
| Memory | 62.4 GiB |
| Memory speed | unknown |
| Operating system | Linux 7.2.10-x64v3-xanmod1-1 |
| Broker | localstack/localstack:4.14.0 (the LocalStack emulator, not the hosted service) in Docker on localhost |
| Round trip | 612 us per request to the stand |
| Compiler | 1.99.0 |
| Build profile | bench, inheriting release (opt-level = 3, lto = fat, codegen-units = 16, debug = line-tables-only) |
| Features | ruststream-sqs-sns default (none), ruststream macros,json |
| RUSTFLAGS | none (the recipe clears RUSTFLAGS, so the numbers are not tied to this CPU) |
| Valgrind | 3.25.1 |
The numbers come from docs/benchmarks/results.json of this version, written by the benchmark
recipes. Methodology says how they were taken, and Numbers what
they allow you to conclude.