From 88d3c6fc5604833d309a0bd3ba6dacffc68a0fb5 Mon Sep 17 00:00:00 2001 From: Ibraheem Ahmed Date: Sat, 30 Nov 2024 15:18:50 -0500 Subject: [PATCH] update benchmark results --- BENCHMARKS.md | 4 +- assets/Exchange.ahash.latency.svg | 214 +++++++++++++------------- assets/Exchange.ahash.throughput.svg | 64 ++++---- assets/RapidGrow.ahash.latency.svg | 168 ++++++-------------- assets/RapidGrow.ahash.throughput.svg | 56 +++---- assets/ReadHeavy.ahash.latency.svg | 188 +++++++++++++--------- assets/ReadHeavy.ahash.throughput.svg | 56 ++++--- 7 files changed, 363 insertions(+), 387 deletions(-) diff --git a/BENCHMARKS.md b/BENCHMARKS.md index 45ddeea..4fb5248 100644 --- a/BENCHMARKS.md +++ b/BENCHMARKS.md @@ -2,7 +2,7 @@ *As always, benchmarks should be taken with a grain of salt. Always measure for your workload.* -Below are the benchmark results from the [`conc-map-bench`](https://github.com/xacrimon/conc-map-bench) benchmarking harness under varying workloads. All benchmarks were run on a 16-core AMD EPYC processor, using [`ahash`](https://github.com/tkaitchuck/aHash) and the [`mimalloc`](https://github.com/microsoft/mimalloc) allocator. +Below are the benchmark results from the [`conc-map-bench`](https://github.com/xacrimon/conc-map-bench) benchmarking harness under varying workloads. All benchmarks were run on a AMD Ryzen 9 9950X processor, using [`ahash`](https://github.com/tkaitchuck/aHash) and the [`mimalloc`](https://github.com/microsoft/mimalloc) allocator. ### Read Heavy @@ -24,7 +24,7 @@ Below are the benchmark results from the [`conc-map-bench`](https://github.com/x # Discussion -As mentioned in the [performance](../README#performance) section of the guide, `papaya` is optimized read-heavy workloads. As expected, it outperforms all competitors in the read-heavy benchmark. An important guarantee of `papaya` is that reads *never* block under any circumstances. This is crucial for providing consistent read latency regardless of write concurrency. However, it falls short in update and insert-heavy workloads due to allocator pressure and the overhead of memory reclamation, which is necessary for lock-free reads. If your workload is write-heavy and you do not benefit from any of `papaya`'s features, you may wish to consider an alternate hash-table implementation. +As mentioned in the [performance](../README#performance) section of the guide, `papaya` is optimized read-heavy workloads. As expected, it outperforms all competitors in the read-heavy benchmark. An important guarantee of `papaya` is that reads *never* block under any circumstances. This is crucial for providing consistent read latency regardless of write concurrency. However, it falls short in update-heavy workloads due to allocator pressure and the overhead of memory reclamation, which is necessary for lock-free reads. If your workload is write-heavy and you do not benefit from any of `papaya`'s features, you may wish to consider an alternate hash-table implementation. Additionally, `papaya` does a lot better in terms of latency distribution due to incremental resizing and the lack of bucket locks. Comparing histograms of `insert` latency between `papaya` and `dashmap`, we see that `papaya` manages to keep tail latency lower by a few orders of magnitude. Some latency spikes are unavoidable due to the allocations necessary to maintain a large hash-table, but the distribution is much more consistent (notice the scale of the y-axis). diff --git a/assets/Exchange.ahash.latency.svg b/assets/Exchange.ahash.latency.svg index 6d96929..c4ef839 100644 --- a/assets/Exchange.ahash.latency.svg +++ b/assets/Exchange.ahash.latency.svg @@ -65,74 +65,74 @@ Latency 0 ns - -100 ns + +50 ns - - -200 ns + + +100 ns - - -300 ns + + +150 ns - - -400 ns + + +200 ns - - -500 ns + + +250 ns - - -600 ns + + +300 ns - - -700 ns + + +350 ns - - -800 ns + + +400 ns - - -900 ns + + +450 ns - - -1000 ns + + +500 ns - - -1100 ns + + +550 ns - - -1200 ns + + +600 ns - - -1300 ns + + +650 ns - - -1400 ns + + +700 ns - - -1500 ns + + +750 ns - - -1600 ns + + +800 ns - - -1700 ns + + +850 ns - + 2 @@ -199,82 +199,82 @@ Latency - + 0 ns - -100 ns + +50 ns - - -200 ns + + +100 ns - - -300 ns + + +150 ns - - -400 ns + + +200 ns - - -500 ns + + +250 ns - - -600 ns + + +300 ns - - -700 ns + + +350 ns - - -800 ns + + +400 ns - - -900 ns + + +450 ns - - -1000 ns + + +500 ns - - -1100 ns + + +550 ns - - -1200 ns + + +600 ns - - -1300 ns + + +650 ns - - -1400 ns + + +700 ns - - -1500 ns + + +750 ns - - -1600 ns + + +800 ns - - -1700 ns + + +850 ns - - - - - + + + + + diff --git a/assets/Exchange.ahash.throughput.svg b/assets/Exchange.ahash.throughput.svg index 8a31956..4d07258 100644 --- a/assets/Exchange.ahash.throughput.svg +++ b/assets/Exchange.ahash.throughput.svg @@ -65,30 +65,34 @@ Throughput 0 Mop/s - + 20 Mop/s - - + + 40 Mop/s - - + + 60 Mop/s - - + + 80 Mop/s - - + + 100 Mop/s - - + + 120 Mop/s - + + +140 Mop/s + + 2 @@ -159,34 +163,38 @@ Throughput 0 Mop/s - + 20 Mop/s - - + + 40 Mop/s - - + + 60 Mop/s - - + + 80 Mop/s - - + + 100 Mop/s - - + + 120 Mop/s - - - - - + + +140 Mop/s + + + + + + diff --git a/assets/RapidGrow.ahash.latency.svg b/assets/RapidGrow.ahash.latency.svg index 72b490a..406d657 100644 --- a/assets/RapidGrow.ahash.latency.svg +++ b/assets/RapidGrow.ahash.latency.svg @@ -65,86 +65,46 @@ Latency 0 ns - + 100 ns - - + + 200 ns - - + + 300 ns - - + + 400 ns - - + + 500 ns - - + + 600 ns - - + + 700 ns - - + + 800 ns - - + + 900 ns - - + + 1000 ns - - -1100 ns - - - -1200 ns - - - -1300 ns - - - -1400 ns - - - -1500 ns - - - -1600 ns - - - -1700 ns - - - -1800 ns - - - -1900 ns - - - -2000 ns - - + 2 @@ -215,90 +175,50 @@ Latency 0 ns - + 100 ns - - + + 200 ns - - + + 300 ns - - + + 400 ns - - + + 500 ns - - + + 600 ns - - + + 700 ns - - + + 800 ns - - + + 900 ns - - + + 1000 ns - - -1100 ns - - - -1200 ns - - - -1300 ns - - - -1400 ns - - - -1500 ns - - - -1600 ns - - - -1700 ns - - - -1800 ns - - - -1900 ns - - - -2000 ns - - - - - - + + + + + diff --git a/assets/RapidGrow.ahash.throughput.svg b/assets/RapidGrow.ahash.throughput.svg index 60c8c27..8ad7a74 100644 --- a/assets/RapidGrow.ahash.throughput.svg +++ b/assets/RapidGrow.ahash.throughput.svg @@ -65,30 +65,30 @@ Throughput 0 Mop/s - + 20 Mop/s - - + + 40 Mop/s - - + + 60 Mop/s - - + + 80 Mop/s - - + + 100 Mop/s - - + + 120 Mop/s - + 2 @@ -159,34 +159,34 @@ Throughput 0 Mop/s - + 20 Mop/s - - + + 40 Mop/s - - + + 60 Mop/s - - + + 80 Mop/s - - + + 100 Mop/s - - + + 120 Mop/s - - - - - + + + + + diff --git a/assets/ReadHeavy.ahash.latency.svg b/assets/ReadHeavy.ahash.latency.svg index 6c0cf7d..4efec69 100644 --- a/assets/ReadHeavy.ahash.latency.svg +++ b/assets/ReadHeavy.ahash.latency.svg @@ -65,60 +65,80 @@ Latency 0 ns - + +10 ns + + + 20 ns - - + + +30 ns + + + 40 ns - - + + +50 ns + + + 60 ns - - + + +70 ns + + + 80 ns - - + + +90 ns + + + 100 ns - - -120 ns + + +110 ns - - -140 ns + + +120 ns - - -160 ns + + +130 ns - - -180 ns + + +140 ns - - -200 ns + + +150 ns - - -220 ns + + +160 ns - - -240 ns + + +170 ns - - -260 ns + + +180 ns - + -280 ns +190 ns @@ -191,66 +211,86 @@ Latency 0 ns - + +10 ns + + + 20 ns - - + + +30 ns + + + 40 ns - - + + +50 ns + + + 60 ns - - + + +70 ns + + + 80 ns - - + + +90 ns + + + 100 ns - - -120 ns + + +110 ns - - -140 ns + + +120 ns - - -160 ns + + +130 ns - - -180 ns + + +140 ns - - -200 ns + + +150 ns - - -220 ns + + +160 ns - - -240 ns + + +170 ns - - -260 ns + + +180 ns - + -280 ns +190 ns - - - - + + + + diff --git a/assets/ReadHeavy.ahash.throughput.svg b/assets/ReadHeavy.ahash.throughput.svg index b8b48de..fa3ebf6 100644 --- a/assets/ReadHeavy.ahash.throughput.svg +++ b/assets/ReadHeavy.ahash.throughput.svg @@ -65,26 +65,30 @@ Throughput 0 Mop/s - + 50 Mop/s - - + + 100 Mop/s - - + + 150 Mop/s - - + + 200 Mop/s - - + + 250 Mop/s - + + +300 Mop/s + + 2 @@ -155,30 +159,34 @@ Throughput 0 Mop/s - + 50 Mop/s - - + + 100 Mop/s - - + + 150 Mop/s - - + + 200 Mop/s - - + + 250 Mop/s - - - - - + + +300 Mop/s + + + + + +