BonsaiDb Commerce Benchmark

small, readheavy, 4 agent(s)

Configuration

Initial Data Set
Type Count
Products 100
Categories 10
Customers 100
Orders 125
Shopping Plans

This run executed 1000 shopping plans across 4 worker(s). All total, the workers will execute the following breakdown of operations:

Operation Invocations
Load 1
LookupProduct 2763
FindProduct 2868
CreateCart 433
AddProductToCart 588
Checkout 38
RateProduct 5

Summary

Backend Total Time Wall Time Transport
bonsaidb-local 29.68s 7.421s None
bonsaidb-local+lz4 29.54s 7.384s TCP
bonsaidb-quic 29.54s 7.386s UDP with TLS
bonsaidb-ws 28.94s 7.236s TCP
mongodb 3.429s 857.2ms TCP
postgresql 5.603s 1.401s TCP
Table of Contents:

Operation Results

Load

Measures the time spent loading the initial data set and performing any pre-cache operations that most database administrators would perform on their databases periodically to ensure good performance.

This operation was executed 1 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 55.76ms 55.76ms 55.76ms 0s 0
bonsaidb-local+lz4 45.28ms 45.28ms 45.28ms 0s 0
bonsaidb-quic 49.37ms 49.37ms 49.37ms 0s 0
bonsaidb-ws 78.17ms 78.17ms 78.17ms 0s 0
mongodb 8.366ms 8.366ms 8.366ms 0s 0
postgresql 258.7ms 258.7ms 258.7ms 0s 0
LookupProduct

Meaures the time spent looking up a product by its id. This operation is meant to simulate the basic needs of the database to provide a product details page after a user clicked a direct link that contians the product's unique id, including the product's current rating.

This operation was executed 2763 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 134.3us 33.40us 8.289ms 223.8us 3
bonsaidb-local+lz4 127.0us 27.00us 7.245ms 199.5us 2
bonsaidb-quic 537.1us 226.0us 11.24ms 339.2us 5
bonsaidb-ws 427.9us 167.0us 9.322ms 269.4us 2
mongodb 520.7us 200.0us 5.381ms 258.5us 43
postgresql 357.4us 124.8us 18.93ms 641.3us 12
FindProduct

Measures the time spent looking up a product by its name (exact match, indexed). This operation is meant to simulate the basic needs of the database to provide a product details after finding a product by its name, including the product's current rating.

This operation was executed 2868 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 217.1us 54.49us 8.438ms 233.3us 3
bonsaidb-local+lz4 209.5us 49.60us 7.413ms 211.5us 2
bonsaidb-quic 828.0us 358.0us 12.01ms 405.3us 8
bonsaidb-ws 668.5us 251.1us 9.041ms 302.8us 4
mongodb 563.0us 201.2us 3.453ms 239.5us 46
postgresql 389.4us 139.6us 16.28ms 498.7us 15
CreateCart

Measures the time spent creating a shopping cart.

This operation was executed 433 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 25.02ms 12.17ms 49.42ms 4.666ms 9
bonsaidb-local+lz4 25.02ms 10.28ms 52.83ms 4.979ms 9
bonsaidb-quic 21.40ms 6.340ms 80.22ms 6.266ms 6
bonsaidb-ws 21.71ms 6.986ms 42.08ms 5.406ms 5
mongodb 268.1us 104.0us 2.115ms 203.4us 7
postgresql 2.947ms 1.620ms 11.61ms 1.239ms 9
AddProductToCart

Measures the time spent adding a product to a shopping cart.

This operation was executed 588 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 26.86ms 12.40ms 50.00ms 4.759ms 17
bonsaidb-local+lz4 26.94ms 11.68ms 49.93ms 4.463ms 17
bonsaidb-quic 24.62ms 8.624ms 47.67ms 5.878ms 8
bonsaidb-ws 24.86ms 8.784ms 47.19ms 5.174ms 11
mongodb 338.7us 137.2us 1.805ms 200.6us 12
postgresql 3.026ms 1.605ms 11.99ms 1.142ms 13
Checkout

Measures the time spent converting a shopping cart into an order for a customer.

This operation was executed 38 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 47.57ms 25.02ms 76.32ms 9.143ms 1
bonsaidb-local+lz4 44.39ms 34.13ms 51.44ms 4.302ms 0
bonsaidb-quic 43.45ms 29.70ms 97.52ms 12.13ms 1
bonsaidb-ws 41.76ms 28.55ms 56.15ms 6.557ms 0
mongodb 554.6us 335.6us 931.7us 135.8us 0
postgresql 3.682ms 2.333ms 9.766ms 1.746ms 2
RateProduct

Measures the time spent adding or updating a review of a product by a customer. Each customer can only have one review per product. When this operation is complete, all subsequent calls to LookupProduct and FindProduct should reflect the new rating. This simulates an 'upsert' (insert or update) operation using a unique index.

This operation was executed 5 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 39.64ms 25.77ms 48.69ms 7.539ms 0
bonsaidb-local+lz4 35.82ms 30.90ms 42.23ms 3.980ms 0
bonsaidb-quic 48.08ms 27.18ms 95.86ms 24.38ms 0
bonsaidb-ws 32.59ms 26.90ms 37.90ms 4.589ms 0
mongodb 6.139ms 743.9us 26.20ms 10.03ms 0
postgresql 8.893ms 6.576ms 15.40ms 3.297ms 0