Scalability Benchmark
N producer threads push a 4-byte integer into one queue, N consumer threads pop the integers from the queue. All producers posts 1,000,000 messages in total. Total time to send and receive all the messages is measured. The benchmark is run for from 1 producer and 1 consumer up to (total-number-of-cpus / 2) producers/consumers to measure the scalabilty of different queues.
Latency Benchmark
One thread posts an integer to another thread and waits for the reply using two queues. The benchmarks measures the total time of 100,000 ping-pongs, best of 10 runs. Contention is minimal here to be able to achieve and measure the lowest latency. Reports the average round-trip time.
Systems details
Intel i9-9900KS system
- OS: Ubuntu-18.04.3 LTS
- Compiler: gcc-8.3.0
- atomic_queue version: commit de6a8cfd8ba523fb949391183d018357265eaefe
- Boost version: 1.65.1
- TBB version: 2019_U7, commit 4233fef583b4f8cbf9f781311717600feaaa0694
- moodycamel concurrentqueue version: commit dea078cf5b6e742cd67a0d725e36f872feca4de4
- moodycamel readerwriterqueue version: commit 2ae710de996a1d02bbc7696b2cdff2c6078e76f8
- xenium library version: commit f6416d30043a7d025405038d5ddd4794aaaab4a3
Intel Xeon Gold 6132 system
- OS: Red Hat Enterprise Linux Server release 6.10 (Santiago)
- Compiler: gcc-5.4.0
- atomic_queue version: commit de6a8cfd8ba523fb949391183d018357265eaefe
- Boost version: 1.61.0
- TBB version: 2019_U7, commit 4233fef583b4f8cbf9f781311717600feaaa0694
- moodycamel concurrentqueue version: commit dea078cf5b6e742cd67a0d725e36f872feca4de4
- moodycamel readerwriterqueue version: commit 2ae710de996a1d02bbc7696b2cdff2c6078e76f8
- xenium library version: commit f6416d30043a7d025405038d5ddd4794aaaab4a3
Source Code
github.com/max0x7ba/atomic_queue
Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.