# Scalability Benchmark

N producer threads push a 4-byte integer into one same 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 through one queue and waits for a reply from another queue (2 queues in total). The benchmarks measures the total time of 100,000 ping-pongs, best of 10 runs. Contention is minimal here (1-producer-1-consumer, 1 element in the queue) 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.4 LTS
- Compiler: gcc-8.4.0
- atomic_queue version: commit 7e138d21fcd4bad95e030d8d6c8b77d5a4538baa
- 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-8.4.0
- atomic_queue version: commit 7e138d21fcd4bad95e030d8d6c8b77d5a4538baa
- 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

### Source Code

github.com/max0x7ba/atomic_queue

Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.