Skip to content

Storage engine benchmarks #3

@kellabyte

Description

@kellabyte

We should create some independent benchmarks for storage engines. We can get input from the various storage engine authors to make sure we are creating apples to apples comparisons and using them with the right settings but we get to make sure nothing unfair happens.

We can compare Go native and CGO based storage engines.

Setup

[2]  Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
[16] 1600 MHz 8GB DDR-3 Single Rank DIMM
[1]  Raid Controller
[8]  Intel S3520 SSD 240GB
[1]  Broadcom 5720 1Gbps Ethernet Adapter
[2]  Intel Ethernet Server Adapter X520

kellabyte@kbperf1:~$ sudo hdparm -Tt /dev/sda
/dev/sda:
 Timing cached reads:   22046 MB in  1.99 seconds = 11059.90 MB/sec
 Timing buffered disk reads: 2654 MB in  3.00 seconds = 884.56 MB/sec

kellabyte@kbperf1:~$ sudo hdparm -Tt /dev/sda
/dev/sda:
 Timing cached reads:   21698 MB in  1.99 seconds = 10882.74 MB/sec
 Timing buffered disk reads: 2818 MB in  3.00 seconds = 939.18 MB/sec

kellabyte@kbperf1:~$ sudo hdparm -Tt /dev/sda
/dev/sda:
 Timing cached reads:   21800 MB in  1.99 seconds = 10933.80 MB/sec
 Timing buffered disk reads: 2828 MB in  3.00 seconds = 942.53 MB/sec

kellabyte@kbperf2:~$ sudo hdparm -Tt /dev/sda
/dev/sda:
 Timing cached reads:   21900 MB in  1.99 seconds = 10982.74 MB/sec
 Timing buffered disk reads: 2800 MB in  3.00 seconds = 933.14 MB/sec

kellabyte@kbperf2:~$ sudo hdparm -Tt /dev/sda
/dev/sda:
 Timing cached reads:   21856 MB in  1.99 seconds = 10957.83 MB/sec
 Timing buffered disk reads: 2822 MB in  3.00 seconds = 940.41 MB/sec

kellabyte@kbperf2:~$ sudo hdparm -Tt /dev/sda
/dev/sda:
 Timing cached reads:   21952 MB in  1.99 seconds = 11011.40 MB/sec
 Timing buffered disk reads: 2810 MB in  3.00 seconds = 936.53 MB/sec

Requirements

  1. Document guarantees like we did for queues so that performance numbers has a context of what safety and correctness guarantees are provided. Some storage engines make tradeoffs for performance, some for correctness.
  2. Benchmark sequential writes of different sizes.
  3. Benchmark random writes of different sizes.
  4. Benchmark mixed workloads of different ratios.
  5. Measure latency histograms properly with coordinated omission.
  6. Include longer 72+ hour benchmarks to measure degradation.

Storage engines

Architecture

I propose an architecture where each storage engine implements a standard HTTP API implemented in Go. This ensures the workload client code is in 1 standard place and utilizes excellent HTTP based reporting tools.

The HTTP benchmark tool will be implemented using wrk and wrk2 and their LUA scripting capabilities.

  1. Wrk has excellent max throughput benchmarking performance.
  2. Wrk2 has properly accounted for coordinated omission latency distribution reporting.

I have a minimal HTTP server that can currently handle 15M ops/sec at 3% CPU utilization on the server that can handle 1.5GB/sec of requests.

Included in the benchmarks will be 2 baseline results so that we can measure the HTTP overhead and the cgo overhead.

Concerns

People may argue that C libraries like LMDB and RocksDB have a disadvantage due to the CGO overhead but I suspect in long term tests this won't be as visible. A lot of infrastructure is being written in go and we want to benchmark how these behave.

By benchmarking baselines of HTTP and HTTP+CGO we can visualize or subtract the overhead in the results.

Proposed benchmark variations

Each benchmark variation we come up with there will be a short and long (72 hours?) version.

TODO: Define variations with the community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions