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
/tmpand 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
fdatasynclog (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)#
| Workload | Raft DB (binary) | PostgreSQL 16 | MySQL 8.4 |
|---|---|---|---|
| Load (insert) | 11,251 | 9,574 | 3,053 |
| A 50% read / 50% update | 16,656 | 11,725 | 3,628 |
| B 95% read / 5% update | 21,413 | 15,108 | 6,954 |
| C 100% read | 24,777 | 19,168 | 9,323 |
| D 95% read / 5% insert | 21,668 | 16,044 | 7,771 |
| F 50% read / 50% read-modify-write | 12,918 | 9,327 | 2,209 |
Latency (microseconds, average / p99; Raft DB, PostgreSQL, MySQL)#
| Operation | Raft DB | PostgreSQL | MySQL |
|---|---|---|---|
| read, workload C | 314 / 716 | 390 / 642 | 814 / 2,825 |
| insert | 703 / 2,835 | 815 / 3,431 | 2,585 / 30,447 |
| update, workload A | 773 / 3,017 | 1,096 / 5,251 | 3,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_DSYNClog on Linux. - Default settings for all three, no tuning of PostgreSQL or MySQL.