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


Groups > comp.programming.threads > #2165 > unrolled thread

Bakery concurrent FIFO queue algorithm and benchmarks...

Started byaminer <aminer@toto.net>
First post2014-04-14 15:25 -0700
Last post2014-04-14 15:25 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.programming.threads


Contents

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

#2165 — Bakery concurrent FIFO queue algorithm and benchmarks...

Fromaminer <aminer@toto.net>
Date2014-04-14 15:25 -0700
SubjectBakery concurrent FIFO queue algorithm and benchmarks...
Message-ID<lihcle$mu5$1@news.albasani.net>
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.













[toc] | [standalone]


Back to top | Article view | comp.programming.threads


csiph-web