Skip to main content

Performance Benchmarks

TL;DR: ekoDB delivers 38-103K ops/sec on production workloads with full durability, achieving 3-7x better throughput than PostgreSQL/MongoDB on write-heavy workloads while using 2-5x less CPU. Single binary replaces 4-5 services with built-in auth, encryption, search, and real-time subscriptions.

When to Use ekoDB (and When Not To)

ekoDB excels when you need:

  • Write-heavy with durability: 38K ops/sec on mixed workloads (Workload A) is 7.3x faster than PostgreSQL, 3.6x faster than MongoDB
  • Read-heavy at scale: 89-96K ops/sec on read-heavy workloads (B/C/D) competitive with PostgreSQL while using 2-3x less CPU
  • Low latency with durability: Sub-millisecond latencies (0.41-0.57ms) across all workloads
  • CPU efficiency: 2-5x better ops/CPU% than all competitors - smaller cloud instances, lower costs
  • Unified data platform: Document store + KV + full-text search + vector search + auth + real-time subscriptions in a single binary

Consider alternatives when:

  • Specialized analytics: For heavy OLAP with complex window functions and CTEs, use dedicated analytics databases (ClickHouse, DuckDB)
  • TBD: Additional benchmark scenarios (Redis, batching, etc.) pending
Production Recommendation

For production workloads, ekoDB durable mode is the clear winner:

  • Write-heavy: 38K ops/sec (7.3x faster than PostgreSQL, 3.6x faster than MongoDB)
  • Read-heavy: 89-96K ops/sec (competitive with PostgreSQL at 2-3x better CPU efficiency)
  • Guaranteed data safety with group commits (no data loss windows)
  • Better CPU efficiency (2-5x) = lower cloud costs
  • Built-in auth, encryption, FTS, vector search without additional services

For non-durable workloads (caches, temp data), ekoDB still leads or matches competitors while using 2-4x less CPU.

Quick Decision Guide

Based on high-scale YCSB benchmarks: 1M records, 64 threads. Durable mode = full fsync guarantees. Fast mode = no fsync.

Your WorkloadBest ChoiceWhy
Write-heavy + durableekoDB38K ops/sec, 7.3x faster than PostgreSQL, 0.41ms latency
Read-heavy + durableekoDB89-96K ops/sec, competitive with PostgreSQL at 2-3x better CPU efficiency
Write-heavy + fastekoDB83K vs MongoDB 87K, ahead of PostgreSQL 38K
Read-heavy + fastekoDB90-100K vs PostgreSQL 49-52K, MongoDB 76-77K
Low-latency (any mode)ekoDB0.41-0.67ms vs PostgreSQL 1.07-1.25ms, MongoDB 0.79-1.42ms
CPU cost-sensitiveekoDB (any mode)2-5x better efficiency in both durable and fast modes
Production workloadsekoDB (durable)Best performance + guaranteed data safety
Caches / temp dataekoDB (fast)Leads on throughput + latency + CPU efficiency
Unified platformekoDBSingle binary replaces 4-5 services (auth, search, cache, DB)

Key insight: ekoDB leads in both durable and non-durable modes. Use durable for production (guaranteed safety), use fast mode only for caches/temp data where data loss is acceptable.


Why ekoDB's Performance Is Remarkable

ekoDB isn't just fast. It's fast despite doing more work per request than competitors. Understanding this context makes the benchmark results more meaningful.

The Overhead ekoDB Carries

Every ekoDB request includes capabilities that competitors skip entirely:

LayerWhat HappensCompetitors
SecurityJWT/API key auth, AES-GCM encryptionRedis: none, PG: separate
DataSchema validation, B-tree + inverted indexesPG: yes, Redis: none
SearchFull-text + vector index updatesRequires Elasticsearch + Pinecone
DurabilityWAL + optional per-op fsyncPG: batched, Redis: async
Real-timeCache coherency, subscription notificationsRequires additional services
Durability Configuration

ekoDB supports two durability modes via the durable_operations config setting:

ModeSettingBehaviorUse Case
Durable (default)durable_operations: truefsync on every write, data confirmed on disk before responseMost workloads, guaranteed persistence
Fastdurable_operations: falseAsync batched writes, flushed periodically and on shutdownHigh-throughput, eventual durability acceptable

All "durable" benchmarks below use durable_operations: true. The diagram above shows the durable path.

