Performance

How it was measured

The numbers on this site were measured with Raft DB's own benchmark harness; how a run is done, what a result file holds, and the rules that keep a run honest.

The numbers on this site were measured with Raft DB's own benchmark harness, raftdb-bench. The method is described on this page; the harness is not part of the download, so you cannot repeat these runs with the programs you unpack.

What a run is#

A run executes one suite (one of the suites on The benchmark suites) at a size given for the run (entries or documents, depending on the suite). It prints a table and writes a result file in JSON with the host, the Rust version, the commit of the code that was measured and every metric. A run can be told to fail when a target is not reached.

The runs were made like this:

  • One suite at a time, never two at once.
  • Windows runs at below-normal priority so that the machine stays usable.
  • Only release builds. A debug build gives meaningless numbers.

Example sizes used on Windows: memory-baseline with 1,000,000 entries, doc-format with 200,000 documents and exec-filter with 2,000,000 documents.

Native against portable builds#

Some suites were run twice, once with the native fast paths and once with the portable build of the engine crates (portable code paths, no platform-specific instructions), to see what the fast paths gain.

Other measurement tools#

MeasurementWhat was compared or measured
MySQL front-end through JDBCThe front-end against real MySQL through the stock JDBC driver (D66 to D69)
Server time for the front-end's reads, no socketThe server's own time for the reads the front-end asks of it
YCSB comparisonRaft DB against other databases with YCSB; see Comparison on Windows and Comparison on Linux
Studio file viewerThe Studio's file viewer on a 100 MB file; see Studio speed

What the harness measures with#

latency.rs records latency in an HdrHistogram, so percentiles come from timed batches. alloc.rs wraps the global allocator and counts the bytes requested (not allocator headers), which is a lower bound. A suite that writes files (wal, db) writes real files in the temp directory and removes them.

See also#