Measured October 23, 2026
FerretDB vs DocumentDB YCSB benchmark, October 23, 2026
YCSB workloads A, B and C against FerretDB 2 and standalone DocumentDB 1.0, each on its own 4 vCPU / 8 GB instance with a 10 million record dataset larger than RAM. Throughput, read p99 and update p99 at 16, 64 and 256 client threads.
Results published October 23, 2026. This page last updated November 3, 2026. Read the discussion in MongoDB vs FerretDB vs DocumentDB: benchmarks across two runs.
What was measured and why
FerretDB and standalone DocumentDB are the two MongoDB wire-protocol engines on Layerbase Cloud, and both store documents in PostgreSQL through the DocumentDB extension. This run measures the two packaged paths a client can connect to, on matched instances with the hardware profile behind our Dedicated 8GB preset, so the choice between them can rest on measured throughput and tail latency rather than on the shared storage layer.
Results
Every table below is rendered from results.csv. Throughput is rounded to whole operations per second; p99 latencies are shown in milliseconds as recorded. A dash means the workload issued no operations of that kind. Lower latency is better.
Workload C: 100% read
| Client threads | Engine | Throughput (ops/sec) | Read p99 (ms) | Update p99 (ms) | Operations completed | Runtime (s) |
|---|---|---|---|---|---|---|
| 16 | FerretDB | 4,265 | 10.055 | - | 1,000,000 | 234 |
| 16 | DocumentDB | 5,122 | 9.231 | - | 1,000,000 | 195 |
| 64 | FerretDB | 4,342 | 44.831 | - | 1,000,000 | 230 |
| 64 | DocumentDB | 5,338 | 40.607 | - | 1,000,000 | 187 |
| 256 | FerretDB | 4,100 | 191.871 | - | 1,000,000 | 244 |
| 256 | DocumentDB | 5,462 | 163.967 | - | 1,000,000 | 183 |
Workload B: 95% read / 5% update
| Client threads | Engine | Throughput (ops/sec) | Read p99 (ms) | Update p99 (ms) | Operations completed | Runtime (s) |
|---|---|---|---|---|---|---|
| 16 | FerretDB | 3,792 | 9.975 | 101.951 | 1,000,000 | 264 |
| 16 | DocumentDB | 4,711 | 7.379 | 96.191 | 1,000,000 | 212 |
| 64 | FerretDB | 3,841 | 50.591 | 156.927 | 1,000,000 | 260 |
| 64 | DocumentDB | 5,196 | 36.831 | 306.943 | 1,000,000 | 192 |
| 256 | FerretDB | 3,838 | 215.295 | 263.423 | 1,000,000 | 261 |
| 256 | DocumentDB | 5,189 | 167.039 | 315.391 | 1,000,000 | 193 |
Workload A: 50% read / 50% update
| Client threads | Engine | Throughput (ops/sec) | Read p99 (ms) | Update p99 (ms) | Operations completed | Runtime (s) |
|---|---|---|---|---|---|---|
| 16 | FerretDB | 1,886 | 7.999 | 92.095 | 1,000,000 | 530 |
| 16 | DocumentDB | 2,016 | 6.667 | 103.807 | 1,000,000 | 496 |
| 64 | FerretDB | 1,783 | 79.295 | 324.095 | 1,000,000 | 561 |
| 64 | DocumentDB | 2,005 | 27.871 | 687.103 | 1,000,000 | 499 |
| 256 | FerretDB | 1,708 | 756.735 | 931.327 | 1,000,000 | 586 |
| 256 | DocumentDB | 1,821 | 576.511 | 2,226.175 | 1,000,000 | 549 |
Load phase
| Engine | Client threads | Records inserted | Throughput (ops/sec) | Runtime (s) |
|---|---|---|---|---|
| FerretDB | 32 | 10,000,000 | 3,094 | 3,232 |
| DocumentDB | 32 | 10,000,000 | 4,234 | 2,362 |
Methodology
- YCSB (Yahoo! Cloud Serving Benchmark) with its MongoDB client, at the pinned commit and Java version listed under Versions.
- 10 million records loaded per engine with 32 client threads, then 1 million operations per workload phase.
- Workloads C (100% read), B (95% read / 5% update) and A (50% read / 50% update), each at 16, 64 and 256 client threads.
- Write concern w=1 and a 600-second cap per workload phase. Every phase completed its full million operations before the cap.
- The suite ran C, then B, then A, with thread counts ascending within each workload. Data was loaded once per engine and reused across phases; caches were not reset and phase order was not randomized.
- The default MongoDB driver pool is 100 connections, so 256 client threads does not mean 256 simultaneous database connections.
- Both arms used the same PostgreSQL settings: 2 GiB shared_buffers, max_wal_size=8GB, effective_io_concurrency=200, random_page_cost=1.1, max_connections=300, synchronous_commit=on and full_page_writes=on.
Hardware
- Two separate instances, one per engine, in a US East region.
- Each instance: 4 vCPUs, 8 GB RAM, Debian 13, and a 100 GB network-attached high-speed volume.
- ZFS with a 16K recordsize and the ARC capped at 2 GiB.
- The YCSB client ran on the same instance as its database, so client CPU and memory shared the machine on both arms.
- This is the hardware profile behind the Layerbase Dedicated 8GB preset.
Versions and image digests
| YCSB commit | 66302f301b13f60d4bcb2f29f478586bb1d6f2e0 |
|---|---|
| Java | openjdk version "17.0.20" 2026-07-21 |
| JDK release | jdk-17.0.20+8 |
| Linux kernel | 6.12.113+deb13-amd64 |
| FerretDB: FerretDB frontend | ghcr.io/ferretdb/ferretdb:2@sha256:5706414241eb84f0515512c37b46db0f1b1eac9e5ceb7e4c2523211c184b1985 |
| FerretDB: PostgreSQL with DocumentDB | ghcr.io/ferretdb/postgres-documentdb:17@sha256:2386795ec2aa7ae559304361979f1dc5708d383ee9020ae63dadc2940dfe58f7 |
| FerretDB: recorded PostgreSQL version | 17.6 (Debian 17.6-2.pgdg12+1) |
| DocumentDB: DocumentDB Local (gateway and PostgreSQL) | ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.0@sha256:296aeac28562ab3081cb6854692f2b51acd55b7a4356362dc365d5e86b8b2dff |
| DocumentDB: recorded PostgreSQL version | 17.11 (Debian 17.11-1.pgdg13+2) |
Raw data
- https://layerbase.com/benchmarks/2026-10-23-ferretdb-documentdb/results.csv (text/csv): One row per engine and phase: client threads, runtime, throughput, operation counts, read and update p99 latency.
- https://layerbase.com/benchmarks/2026-10-23-ferretdb-documentdb/measurements.json (application/json): Parsed YCSB summary counters per run log, image digests, captured PostgreSQL settings and SHA-256 hashes of the retained log archives.
The original YCSB log archives are kept privately because setup and connection logs contain credentials. Their SHA-256 hashes are ferretdb-logs.tar.gz 86561d646238b66de93023fb5bde2362796235f11b60e73841856d20e119addd and documentdb-logs.tar.gz b9c9e41b2da185acba77de80bbcb65ae52e440a297ef7c5921ecbad5b4079d95.
Caveats
- One complete run per stack, not repeated trials, so there is no estimate of run-to-run variance or confidence interval.
- The two stacks ran different PostgreSQL minor versions (17.6 and 17.11) and bundled extension builds. The results compare whole packaged stacks; they do not isolate gateway overhead.
- Separate instances and volumes can vary despite matching specifications.
- The fixed workload order carries cache and update history into later phases.
- YCSB point reads and updates do not test aggregation pipelines, application-specific indexes, transactions, change streams, failover, replication or full MongoDB compatibility.
- w=1 with synchronous PostgreSQL commits is the tested configuration, not a replicated durability or crash-recovery guarantee.
- Success counts are the YCSB client return status, not an independent audit of every stored value.
- DocumentDB here is the open-source DocumentDB project. Amazon DocumentDB and MongoDB Atlas were not tested.
Cite or republish this run
The results and raw data are licensed under CC BY 4.0: quote them, chart them or republish them, with credit to Layerbase and a link back to this page. Copy whichever format fits where you are publishing.
Source: <a href="https://layerbase.com/benchmarks/2026-10-23-ferretdb-documentdb">FerretDB vs DocumentDB YCSB benchmark, October 23, 2026</a> by Layerbase, measured October 23, 2026. Data licensed under CC BY 4.0.Source: [FerretDB vs DocumentDB YCSB benchmark, October 23, 2026](https://layerbase.com/benchmarks/2026-10-23-ferretdb-documentdb) by Layerbase, measured October 23, 2026. Data licensed under CC BY 4.0.Layerbase, "FerretDB vs DocumentDB YCSB benchmark, October 23, 2026", measured October 23, 2026, https://layerbase.com/benchmarks/2026-10-23-ferretdb-documentdb. Data licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).Raw data: https://layerbase.com/benchmarks/2026-10-23-ferretdb-documentdb/results.csv.
Other runs are listed on the Layerbase benchmarks hub.