Tupleware: "Big" Data, Big Analytics, Small Clusters

Andrew Crotty, Alex Galakatos, Kayhan Dursun, Tim Kraska, Ugur Çetintemel, Stanley B. ZdonikCIDR 2015

Abstract

Tupleware is a high-performance distributed analytics system designed for the "typical" data scientist who works with terabyte-scale datasets on small clusters rather than petabytes on thousands of nodes. By leveraging the LLVM compiler framework to introspect user-defined functions (UDFs) and generate optimized machine code, Tupleware achieves performance gains of up to three orders of magnitude over industry standards like Hadoop and Spark.

Introduction

The "Big Data" ecosystem was pioneered by hyperscale companies to process petabytes of data across thousands of unreliable machines. In these environments, disk I/O and network transfers are the primary bottlenecks. However, most organizations analyze datasets smaller than 100GB on clusters of only a few dozen nodes. On these smaller, more powerful clusters, RAM is abundant and networking (e.g., InfiniBand) is nearly as fast as a memory bus. Consequently, the bottleneck has shifted from data movement to computation (the CPU). Existing frameworks like Hadoop and Spark, which treat user-defined functions (UDFs) as "black boxes," are ill-equipped for this shift.

System Architecture

Tupleware bridges the gap between the database and compiler communities through a three-stage architecture:

  1. Frontend: Provides a language-agnostic API (supporting C++, Python, Julia, R, etc.) based on LLVM. It uses a functional algebra centered around a "TupleSet"—a data structure pairing a relation with a "Context" for shared state.
  2. Program Synthesis: The core innovation. Instead of interpreting a plan, the UDF Analyzer examines the LLVM Intermediate Representation (IR) of user code to gather statistics like vectorizability. The Optimizer then synthesizes a self-contained, highly optimized distributed program.
  3. Execution: Employs a multi-tiered model where a Global Manager handles coarse partitioning, and Local Managers on each node manage memory pools and pinned Executor Threads to avoid cache pollution.
The three-stage Tupleware architecture: Frontend, Program Synthesis, and Execution.

Performance Evaluation

The authors evaluated Tupleware using synthetic datasets (1GB, 10GB, and 100GB) across five common machine learning and graph tasks: K-means, Linear Regression, Logistic Regression, PageRank, and Naive Bayes. Tests were conducted on a 10-node Amazon EC2 cluster.

Performance comparison of Tupleware against Hadoop and Spark across various machine learning tasks and data sizes.

In these benchmarks, Tupleware demonstrated massive performance leads:

  • Vs. Hadoop: Tupleware was up to 1,000x faster, largely due to Hadoop's I/O overhead and lack of in-memory caching.
  • Vs. Spark: Tupleware was up to 100x faster. While Spark utilizes memory, Tupleware’s compiled execution model avoids JVM overhead and optimizes UDFs directly.

Key Insights

  • UDF Introspection: Using LLVM to see inside UDFs allows for low-level compiler optimizations like SIMD vectorization and function inlining.
  • CPU-Centric Design: In modern small clusters, efficiency is found by minimizing execution engine overhead (e.g., eliminating Volcano-style iterators).
  • Hardware-Aware Synthesis: Tupleware generates code tailored to specific hardware (SSE/AVX instructions) and data selectivity.

Conclusion and Future Work

Tupleware redefines big data analytics for the common use case of small clusters. While current sub-second response times make simple job restarts a viable fault-tolerance strategy, future work includes "k-safe" checkpointing, automatic compression for memory-bound workflows, and deeper integration with high-performance networks via RDMA.

Summary updated

BibTeX
@inproceedings{crotty2015tupleware,
  author = {Andrew Crotty and Alex Galakatos and Kayhan Dursun and Tim Kraska and Ugur Çetintemel and Stanley B. Zdonik},
  title = {{Tupleware: "Big" Data, Big Analytics, Small Clusters}},
  booktitle = {CIDR},
  year = {2015},
}
Figure