Developer, Knowledge Management Advocate
My Projects
Releasing: GoQueueBench

Releasing: GoQueueBench

As i coded on OuroborosDB i noticed that i need a very fast queue for a rather unique architectural design decision.
I try to build the network module in such a way that i can test the behavior completely deterministic while “simulating” entire clusters in a single process.

So i build a test prototype of my global network queue with go’s channels and noticed that it was a major performance bottleneck, after writing 2 different ring buffer queue implementations it became clear that some queues behave completely different under different congestion levels and core counts - some so unpredictable that i just did not wanted to use them in my project.

This prompted me to take a relatively large chunk out of my free time and write a suite to benchmark different queue implementations i build under different conditions and score them based on their performance and predictability.

The result of this work is GoQueueBench

These are the results of the benchmark suite:

ImplementationOverall ScoreThroughput Light LoadThroughput Heavy LoadThroughput AverageStability RatioHomogeneity FactorUncertaintyTotal Tests
VortexQueue113414666926449550292587763091.150.870.25681
LightningQueue96317716638213462769060367280.990.950.31681
FastMPMCQueue93840676870924459862060701510.960.930.28681
OptimizedMPMCQueue91052626436385437982358385550.970.940.32681
OptimizedMPMCQueueSharded81301976369891383414067818650.840.880.39681
MultiHeadQueue73912034363332349206855588491.120.910.36681
BasicMPMCQueue55992524370889266961236677150.890.930.30681
Golang Buffered Channel53124856667828276098543127200.540.820.66681
FastMPMCQueueTicket32297807705164120392458038210.210.641.19681

Please note that i build the package so that all queue adhere to the same interface and can be swapped out easily.

Technology Mia's Projects FLOSS Open Source Golang OuroborosDB Benchmark Queue Performance Optimization
Loading...