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 14.64s 3.660s None
bonsaidb-local+lz4 14.17s 3.542s TCP
bonsaidb-quic 22.84s 5.711s UDP with TLS
bonsaidb-ws 18.13s 4.531s TCP
postgresql 86.28s 21.57s 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 14.74ms 14.74ms 14.74ms 0s 0
bonsaidb-local+lz4 16.76ms 16.76ms 16.76ms 0s 0
bonsaidb-quic 16.72ms 16.72ms 16.72ms 0s 0
bonsaidb-ws 12.83ms 12.83ms 12.83ms 0s 0
postgresql 566.5ms 566.5ms 566.5ms 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 269.4us 40.20us 6.930ms 394.7us 44
bonsaidb-local+lz4 245.6us 38.30us 5.613ms 349.3us 37
bonsaidb-quic 1.074ms 409.1us 8.372ms 467.3us 43
bonsaidb-ws 798.8us 263.8us 9.548ms 469.3us 23
postgresql 4.272ms 457.0us 59.02ms 3.553ms 18
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 521.3us 70.90us 7.571ms 516.9us 53
bonsaidb-local+lz4 516.6us 76.10us 12.89ms 608.1us 44
bonsaidb-quic 1.262ms 482.8us 16.28ms 598.1us 45
bonsaidb-ws 941.7us 337.1us 10.18ms 463.2us 34
postgresql 4.485ms 476.0us 65.92ms 3.647ms 16
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 505.6us 100.3us 8.690ms 636.6us 18
bonsaidb-local+lz4 501.8us 99.50us 5.434ms 557.2us 20
bonsaidb-quic 716.2us 238.9us 3.730ms 338.0us 20
bonsaidb-ws 576.9us 252.0us 7.554ms 398.0us 10
postgresql 2.976ms 1.008ms 53.90ms 2.687ms 8
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 691.6us 126.9us 15.06ms 798.4us 89
bonsaidb-local+lz4 677.7us 122.1us 19.44ms 873.9us 69
bonsaidb-quic 1.290ms 494.2us 9.378ms 527.0us 91
bonsaidb-ws 1.005ms 381.0us 10.81ms 571.5us 63
postgresql 2.785ms 901.3us 56.47ms 2.173ms 62
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 1.178ms 251.5us 13.37ms 1.032ms 17
bonsaidb-local+lz4 1.128ms 214.3us 19.51ms 1.271ms 12
bonsaidb-quic 1.976ms 874.6us 8.922ms 670.3us 15
bonsaidb-ws 1.586ms 698.3us 15.77ms 932.0us 12
postgresql 3.015ms 959.0us 19.68ms 1.817ms 15
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 1.771ms 306.6us 19.89ms 1.516ms 95
bonsaidb-local+lz4 1.704ms 275.8us 18.90ms 1.233ms 71
bonsaidb-quic 1.748ms 795.8us 10.71ms 667.8us 79
bonsaidb-ws 1.481ms 529.3us 16.36ms 755.1us 51
postgresql 9.973ms 3.546ms 67.22ms 3.984ms 47