Skip to main content

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​

Against a raw clientHow far each loop falls below the raw client's best round
  • 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

Standard queue, 512 B JSON, delete per message
  • indistinguishable
  • indistinguishable
FIFO queue, 64 message groups, 512 B JSON, delete per message
  • indistinguishable
  • +1.8%
Show the numbers as a table
ScenarioRaw clientBroker crateRustStreamOverhead
Standard queue, 512 B JSON, delete per message724 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 message692 msg/s (691)686 msg/s (685) (indistinguishable over the client)679 msg/s (679)+1.8%
Cost of the code

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.

Instructions
Allocations
standard queue, JSON decode into a small struct, delete per message
454,735.5
461.3
reply through the default SqsPublish policy, one SendMessage each
823,549.6
871.3
batches of 10, one ReceiveMessage each, delete per message
452,297.8
461.3
Show the numbers as a table
ScenarioInstructionsAllocationsCold start
standard queue, JSON decode into a small struct, delete per message454,735.5461.32,514,593 / 2,728
reply through the default SqsPublish policy, one SendMessage each823,549.6871.32,541,645 / 2,729
batches of 10, one ReceiveMessage each, delete per message452,297.8461.32,534,373 / 2,730

The machine​

ProcessorAMD Ryzen 9 7900X 12-Core Processor
Architecturex86_64
Frequency427-5912 MHz
Cores12 physical, 24 logical
Memory62.4 GiB
Memory speedunknown
Operating systemLinux 7.2.10-x64v3-xanmod1-1
Brokerlocalstack/localstack:4.14.0 (the LocalStack emulator, not the hosted service) in Docker on localhost
Round trip612 us per request to the stand
Compiler1.99.0
Build profilebench, inheriting release (opt-level = 3, lto = fat, codegen-units = 16, debug = line-tables-only)
Featuresruststream-sqs-sns default (none), ruststream macros,json
RUSTFLAGSnone (the recipe clears RUSTFLAGS, so the numbers are not tied to this CPU)
Valgrind3.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.