Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #2165

Bakery concurrent FIFO queue algorithm and benchmarks...

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject Bakery concurrent FIFO queue algorithm and benchmarks...
Date 2014-04-14 15:25 -0700
Organization albasani.net
Message-ID <lihcle$mu5$1@news.albasani.net> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Hello all,


I have benchmarked the Bakery algorithm inside the FIFO queue
of Chriss Thomasson against my concurrent FIFO queue that uses
Ticket spinlock with a proportional backoff...

Here is the Bakery concurrent FIFO queue algorithm:

https://groups.google.com/d/topic/lock-free/acjQ3-89abE/discussion

And the results are the following:

For the Bakery concurrent FIFO queue:

The push throughput is  2.8 millions of pushes per second

and the pop() throughput is 12 millions of pops per second.


For my concurrent FIFO queue that uses Ticket spinlock with a 
proportional backoff here is the results:

The push() throughput is the same as the Bakery , it is 2.8 millions of 
pushes per second

but the pop() throughput is 4x times slower that the the Bakery.


But as you have noticed even if the Bakery is 4x times faster on the
pop() side , when you are in a scenario of high contention and you are 
running the pushes and the pops in parallel, the service throughput will 
be limited by the arrival rate that is 2.8 millions per second , hence i 
think i don't need the Bakery algorithm and i will stay with
my concurrent FIFO queue that uses a Ticket spinlock.



Thank you,
Amine Moulay Ramdane.













Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread


Thread

Bakery concurrent FIFO queue algorithm and benchmarks... aminer <aminer@toto.net> - 2014-04-14 15:25 -0700

csiph-web