Skip to content

TPC-C (OLTP)

Single machine. Durable WAL. All 5 TPC-C procedures correct.

PDB native wire protocol with compiled stored procedures. PG wire (PostgreSQL-compatible): 726K TPS at 32 workers (9.7x MariaDB).

Latest Result — Compiled Stored Procedures

Section titled “Latest Result — Compiled Stored Procedures”

Machine: AWS c8g.metal-48xl (192 vCPU Graviton4, 384 GB DDR5, EBS-only) Protocol: PDB native wire with compiled stored procedures (CALL) Transaction mode: zero-copy-occ (overlay OCC, validation at commit) WAL: groupsync (durable, batched fsync on EBS) Procedures: All 5 TPC-C — NEWORD 45%, PAYMENT 43%, OSTAT 4%, DELIVERY 4%, SLEV 4% Client cache: None — all data access is server-side via stored procedures NOPM: Measured from actual NewOrder completion count (not derived from TPS) Duration: 60 seconds per worker count, warehouses = workers

WorkersTPSNOPM (measured)TPM
1129,4693,495,8077,768,139
8740,84320,002,90544,450,566
322,673,96772,177,931160,438,005
643,028,86681,767,004181,731,972
1283,849,631103,931,316230,977,888
1923,757,191101,432,606225,431,431

Zero errors across all worker counts.


ParticleDB supports multiple transaction isolation modes. All results on the same hardware (c8g.metal-48xl), same workload, PDB wire CALL, groupsync WAL:

Overlay-based OCC: all writes buffer per-transaction, OCC validation at COMMIT. No table-level locks. Zero dirty reads by construction.

WorkersTPSNOPM
1129,4693.5M
322,673,96772.2M
1283,849,631103.9M
1923,757,191101.4M

Standard optimistic concurrency control with snapshot reads and write-set validation.

WorkersTPSNOPM
128~3,660,000~98.8M
192~3,880,000~104.8M

Table-2PL + Per-Transaction Fsync (Strictest Durability)

Section titled “Table-2PL + Per-Transaction Fsync (Strictest Durability)”

Exclusive table locks + per-transaction fsync() on EBS. This is the strictest configuration: full serializability + full durability. Every committed transaction is guaranteed on disk before acknowledgment.

--txn-mode table-2pl --wal-sync-mode sync

WorkersTPSNOPMErrors
1125,9203.4M0
8793,08021.4M0
322,647,14571.5M0

Note: These numbers include per-transaction fsync on EBS (~1ms per fsync). The high throughput is because the WAL flusher batches concurrent fsyncs even in sync mode — 32 concurrent workers amortize the fsync cost across transactions.


ParticleDB’s compiled stored procedure engine compiles PL/pgSQL procedure bodies into a typed IR at first CALL. Subsequent executions bypass SQL parsing entirely.

Client → CALL neword(1, 3, 42, 10)
Server → [cached compiled IR] → 20 direct point operations → result
Zero SQL parsing. Zero planning. Zero executor overhead.

All 5 TPC-C procedures are semantically correct:

  • NEWORD: SELECT INTO district, UPDATE district, INSERT oorder/new_order, FOR loop with stock SELECT/UPDATE + order_line INSERT
  • PAYMENT: UPDATE warehouse/district, SELECT customer, UPDATE customer
  • OSTAT: SELECT customer, MAX(o_id) to find customer’s actual latest order, iterate order lines
  • DELIVERY: FOR each district: MIN(no_o_id) for oldest undelivered, DELETE new_order, SELECT o_c_id from oorder, UPDATE oorder carrier, SUM(ol_amount) for balance, UPDATE order_line delivery dates, UPDATE customer balance
  • SLEV: 3-table JOIN with COUNT(DISTINCT) — exact HammerDB SQL

DatabaseNOPMHardwareNodesSource
ParticleDB103,931,316c8g.metal 192vCPU1This benchmark
MariaDB 11.82,015,540EPYC 9655P 96c1MariaDB blog
PostgreSQL 17~237,000EPYC 48c1pgbench TPC-C
YugabyteDB1,000,00075x c5d.12xl75YB blog
CockroachDB~1,680,000Multi-nodeNCRDB docs

ComponentSpec
InstanceAWS c8g.metal-48xl
CPU192 vCPU (Graviton4 ARM64)
Memory384 GB DDR5
StorageEBS gp3 (network-attached, not local NVMe)
OSAmazon Linux 2023 (aarch64)
WAL syncgroupsync (batched fsync, ~100us amortized)

PG Wire Results (PostgreSQL-compatible protocol)

Section titled “PG Wire Results (PostgreSQL-compatible protocol)”

Same compiled stored procedures, over PG wire (Unix socket, simple query protocol):

WorkersTPSNOPM (measured)
196,0002.6M
8305,0008.2M
32726,00019.6M
64269,0007.3M

PG wire peaks at 32 workers (9.7x MariaDB). Throughput drops at 64+ due to Unix socket and async I/O overhead.


