Skip to main content
QUICK REVIEW

[Paper Review] In Search of the Fastest Concurrent Union-Find Algorithm.

Dan Alistarh, Alexander Fedorov|arXiv (Cornell University)|Jan 1, 2019
Distributed systems and fault toleranceComputer Science1 citations
TL;DR

This paper evaluates and optimizes concurrent Union-Find algorithms across diverse platforms and workloads, identifying cache misses as the primary performance bottleneck. By implicitly storing node priorities and using safe plain reads/writes, it reduces memory traffic, and discovers that a coarse-grained locked variant with lock elision via Transactional Memory achieves top performance, outperforming other concurrent designs.

ABSTRACT

Union-Find (or Disjoint-Set Union) is one of the fundamental problems in computer science; it has been well-studied from both theoretical and practical perspectives in the sequential case. Recently, there has been mounting interest in analyzing this problem in the concurrent scenario, and several asymptotically-efficient algorithms have been proposed. Yet, to date, there is very little known about the practical performance of concurrent Union-Find. This work addresses this gap. We evaluate and analyze the performance of several concurrent Union-Find algorithms and optimization strategies across a wide range of platforms (Intel, AMD, and ARM) and workloads (social, random, and road networks, as well as integrations into more complex algorithms). We first observe that, due to the limited computational cost, the number of induced cache misses is the critical determining factor for the performance of existing algorithms. We introduce new techniques to reduce this cost by storing node priorities implicitly and by using plain reads and writes in a way that does not affect the correctness of the algorithms. Finally, we show that Union-Find implementations are an interesting application for Transactional Memory (TM): one of the fastest algorithm variants we discovered is a sequential one that uses coarse-grained locking with the lock elision optimization to reduce synchronization cost and increase scalability.

Motivation & Objective

  • To close the gap in understanding the practical performance of concurrent Union-Find algorithms despite their theoretical efficiency.
  • To identify the primary performance bottlenecks in existing concurrent Union-Find implementations.
  • To optimize algorithm performance by reducing cache misses through implicit priority storage and safe use of plain memory operations.
  • To explore the effectiveness of Transactional Memory in accelerating Union-Find, particularly through lock elision.

Proposed method

  • Measuring performance across Intel, AMD, and ARM platforms using diverse workloads including social networks, random graphs, road networks, and integrated algorithms.
  • Introducing implicit storage of node priorities to reduce memory traffic and cache misses without affecting correctness.
  • Using plain reads and writes in a way that preserves algorithm correctness, minimizing synchronization overhead.
  • Applying coarse-grained locking with lock elision via Transactional Memory to reduce contention and improve scalability.
  • Evaluating multiple algorithm variants under real-world workloads to isolate performance-critical factors.
  • Analyzing the impact of memory access patterns and cache behavior on overall performance.

Experimental results

Research questions

  • RQ1What are the dominant performance bottlenecks in existing concurrent Union-Find algorithms across different architectures?
  • RQ2How can implicit priority storage reduce memory traffic and improve performance in concurrent Union-Find?
  • RQ3To what extent can plain reads and writes be safely used in concurrent Union-Find to reduce synchronization cost?
  • RQ4Can Transactional Memory, particularly with lock elision, significantly improve the performance of concurrent Union-Find?
  • RQ5How do different workloads (social, random, road networks) affect the relative performance of Union-Find variants?

Key findings

  • Cache misses are the primary performance bottleneck in concurrent Union-Find due to the low computational cost of operations.
  • Implicitly storing node priorities reduces memory traffic and significantly improves performance across all platforms.
  • Using plain reads and writes in a correctness-preserving manner reduces synchronization overhead and improves scalability.
  • A sequential Union-Find variant with coarse-grained locking and lock elision via Transactional Memory achieved the fastest performance.
  • The performance gains from optimization were consistent across Intel, AMD, and ARM architectures.
  • Workload characteristics such as access patterns and graph structure significantly influence the relative performance of different algorithm variants.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.