Optimizing the MapReduce Framework on Intel Xeon Phi Coprocessor

Mian Lu, Lei Zhang, Huynh Phung Huynh, Zhongliang Ong, Yun Liang, Bingsheng He, Rick Siow Mong Goh, Richard Huynh

Abstract

The Intel Xeon Phi coprocessor offers massive parallelism through its many-core architecture and wide vector processing units. However, traditional MapReduce frameworks are not designed to exploit these features, often suffering from poor vectorization and memory bottlenecks. This paper presents MRPhi, the first MapReduce framework optimized specifically for the Xeon Phi. By implementing vectorization-friendly map phases, SIMD-accelerated hashing, and memory-efficient atomic operations, MRPhi achieves speedups of up to 38X over existing multi-core implementations.

Introduction

The Intel Xeon Phi, based on the Many Integrated Core (MIC) architecture, features up to 60 cores and 512-bit wide vector processing units (VPUs). While powerful, standard MapReduce frameworks like Phoenix++ encounter significant "performance killers" on this architecture:

  1. Poor VPU Usage: Data dependencies in standard map-combine operations prevent effective auto-vectorization.
  2. Memory Latency: Small L2 caches (512 KB per core) lead to high miss rates during random memory access.
  3. Memory Constraints: The limited 8 GB onboard RAM is easily exhausted by traditional strategies that rely on per-thread local data copies.

The MRPhi Framework

To address these challenges, the researchers developed MRPhi. The framework introduces several specialized components designed to maximize hardware utilization on the Xeon Phi.

Overview of the MRPhi framework architecture and its specialized components.

Key Optimizations

Vectorization-Friendly Map Phase

In standard MapReduce, a "combiner" is applied immediately after each map operation. This creates write conflicts that block SIMD execution. MRPhi solves this with a two-step buffering technique: intermediate pairs are first written to a buffer without dependencies, and then processed in batches. This allows the Intel compiler to successfully auto-vectorize the map operations, unlocking the power of the 512-bit VPUs.

The two-step buffering technique used in MRPhi to enable vectorization by avoiding immediate write conflicts.

SIMD Hash Computation and MIMD Pipelining

Hashing is a critical bottleneck in MapReduce. MRPhi utilizes manual SIMD algorithms (SIMDH-Padding and SIMDH-Stream) to process multiple characters in parallel. Furthermore, MRPhi leverages the four hardware threads per core to pipeline the computation-heavy Map phase with the memory-heavy Reduce phase, ensuring that both the VPUs and memory controllers remain highly utilized.

Memory Efficiency via Atomics

To overcome the 8 GB RAM limitation, MRPhi departs from the standard practice of using per-thread local arrays. Instead, it uses a single global array updated via hardware-supported atomic operations. While atomics are often avoided on standard CPUs due to contention, the Xeon Phi’s efficient ring interconnect and coherent L2 cache make this approach significantly more scalable and memory-efficient.

Evaluation and Results

MRPhi was evaluated against Phoenix++ using six real-world benchmarks, including financial simulations (Monte Carlo) and text processing (Word Count).

  • Overall Performance: MRPhi outperformed Phoenix++ by 1.2X to 38X. The most dramatic gains were seen in applications like Histogram and Bloom Filter, where memory management was the primary bottleneck.
  • Vectorization Impact: The buffering technique alone provided a 2.5X to 4.2X speedup for compute-intensive applications like Monte Carlo.
  • Architecture Comparison: While the Xeon Phi excelled at compute-heavy tasks (e.g., Monte Carlo was ~11X faster than a traditional Xeon CPU), traditional CPUs still maintained an edge in tasks with heavy random memory access due to their larger caches and lower memory latency.

Conclusion

MRPhi demonstrates that significant performance gains are possible on many-core architectures by tailoring software frameworks to specific hardware features like wide SIMD units and high-speed interconnects. Future work will explore dynamic workload sharing between the host CPU and the Phi coprocessor to further optimize heterogeneous computing environments.

Summary updated

BibTeX
@inproceedings{lu2013optimizing,
  author = {Mian Lu and Lei Zhang and Huynh Phung Huynh and Zhongliang Ong and Yun Liang and Bingsheng He and Rick Siow Mong Goh and Richard Huynh},
  title = {{Optimizing the MapReduce Framework on Intel Xeon Phi Coprocessor}},
  booktitle = {IEEE BigData},
  year = {2013},
  doi = {10.1109/bigdata.2013.6691563},
}
Figure