Performance

Comparison on Linux

YCSB results of Raft DB against PostgreSQL 16 and MySQL 8.4 on an Ubuntu server, with the setup, the numbers and the caveats.

Source: the project's comparison log, section "Linux: Raft DB against PostgreSQL and MySQL (test server B, 2026-11-09)".

Machine and conditions#

  • Ubuntu 24.04, kernel 6.8, 4 cores, 16 GB, SATA enterprise SSD, ext4. The host also runs other services, so the run was confined to 2 of 4 cores, 6 GB of memory and the lowest I/O weight, used only /tmp and private throwaway database instances on loopback ports, and was deleted afterwards.
  • Same harness as on Windows: YCSB 0.17.0, 100,000 records, 100,000 operations, 8 threads, writeallfields=true, fsync before every acknowledgement.
  • Raft DB through its binary protocol with an fdatasync log (the write-through mode of D37 is Windows-only). PostgreSQL 16.15 (fsync=on, synchronous_commit=on, wal_sync_method=fdatasync, defaults). MySQL 8.4.6 (innodb_flush_log_at_trx_commit=1, sync_binlog=1, binary log on, 128 MB buffer pool).

Throughput (operations/s)#

WorkloadRaft DB (binary)PostgreSQL 16MySQL 8.4
Load (insert)11,2519,5743,053
A 50% read / 50% update16,65611,7253,628
B 95% read / 5% update21,41315,1086,954
C 100% read24,77719,1689,323
D 95% read / 5% insert21,66816,0447,771
F 50% read / 50% read-modify-write12,9189,3272,209

Latency (microseconds, average / p99; Raft DB, PostgreSQL, MySQL)#

OperationRaft DBPostgreSQLMySQL
read, workload C314 / 716390 / 642814 / 2,825
insert703 / 2,835815 / 3,4312,585 / 30,447
update, workload A773 / 3,0171,096 / 5,2513,258 / 36,223

What the comparison concludes#

Raft DB is ahead of PostgreSQL by 18 % (inserts) to 42 % (A, B) and far ahead of MySQL in this setup. The write margin is smaller than on Windows (1.6x there, 1.2x here) because Linux fdatasync on a preallocated file is already cheap. Only PostgreSQL's read p99 is slightly better (642 against 716 us).

Caveats#

  • The load generator, the database and the client JVM shared 2 cores, so every number is partly CPU bound.
  • The SSD is a SATA enterprise drive, unlike the laptop's NVMe.
  • One run per cell, no variance. MySQL is 8.4 here and 9.7 on Windows. Not tried: an O_DSYNC log on Linux.
  • Default settings for all three, no tuning of PostgreSQL or MySQL.

See also#