Scalable flat-combining based synchronous queues

  • Authors:
  • Danny Hendler;Itai Incze;Nir Shavit;Moran Tzafrir

  • Affiliations:
  • Ben-Gurion University;Tel-Aviv University;Tel-Aviv University and Sun Labs at Oracle;Tel-Aviv University

  • Venue:
  • DISC'10 Proceedings of the 24th international conference on Distributed computing
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

In a synchronous queue, producers and consumers handshake to exchange data. Recently, new scalable unfair synchronous queues were added to the Java JDK 6.0 to support high performance thread pools. This paper applies flat-combining to the problem of designing a synchronous queue algorithm. We first use the original flat-combining algorithm, a single "combiner" thread acquires a global lock and services the other threads' combined requests with very low synchronization overheads. As we show, this single combiner approach delivers superior performance up to a certain level of concurrency, but unfortunately does not continue to scale beyond that point. In order to continue to deliver scalable performance as concurrency increases, we introduce a new parallel flat-combining algorithm. The new algorithm dynamically adds additional concurrently executing flat-combiners that coordinate their work. It enjoys the low coordination overheads of sequential flat combining, with the added scalability that comes with parallelism. Our novel unfair synchronous queue using parallel flat combining exhibits scalability far and beyond that of the JDK 6.0 algorithm: it matches it in the case of a single producer and consumer, and is superior throughout the concurrency range, delivering up to 11 (eleven) times the throughput at high concurrency.