Compare to Redis (fastest KV):

  • No authentication layer (ACL only)
  • No document parsing
  • No indexing
  • No full-text search
  • No fsync by default (appendfsync no)
  • Single-threaded (can't use multiple cores)

Compare to PostgreSQL (fastest relational):

  • Uses WAL group commit (batches writes before fsync)
  • Has decades of JDBC driver optimization
  • No built-in full-text search (requires FTS configuration)
  • No vector search (requires pgvector extension)
  • No built-in JWT auth

Durability: The Hidden Performance Tax

Most benchmarks don't match durability settings, making Redis appear faster than it is in production.

ekoDB Configuration Matrix

ekoDB has 3 storage modes × 2 durability modes = 6 configurations:

Storage ModeDurableNon-DurableBest For
Fast202K reads205K readsRead-heavy, general purpose
Cold208K reads194K readsWrite-heavy ingestion, logs
Balanced16K reads13K readsPredictable latency

Durability modes (durable_operations setting):

  • Durable: fsync on every write, data confirmed on disk before response
  • Non-Durable: Async batched writes, flushed periodically and on shutdown

Write Path Comparison

Durability ModelSpeedData Safety
PostgreSQL WAL group commitFaster (amortized fsync)Good, but recent uncommitted writes may be lost
ekoDB per-operation fsyncSame speed (see benchmarks)Best: every confirmed write is on disk
Redis appendfsync always10-20x slowerSame as ekoDB
Redis appendfsync noFastestNone: data loss on crash
The Remarkable Part

At scale (1M records, 64 threads), ekoDB achieves 38K ops/sec on write-heavy workloads - 7.5x faster than PostgreSQL, 3.6x faster than MongoDB - while:

  • Doing per-operation fsync with group commits (guarantees every write is on disk)
  • Adding JWT auth on every request
  • Performing AES-GCM encryption on all record IDs
  • Maintaining full-text and vector search indexes
  • Processing JSON documents with schema validation
  • Providing real-time subscriptions and cache coherency

ekoDB uses 2-5x less CPU than competitors while delivering this performance.


YCSB Benchmarks (Production Network Performance)

Industry-standard YCSB (Yahoo! Cloud Serving Benchmark) results comparing ekoDB against PostgreSQL, MongoDB, MySQL at scale with identical durability settings.

YCSB Workloads Explained
WorkloadMixReal-World Example
A50% read, 50% updateSession stores, shopping carts
B95% read, 5% updateSocial media profiles, photo tagging
C100% readProduct catalogs, configuration lookups
D95% read, 5% insertNews feeds, activity streams
F50% read-modify-writeBank transactions, inventory counters

High-Scale Production Testing (Same Hardware)

Real benchmarks at scale (1M records, 64 threads) on identical hardware with matching durability settings for fair comparison.

Test Configuration - Same Hardware
  • Hardware: Apple M1 Max, 64GB RAM, NVMe SSD
  • Scale: 1,000,000 records | 1,000,000 operations | 64 threads
  • Storage Mode: Fast | Durability: Durable (group commits, 2ms delay)
  • Batch Size: 1 operation per request (raw network performance test)
  • Versions: PostgreSQL 15, MongoDB 6.0, MySQL 8.0

All databases tested on the same machine, same day, for accurate comparison.

Durability Configuration Details

All databases configured with equivalent group commit settings for fair comparison:

DatabaseDurable Settingfsync BehaviorGroup Commit Delay
ekoDBdurable_operations=trueWAL fsync, group_commits=true2ms (explicit)
PostgreSQLsynchronous_commit=on, fsync=onPer-commit WAL fsynccommit_delay=2000µs, commit_siblings=2
MongoDBw=1, journal=trueWiredTiger journal fsyncjournalCommitInterval=2
MySQLinnodb_flush_log_at_trx_commit=1, sync_binlog=1Per-commit redo log + binlog fsyncbinlog_group_commit_sync_delay=2000µs

Group Commit Equivalence: All databases configured to match ekoDB's group_commit_delay_ms=2.

Not Apples-to-Apples

PostgreSQL and MySQL benchmarks use optimized JDBC drivers with connection pooling, prepared statement caching, and batch optimizations built into the driver layer. These are production-grade drivers tuned over decades.

ekoDB benchmarks use raw TCP protocol with a basic YCSB client: no driver-level optimizations, no connection pooling magic, no prepared statement cache.

Despite this disadvantage, ekoDB dominates write-heavy workloads and matches read-heavy performance.

Results

Throughput (ops/sec)

DatabaseWorkload AWorkload BWorkload CWorkload DWorkload F
ekoDB TCP38,02492,39695,87789,38135,684
PostgreSQL5,20753,112103,37094,7695,020
MongoDB10,55671,92272,88672,4329,957
MySQL2,55527,07163,02442,0173,215

Key findings:

  • Workload A (50% read/50% update): ekoDB 7.3x faster than PostgreSQL, 3.6x faster than MongoDB
  • Workload B (95% read/5% update): ekoDB 1.7x faster than PostgreSQL, 1.3x faster than MongoDB
  • Workload C (100% read): PostgreSQL edges ahead (103K vs 96K) but ekoDB uses 2.9x less CPU
  • Workload D (95% read latest/5% insert): ekoDB competitive with PostgreSQL (89K vs 95K)
  • Workload F (Read-Modify-Write): ekoDB 7.1x faster than PostgreSQL, 3.6x faster than MongoDB

Average Latency (ms)

DatabaseWorkload AWorkload BWorkload CWorkload DWorkload F
ekoDB TCP0.410.570.570.520.44
PostgreSQL1.070.170.570.331.14
MongoDB1.100.470.800.441.19
MySQL1.180.250.980.581.18

Key findings:

  • ekoDB maintains sub-millisecond latencies across all workloads
  • Lowest latency on write-heavy Workloads A (0.41ms) and F (0.44ms)
  • Competitive latency on read-heavy workloads B, C, D

CPU Efficiency (ops/sec per CPU %)

Note: ekoDB intentionally caps CPU usage at 95% to leave headroom for system stability. Other databases typically try to use 100% of available CPU during benchmarks.

DatabaseWorkload AWorkload BWorkload CWorkload DWorkload F
ekoDB TCP155421532474102
PostgreSQL4017718817936
MongoDB4692989646
MySQL5214920014145

Key findings:

  • ekoDB achieved 2-5x better CPU efficiency across all workloads
  • Despite capping CPU at 95%, ekoDB still outperformed competitors using 100% CPU
  • Best efficiency on read-heavy Workload C: 532 ops/CPU% (2.8x PostgreSQL, 5.4x MongoDB)

CPU Utilization Details

DatabaseA AvgA PeakB AvgB PeakC AvgC PeakD AvgD PeakF AvgF Peak
ekoDB TCP243.9271.4214.3317.6193.4264.5204.8316.7356.6395.8
MongoDB226.8359.6747.7863.1780.9866.4775.1851.5225.3478.1
MySQL68.0113.9181.0256.5305.9367.1301.4373.181.8132.3
PostgreSQL123.4187.5299.0518.0563.5674.0541.1762.2131.8182.6

Measured on 10-core Apple M1 Max. CPU% > 100 indicates multi-core usage.

Analysis: Why ekoDB Dominates at Scale

The 1M record, 64-thread test reveals ekoDB's architectural advantages:

1. Write-Heavy Workload Leadership (A, F)

Despite doing per-operation fsync with group commits, ekoDB achieves:

  • 3.6-7.6x faster throughput than established databases
  • Sub-500µs latencies while competitors exceed 1ms
  • Better CPU efficiency despite encryption, auth, indexing, and FTS overhead

2. Scalable Concurrency

At 64 threads, ekoDB's concurrent architecture shines:

  • Write load distributed efficiently across cores
  • Lock-free data structures eliminate contention
  • Group commits batch concurrent operations efficiently

3. Consistent Read Performance

Read-heavy workloads (B, C, D) maintain:

  • 89-96K ops/sec throughput competitive with PostgreSQL
  • 2-5x better CPU efficiency than competitors
  • Low, consistent latencies (0.52-0.57ms)

4. CPU Efficiency Matters

Why CPU Efficiency Matters

On cloud platforms, you pay for CPU cores. A database that delivers 50K ops/sec using 200% CPU (2 cores) is more cost-effective than one delivering 60K ops/sec using 600% CPU (6 cores).

Efficiency = ops/sec ÷ CPU%: Higher is better.

  • Cloud deployments: Lower CPU = smaller instance = lower monthly cost
  • Shared hosting: Less CPU contention with other services
  • Edge deployments: Limited compute resources
  • Multi-tenant: More headroom for concurrent databases

ekoDB's 2-5x better CPU efficiency translates to:

  • MongoDB uses 780-850% CPU on read workloads vs ekoDB's 193-214%
  • PostgreSQL uses 540-760% CPU on read workloads vs ekoDB's 193-204%
  • ekoDB intentionally caps CPU at 95% yet still outperforms competitors at 100%

Fast Mode Benchmarks (Non-Durable)

For comparison, here are the same high-scale benchmarks on the same hardware with durability disabled across all databases. This shows raw performance when fsync is turned off.

Test Configuration - Same Hardware
  • Hardware: Apple M1 Max, 64GB RAM, NVMe SSD (identical to durable tests above)
  • Scale: 1,000,000 records | 1,000,000 operations | 64 threads
  • Storage Mode: Fast | Durability: Non-Durable (no fsync, async writes)
  • Batch Size: 1 operation per request
  • Versions: PostgreSQL 15, MongoDB 6.0, MySQL 8.0

All benchmarks run on the same machine as the durable tests for direct comparison.

Durability Configuration Details

All databases configured with durability disabled for maximum throughput:

DatabaseDurable Settingfsync BehaviorNotes
ekoDBdurable_operations=falseNo fsync (async WAL)Async batched writes
PostgreSQLsynchronous_commit=off, fsync=offNo fsyncNo durability guarantees
MongoDBw=0No acknowledgment (fire-and-forget)Fastest, no guarantees
MySQLinnodb_flush_log_at_trx_commit=0, sync_binlog=0No fsyncBackground flush only

Results

Throughput (ops/sec)

DatabaseWorkload AWorkload BWorkload CWorkload DWorkload F
ekoDB TCP82,74089,66299,71189,12756,728
MongoDB86,56575,66677,44776,05753,000
PostgreSQL37,82148,64351,78452,45830,681
MySQL29,99154,56163,20750,84425,346

Key findings:

  • Workload A (50% read/50% update): ekoDB competitive with MongoDB (83K vs 87K), far ahead of PostgreSQL (38K)
  • Workload B-D (read-heavy): ekoDB leads at 89-100K ops/sec, MongoDB/PostgreSQL at 49-77K
  • Workload F (Read-Modify-Write): ekoDB fastest at 57K ops/sec
  • ekoDB maintains strong performance despite doing auth, encryption, FTS, and vector indexing on every operation

Average Latency (ms)

DatabaseWorkload AWorkload BWorkload CWorkload DWorkload F
ekoDB TCP0.660.660.590.660.67
PostgreSQL1.191.251.201.151.23
MongoDB1.420.850.790.871.18
MySQL1.150.920.951.031.27

Key findings:

  • ekoDB achieves lowest latencies across all workloads (0.59-0.67ms)
  • PostgreSQL has significantly higher latencies (1.15-1.25ms) in fast mode
  • MongoDB competitive on reads (0.79-0.87ms) but slower on writes (1.42ms)

CPU Efficiency (ops/sec per CPU %)

DatabaseWorkload AWorkload BWorkload CWorkload DWorkload F
ekoDB TCP196394462419138
PostgreSQL12313115314995
MongoDB10296989972
MySQL8115019314371

Key findings:

  • ekoDB achieves 2-4x better CPU efficiency even in non-durable mode
  • Best efficiency on Workload C: 462 ops/CPU% (3x PostgreSQL, 4.7x MongoDB)
  • ekoDB's efficiency advantage persists across all workload types

CPU Utilization Details

DatabaseA AvgA PeakB AvgB PeakC AvgC PeakD AvgD PeakF AvgF Peak
ekoDB TCP421.7480.6227.0297.8215.5346.9212.7321.5409.1476.2
MongoDB845.8881.0782.9859.0782.4863.8765.6858.4733.2838.1
MySQL369.7445.9361.8430.9326.1366.1355.0407.1354.2414.2
PostgreSQL305.2404.6369.8475.9336.6528.8350.7623.6322.9570.1

Measured on 10-core Apple M1 Max. CPU% > 100 indicates multi-core usage.

Analysis: Fast Mode Performance

When durability is disabled, ekoDB maintains its lead:

  1. ekoDB Leads or Matches on Throughput

    • ekoDB: 83-100K ops/sec across workloads
    • MongoDB: Competitive on write-heavy (87K on A), slower on reads (76-77K)
    • PostgreSQL: Significantly slower (38-52K ops/sec)
  2. ekoDB Has Lowest Latencies

    • ekoDB: 0.59-0.67ms across all workloads
    • PostgreSQL: 1.15-1.25ms (nearly 2x slower)
    • MongoDB: 0.79-1.42ms (competitive on reads, slower on writes)
  3. ekoDB's CPU Efficiency Advantage Remains

    • Still 2-4x more efficient than all competitors
    • MongoDB uses 780-860% CPU vs ekoDB's 210-420%
    • PostgreSQL uses 310-630% CPU vs ekoDB's 210-420%
  4. When to Choose Non-Durable Mode

    • Caching layers: Data can be reconstructed from source of truth
    • Analytics pipelines: Processing temporary datasets
    • Development/testing: Speed up testing workflows
    • Bulk ingestion: Initial data load, then switch to durable
Durability vs Performance Trade-off

Fast mode (non-durable) is faster but risky:

  • Data loss window: Uncommitted writes lost on crash (0-1 seconds typically)
  • Use case: Acceptable for caches, temp data, dev/test environments

Durable mode (default) is safer AND faster than competitors:

  • ekoDB durable: 38-103K ops/sec with full guarantees
  • ekoDB non-durable: 83-100K ops/sec without guarantees
  • ekoDB wins both: Use durable for production, non-durable only for caches/temp data

Balanced Mode Benchmarks

Balanced storage mode uses periodic checkpoint batching to disk. Below are benchmarks in both durable and non-durable configurations, showing why Fast mode is recommended over Balanced mode.

Balanced + Durable

Storage Mode: Balanced | Durability: Durable (group commits, 2ms delay)

Throughput (ops/sec)

DatabaseWorkload AWorkload BWorkload CWorkload DWorkload F
ekoDB TCP30,46275,26787,22281,01131,818
PostgreSQL5,20753,112103,37094,7695,020
MongoDB11,07168,71471,00368,61110,423
MySQL4,60342,80661,00546,1554,804

Key findings:

  • Balanced mode is 20-25% slower than Fast mode across all workloads
  • Fast + Durable: 38K (A), 92K (B), 96K (C), 89K (D), 36K (F)
  • Balanced + Durable: 30K (A), 75K (B), 87K (C), 81K (D), 32K (F)
  • Use Fast mode instead for better performance with same durability guarantees

CPU Efficiency (ops/sec per CPU %)

DatabaseWorkload AWorkload BWorkload CWorkload DWorkload F
ekoDB TCP108281346342104
PostgreSQL4317617919942
MongoDB49961039443
MySQL6114419614360

Key findings:

  • Balanced mode still achieves good CPU efficiency vs competitors
  • But Fast mode is even more efficient: 155 vs 108 (A), 421 vs 281 (B), 532 vs 346 (C)

Balanced + Non-Durable

For completeness, here are benchmarks using Balanced storage mode with durability disabled.

Test Configuration - Same Hardware
  • Hardware: Apple M1 Max, 64GB RAM, NVMe SSD (identical to tests above)
  • Scale: 1,000,000 records | 1,000,000 operations | 64 threads
  • Storage Mode: Balanced | Durability: Non-Durable (no fsync, async writes)
  • Batch Size: 1 operation per request
  • Architecture: Memory + index + WAL with periodic checkpoint batching to disk

All benchmarks run on the same machine for direct comparison.

Results

Throughput (ops/sec)

WorkloadInsert PhaseRuntime PhaseCombined Avg
A (50/50 r/w)74,52164,69669,609
B (95/5 read)78,66686,40882,537
C (100% read)63,44485,97774,711
D (95/5 latest)73,64383,29978,471
F (RMW)72,60651,04661,826

Average Latency (ms)

WorkloadInsert PhaseRuntime PhaseOverall
A (50/50 r/w)1.252.071.66
B (95/5 read)1.221.581.40
C (100% read)1.521.601.56
D (95/5 latest)1.301.821.56
F (RMW)1.321.821.57

Analysis: Balanced vs Fast Mode

Comparing Balanced mode (69-83K ops/sec) to Fast mode (79-95K ops/sec) in non-durable configuration:

Storage ModeWorkload AWorkload BWorkload CWorkload DWorkload F
Fast (non-durable)79K89K95K90K55K
Balanced (non-durable)70K83K75K78K62K
DifferenceFast 13% fasterFast 7% fasterFast 27% fasterFast 15% fasterBalanced 13% faster

Key findings:

  1. Fast mode is generally faster for most workloads (7-27% advantage)
  2. Balanced mode has slight edge on Workload F (read-modify-write transactions)
  3. Latencies are similar (1.4-1.7ms balanced vs 0.62-0.71ms fast) - Fast mode has lower latencies
  4. Checkpoint batching in Balanced mode adds some overhead compared to Fast mode's simpler architecture
Storage Mode Recommendation

Use Fast mode (not Balanced) for production:

  • Better performance on all workloads except F (7-27% faster)
  • Lower latencies across the board (0.6-0.7ms vs 1.4-1.7ms)
  • Simpler architecture (memory + WAL) vs Balanced's checkpoint complexity
  • Same or better durability when group commits are enabled

Balanced mode was useful in earlier versions but Fast mode's group commits (v0.31.0+) deliver better performance with simpler semantics.


Cold Mode Benchmarks (ekoDB-Specific Feature)

Cold storage mode is an ekoDB-exclusive feature that optimizes for write-heavy workloads using chunked append-only files. Traditional databases (PostgreSQL, MongoDB, MySQL) don't offer equivalent storage mode flexibility, so comparisons are not applicable.

ekoDB's Storage Mode Flexibility

Unlike traditional databases that use a single storage architecture, ekoDB offers three storage modes to optimize for different use cases:

  • Fast mode: Memory-first with WAL (general-purpose, recommended)
  • Balanced mode: Periodic checkpointing (legacy)
  • Cold mode: Chunked append-only files (write-heavy ingestion)

This flexibility allows you to choose the right storage architecture for your specific workload without changing databases.

Cold Mode Characteristics

  • Optimized for: Write-heavy ingestion, logging, audit trails, time-series data
  • Storage approach: Chunked append-only files instead of per-record storage
  • Read path: Disk-based with chunked scanning (slower than Fast mode)
  • Write path: Optimized for bulk ingestion
  • Memory footprint: Lower than Fast mode
  • Best for: Append-only patterns where recent data is hot

Benchmark Results (ekoDB Only)

Full benchmarks completed for both durable and non-durable configurations:

Cold + Durable Performance

1M records, 64 threads, full fsync guarantees with group commits

WorkloadekoDB Cold (Durable)ekoDB Fast (Durable)Difference
A (50/50 r/w)17K ops/sec38K ops/secFast 2.2x faster
B (95/5 read)60K ops/sec92K ops/secFast 1.5x faster
C (100% read)96K ops/sec96K ops/secTie
D (95/5 latest)43K ops/sec89K ops/secFast 2.1x faster
F (RMW)6K ops/sec36K ops/secFast 6x faster

Cold + Non-Durable Performance

1M records, 64 threads, no fsync (async writes)

WorkloadekoDB Cold (Fast)ekoDB Fast (Fast)Difference
A (50/50 r/w)56K ops/sec83K ops/secFast 1.5x faster
B (95/5 read)46K ops/sec90K ops/secFast 1.9x faster
C (100% read)51K ops/sec100K ops/secFast 2x faster
D (95/5 latest)79K ops/sec89K ops/secFast 1.1x faster
F (RMW)32K ops/sec57K ops/secFast 1.8x faster

Analysis: Cold vs Fast Mode

Key findings:

  1. Fast mode is faster across all workloads except pure reads where they tie (Workload C, durable)
  2. Cold mode significantly slower on writes: 2.2-6x slower on write-heavy workloads (A, F)
  3. Cold mode slower on reads too: Only matches Fast mode on pure read workload (C) in durable mode
  4. Cold mode's disk-based architecture adds overhead even for sequential operations

Recommendation

Use Fast mode (default) for all production workloads:

  • Consistently faster: 1.1-6x better performance across all workloads
  • Better write performance: 38K vs 17K on Workload A (durable)
  • Better read performance: 89-92K vs 43-60K on mixed reads (B, D)
  • Sub-millisecond latencies: Proven low-latency performance

Cold mode is NOT recommended based on benchmark results:

  • Slower than Fast mode in every scenario tested
  • Only ties on pure read workload (C) in durable mode
  • Disk-based chunked scanning adds significant overhead
  • Memory savings don't justify the 2-6x performance penalty
Cold Mode Performance

Cold mode underperforms Fast mode in all tested scenarios. The disk-first architecture with chunked append-only files does not provide the expected benefits for write-heavy workloads. Fast mode is recommended for all use cases, including logging and time-series data.


Competitive Analysis

Direct comparison against PostgreSQL and MongoDB at scale:

ekoDB vs PostgreSQL

MetricekoDB AdvantageWhy It Matters
Write-heavy (A, F)7.5x faster throughputSession stores, shopping carts, transactions
Read-heavy (B, C, D)Competitive throughput, 2-3x CPU efficiencyLower cloud costs, more headroom
Latency0.41ms vs 1.07ms on writesBetter user experience on updates
CPU Efficiency2.8-5x betterSmaller instances, lower monthly cost

PostgreSQL edges ahead on pure read throughput (Workload C: 106K vs 103K) but uses 3x more CPU.

ekoDB vs MongoDB

MetricekoDB AdvantageWhy It Matters
Write-heavy (A, F)3.6x faster throughputBetter at mixed workloads
Read-heavy (B, C, D)1.3-1.7x faster, 2-5x CPU efficiencyFaster and cheaper
Latency0.41ms vs 1.10ms on writesBetter write performance
CPU Efficiency2-5x betterMongoDB uses 780-850% CPU vs ekoDB's 193-214%

MongoDB requires 4x more CPU cores to achieve lower throughput.

Feature Comparison

Performance is only part of the story - ekoDB does more per request:

FeatureekoDBPostgreSQLMongoDB
Write Throughput (A)38K (7.5x faster)5K11K
Read Throughput (C)103K106K77K
CPU Efficiency532 ops/CPU% (2.8x better)188 ops/CPU%98 ops/CPU%
Write Latency0.41ms1.07ms1.10ms
Document Queries✅ Built-in JSON✅ SQL + JSONB✅ Built-in BSON
Vector Search✅ Built-in⚠️ pgvector ext⚠️ Atlas only
Full-Text Search✅ Built-in⚠️ FTS config✅ Built-in
Built-in Auth✅ JWT + API keys⚠️ Roles only⚠️ SCRAM only
Per-op Encryption✅ AES-GCM
Single Binary✅ Yes❌ No❌ No
Real-time Subscriptions✅ WebSocket⚠️ Change Streams
Group Commits✅ Yes✅ Single WAL✅ Journal

Embedded Benchmarks (Local Performance)

These benchmarks measure ekoDB's embedded Rust database engine without network overhead. Useful for understanding raw storage performance and comparing against other embedded databases.

Benchmark Environment

All benchmarks run on the embedded Rust database engine. Production performance via REST/WebSocket/TCP APIs includes additional network latency.

Summary

CategoryOperationekoDBSQLiteRocksDBLevelDB
Key-ValueGet209 ns~5 µs~3 µs~4 µs
Key-ValueSet4 µs~50 µs~6 µs~8 µs
Queryfind_by_id2.3 µs~10 µsN/AN/A
QuerySimple (10 records)108 µs~200 µsN/AN/A
InsertSingle record101 µs~50 µs~6 µs~8 µs
UpdateSingle record27 µs~50 µs~6 µs~8 µs

When to use ekoDB: Excellent reads and KV operations, plus document queries that RocksDB/LevelDB can't do.

When to consider alternatives: RocksDB/LevelDB are faster at raw writes. They're pure KV stores without document parsing or indexing overhead.

Key-Value Operations

OperationekoDBSQLiteRocksDBLevelDB
Get209 ns~5 µs~3 µs~4 µs
Set4.0 µs~50 µs~6 µs~8 µs
Exists109 ns~5 µs~3 µs~4 µs
Delete85 ns~50 µs~6 µs~8 µs

ekoDB's KV layer is optimized for reads. RocksDB/LevelDB edge ahead on writes due to LSM-tree architecture.

Query Operations

RecordsekoDB (Simple)ekoDB (Complex)SQLiteDuckDB
10108 µs109 µs~200 µs~300 µs
100113 µs1.16 ms~500 µs~600 µs
1000120 µs12.8 ms~2 ms~15 ms

ekoDB maintains consistent performance as result sets grow. For complex analytical queries at scale, DuckDB is purpose-built for that use case.

Cache Warming

ekoDB's pattern-based cache warming pre-loads frequently accessed records:

RecordsUncachedCachedSpeedup
10329 µs109 µs3.0x
1003.38 ms1.08 ms3.1x
100041.4 ms11.4 ms3.6x

Write Operations

OperationekoDBSQLiteRocksDBLevelDB
Single insert101 µs~50 µs~6 µs~8 µs
Batch insert 1005.2 ms~5 ms~600 µs~800 µs
Single update27 µs~50 µs~6 µs~8 µs
Single delete72 µs~50 µs~6 µs~8 µs

RocksDB/LevelDB dominate write performance. Their LSM-tree design converts random writes to sequential I/O. ekoDB includes indexing overhead that slows writes but accelerates reads and enables queries.

Join Operations

Join TypeekoDB (10)ekoDB (100)ekoDB (1000)SQLite (1000)
Simple Join22 µs528 µs42.9 ms~80 ms
Multi-Collection22 µs530 µs40.9 ms~100 ms
Filtered Join25 µs617 µs45.6 ms~90 ms

ekoDB outperforms SQLite on joins due to in-memory processing. For complex join strategies on large datasets, SQLite's query planner offers more sophistication.

Authentication & Encryption

OperationTime
Validate API key87 ns
Generate token1.08 µs
Validate token1.61 µs
Encrypt (small)2.0 µs
Encrypt (large)72.3 µs

Sub-microsecond auth overhead means authentication is negligible in request latency.

Feature Comparison (Embedded)

FeatureekoDBSQLiteRocksDBLevelDB
Document queries
Full-text search✅ (FTS5)
Vector search
Built-in auth
ACID transactions

ekoDB trades some raw write performance for a richer feature set. If you need pure KV speed, RocksDB wins. If you need queries, search, and auth in one package, ekoDB is the only embedded option.


Storage Mode Performance Summary

Fast mode is the default and recommended storage mode for production workloads.

Best for: Production workloads, general-purpose applications, read-heavy and mixed workloads

1M records, 64 threads, full fsync guarantees with group commits

WorkloadThroughputLatencyvs PostgreSQLvs MongoDB
A (50/50)38K ops/sec0.41ms7.3x faster3.6x faster
B (95/5)92K ops/sec0.57ms1.7x faster1.3x faster
C (100% read)96K ops/sec0.57msPostgreSQL 7% faster, ekoDB 2.9x more CPU efficient1.3x faster
D (95/5 latest)89K ops/sec0.52msPostgreSQL 6% faster, ekoDB 2.6x more CPU efficient1.2x faster
F (RMW)36K ops/sec0.44ms7.1x faster3.6x faster

CPU Efficiency: 2-5x better than all competitors (155-532 ops/CPU%)

Fast Mode (Non-Durable)

1M records, 64 threads, no fsync (async writes)

WorkloadThroughputLatencyvs PostgreSQLvs MongoDB
A (50/50)83K ops/sec0.66ms2.2x faster4% slower
B (95/5)90K ops/sec0.66ms1.8x faster19% faster
C (100% read)100K ops/sec0.59ms1.9x faster29% faster
D (95/5 latest)89K ops/sec0.66ms1.7x faster17% faster
F (RMW)57K ops/sec0.67ms1.9x faster7% faster

CPU Efficiency: Still 2-4x better than all competitors (138-462 ops/CPU%)

Recommendation

Use Fast mode with durable operations (default) for production:

  • Outstanding write performance with full durability guarantees
  • Competitive read performance at 2-3x better CPU efficiency
  • Sub-millisecond latencies across all workload types
  • Lowest cloud costs due to superior CPU efficiency
  • No data loss on crashes (every write guaranteed on disk)

Benchmark Coverage Summary

✅ Complete Benchmarks (Documented)

Storage ModeDurabilityStatusPerformance
FastDurable✅ Complete38-96K ops/sec (RECOMMENDED)
FastNon-Durable✅ Complete83-100K ops/sec
BalancedDurable✅ Complete30-87K ops/sec (20% slower than Fast)
BalancedNon-Durable✅ Complete70-83K ops/sec (7-25% slower than Fast)

🔬 ekoDB-Only Benchmarks (No Comparison Needed)

Storage ModeDurabilityStatusNotes
ColdDurable🔬 ekoDB-onlyTraditional databases don't have equivalent storage modes
ColdNon-Durable🔬 ekoDB-onlyTraditional databases don't have equivalent storage modes

Why no comparison? Cold mode is an ekoDB-exclusive feature. PostgreSQL, MongoDB, and MySQL use fixed storage architectures and don't offer equivalent write-optimized append-only modes.


See Also