Direct comparison: PostgreSQL 17.8 (same hardware, same HammerDB driver)

Section titled “Direct comparison: PostgreSQL 17.8 (same hardware, same HammerDB driver)”

To honest-to-goodness compare, we ran HammerDB v5.0 TPROC-C against PostgreSQL 17.8 on the same Graviton4 hardware, with identical durability settings:

default_transaction_isolation = serializable | read_committed
commit_delay = 10
commit_siblings = 5
synchronous_commit = on
100 warehouses, stored procedures, 1 min ramp + 5 min run

PostgreSQL 17.8 results:

WorkersNOPM (SERIALIZABLE)NOPM (READ COMMITTED)
120,332
899,46097,146
16error146,178
32–192errorerror

At 16+ workers under either isolation level, PostgreSQL hit serialization conflicts and procedure errors (deadlocks / RAISEERROR) on a 100-warehouse dataset — we ran each cell to completion and HammerDB stopped reporting NOPM because the bench framework treats the errors as run failures. This is real PostgreSQL behavior under contention, not an infrastructure issue.

ParticleDB on the same hardware hits 3.85M NOPM at 128 workers with overlay zero-copy-OCC — a 26× advantage at peak, and 10× even at the workers-per-warehouse ratio where Postgres is healthy.


Benchmark results verified with correctness test suites:

TestResultModeSourceWhat it checks
Elle serializable50/50 PASSOCCjepsen-io/elleSerialization-cycle detection via rw-dependency graphs
Hermitage isolation14/14 OKOCCept/hermitageAll SQL isolation anomaly classes (G0, G1a/b/c, G2, etc.)
Bank invariant40/40 PASSOCCOur harnessTotal balance preserved across concurrent transfers
Lost update40/40 PASSOCCOur harnessRead-modify-write atomicity under contention
Atomicity40/40 PASSOCCOur harnessAll-or-nothing transaction commit
WAL crash recovery5/5 PASSOCCOur harnessSIGKILL + restart → data preserved

Elle is the real serialization checker from the Jepsen project. It analyzes transaction dependency graphs to detect G0, G1a/b/c, G-Single, G2 (write skew), and all Adya anomaly classes. Our test runs multi-operation transactions (BEGIN; SELECT k1; UPDATE k2; COMMIT) with 8 concurrent clients — 200 transactions per iteration, 50 iterations (10,000 total transactions checked).

Note: The bank/lost-update/atomicity tests are our own psql-based harness (not Jepsen). Single-node only — no network partition or node failure injection. Distributed fault injection testing is planned after multi-node replication.


Terminal window
curl -fsSL get.particledb.ai | bash
Terminal window
# OCC mode with durable WAL (recommended)
particledb start --no-auth --txn-mode zero-copy-occ --data-dir /tmp/pdb-tpcc

ParticleDB is PostgreSQL-compatible. Connect with any PG client:

Terminal window
psql -h 127.0.0.1 -p 5432
# Create a table
CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100), email VARCHAR(200));
# Insert data
INSERT INTO users VALUES (1, 'Alice', 'alice@example.com');
# Query
SELECT * FROM users WHERE id = 1;

The TPC-C benchmark tool will be available as a separate download. For now, you can verify basic transactional performance with pgbench:

Terminal window
pgbench -h 127.0.0.1 -p 5432 -i -s 10 # Initialize
pgbench -h 127.0.0.1 -p 5432 -c 8 -j 8 -T 30 # Run 8 clients, 30 seconds

Our full TPC-C benchmark (all 5 stored procedures with the standard 45/43/4/4/4 mix) uses a custom Rust driver that will be released as open-source tooling.


  • Protocol difference: The 3.85M TPS headline uses PDB’s native wire protocol (binary framing, compiled stored procedures). The PG wire result (726K TPS at 32w) is the PostgreSQL-compatible comparison point. MariaDB’s 2.02M NOPM uses HammerDB with compiled stored procedures over the MySQL wire protocol.
  • Custom benchmark: Results from ParticleDB’s Rust TPC-C driver, not HammerDB or BenchmarkSQL. The workload is TPC-C standard (5 procs, 45/43/4/4/4 mix) but the driver is ours.
  • In-memory: All data fits in RAM. This is not a disk-resident benchmark. Bigger-than-RAM support is in development (see STORAGE_DESIGN.md).
  • Low contention: TPC-C with warehouses = workers has minimal cross-warehouse contention. High-contention benchmarks (multiple writers to same rows) are planned.
  • OSTAT limitation: Iterates a fixed loop (1..10 order lines) instead of CURSOR — 4% of mix
  • Single node: No distributed consensus overhead. Multi-node benchmarks are planned.
  • Correctness tests are single-node: No network partition or fault injection testing yet.
  • WAL durability: groupsync batches fsyncs but does NOT ack until fsync completes — this is durable. Same approach as PostgreSQL’s commit_delay.