BonsaiDb Commerce Benchmark

small, writeheavy, 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 2753
FindProduct 2883
CreateCart 988
AddProductToCart 5050
Checkout 894
RateProduct 4143

Summary

Backend Total Time Wall Time Transport
bonsaidb-local 533.7s 133.4s None
bonsaidb-local+lz4 784.1s 196.0s TCP
bonsaidb-quic 815.1s 203.8s UDP with TLS
bonsaidb-ws 814.1s 203.5s TCP
mongodb 9.640s 2.410s TCP
postgresql 191.7s 47.91s 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 80.06ms 80.06ms 80.06ms 0s 0
bonsaidb-local+lz4 89.08ms 89.08ms 89.08ms 0s 0
bonsaidb-quic 77.65ms 77.65ms 77.65ms 0s 0
bonsaidb-ws 96.79ms 96.79ms 96.79ms 0s 0
mongodb 8.802ms 8.802ms 8.802ms 0s 0
postgresql 405.0ms 405.0ms 405.0ms 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 2753 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 330.7us 60.17us 19.38ms 588.8us 6
bonsaidb-local+lz4 344.8us 62.99us 16.37ms 466.2us 3
bonsaidb-quic 955.1us 271.9us 21.61ms 607.9us 4
bonsaidb-ws 818.4us 261.8us 23.52ms 687.7us 5
mongodb 531.0us 249.4us 3.189ms 224.6us 41
postgresql 7.173ms 198.9us 326.6ms 12.90ms 4
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 2883 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 544.5us 155.6us 19.09ms 526.3us 3
bonsaidb-local+lz4 582.6us 109.6us 16.79ms 515.7us 6
bonsaidb-quic 1.448ms 524.8us 21.66ms 663.7us 6
bonsaidb-ws 1.247ms 467.1us 23.64ms 736.4us 6
mongodb 592.4us 251.6us 7.078ms 287.7us 40
postgresql 7.150ms 203.6us 337.4ms 9.144ms 9
CreateCart

Measures the time spent creating a shopping cart.

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

Backend Avg Min Max StdDev Outliers
bonsaidb-local 31.85ms 7.437ms 140.1ms 12.49ms 10
bonsaidb-local+lz4 47.04ms 12.78ms 462.0ms 22.52ms 3
bonsaidb-quic 47.44ms 15.50ms 917.0ms 32.76ms 3
bonsaidb-ws 47.74ms 13.26ms 210.0ms 15.03ms 7
mongodb 252.9us 109.5us 976.0us 119.8us 18
postgresql 7.847ms 2.709ms 541.1ms 17.14ms 1
AddProductToCart

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

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

Backend Avg Min Max StdDev Outliers
bonsaidb-local 33.53ms 6.864ms 723.3ms 18.49ms 6
bonsaidb-local+lz4 49.20ms 12.91ms 1.976s 30.70ms 3
bonsaidb-quic 49.78ms 14.14ms 1.721s 31.69ms 15
bonsaidb-ws 50.27ms 14.15ms 1.105s 24.77ms 14
mongodb 317.5us 140.3us 6.157ms 192.2us 70
postgresql 7.618ms 2.062ms 540.9ms 10.99ms 4
Checkout

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

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

Backend Avg Min Max StdDev Outliers
bonsaidb-local 57.33ms 18.33ms 137.8ms 19.32ms 5
bonsaidb-local+lz4 84.43ms 32.47ms 251.6ms 22.09ms 10
bonsaidb-quic 92.86ms 44.99ms 1.757s 69.34ms 5
bonsaidb-ws 91.92ms 43.98ms 263.9ms 23.94ms 11
mongodb 581.1us 274.6us 6.789ms 315.8us 9
postgresql 8.178ms 4.328ms 40.72ms 2.393ms 9
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 4143 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 67.36ms 25.63ms 772.6ms 27.11ms 14
bonsaidb-local+lz4 99.20ms 30.79ms 2.024s 56.69ms 10
bonsaidb-quic 103.1ms 33.33ms 1.835s 60.48ms 26
bonsaidb-ws 102.6ms 29.59ms 1.171s 33.45ms 20
mongodb 986.9us 384.9us 231.9ms 6.459ms 4
postgresql 23.50ms 10.31ms 547.0ms 17.11ms 15