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 2747
FindProduct 2893
CreateCart 988
AddProductToCart 5053
Checkout 892
RateProduct 4133

Summary

Backend Total Time Wall Time Transport
bonsaidb-local 48.89s 12.22s None
bonsaidb-local+lz4 40.95s 10.24s TCP
bonsaidb-quic 44.94s 11.23s UDP with TLS
bonsaidb-ws 43.31s 10.83s TCP
postgresql 34.14s 8.535s 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 30.09ms 30.09ms 30.09ms 0s 0
bonsaidb-local+lz4 33.19ms 33.19ms 33.19ms 0s 0
bonsaidb-quic 34.72ms 34.72ms 34.72ms 0s 0
bonsaidb-ws 33.66ms 33.66ms 33.66ms 0s 0
postgresql 289.0ms 289.0ms 289.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 2747 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 123.0us 69.37us 1.675ms 44.67us 31
bonsaidb-local+lz4 125.3us 66.48us 1.731ms 46.95us 15
bonsaidb-quic 577.3us 412.6us 4.230ms 104.3us 9
bonsaidb-ws 436.5us 330.8us 2.522ms 73.22us 12
postgresql 1.817ms 297.3us 39.34ms 1.635ms 6
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 2893 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 234.6us 111.2us 2.644ms 89.72us 17
bonsaidb-local+lz4 238.4us 121.6us 1.738ms 64.84us 9
bonsaidb-quic 924.8us 676.0us 5.466ms 179.8us 11
bonsaidb-ws 714.1us 552.7us 3.434ms 113.1us 11
postgresql 1.904ms 277.7us 38.26ms 1.273ms 13
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 2.614ms 1.009ms 7.793ms 809.4us 10
bonsaidb-local+lz4 2.174ms 875.2us 6.963ms 639.7us 13
bonsaidb-quic 1.951ms 856.3us 14.32ms 847.7us 13
bonsaidb-ws 1.938ms 824.8us 9.230ms 722.4us 18
postgresql 971.4us 601.1us 6.044ms 347.3us 13
AddProductToCart

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

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

Backend Avg Min Max StdDev Outliers
bonsaidb-local 2.751ms 838.5us 29.54ms 853.6us 54
bonsaidb-local+lz4 2.311ms 716.7us 13.21ms 771.4us 67
bonsaidb-quic 2.269ms 1.062ms 9.504ms 714.6us 78
bonsaidb-ws 2.208ms 993.0us 12.02ms 675.7us 75
postgresql 934.9us 560.2us 36.83ms 606.8us 31
Checkout

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

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

Backend Avg Min Max StdDev Outliers
bonsaidb-local 4.928ms 2.477ms 9.619ms 1.149ms 7
bonsaidb-local+lz4 4.194ms 1.999ms 10.96ms 1.140ms 17
bonsaidb-quic 4.336ms 2.344ms 10.06ms 1.061ms 23
bonsaidb-ws 4.328ms 2.271ms 15.58ms 1.086ms 13
postgresql 1.382ms 899.7us 6.281ms 402.0us 13
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 4133 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 6.525ms 2.169ms 34.64ms 1.768ms 23
bonsaidb-local+lz4 5.400ms 1.947ms 13.40ms 1.333ms 53
bonsaidb-quic 5.658ms 2.350ms 19.44ms 1.364ms 47
bonsaidb-ws 5.585ms 2.294ms 15.72ms 1.369ms 49
postgresql 3.977ms 2.040ms 40.35ms 1.719ms 10