Running Alchemist on Cray XC and CS Series Supercomputers: Dask and PySpark Interfaces, Deployment Options, and Data Transfer Times

Kai Rothauge, Haripriya Ayyalasomayajula, Kristyn J. Maschhoff, Michael F. Ringenburg, Michael W. MahoneyarXiv 2019

TL;DR

This paper introduces Alchemist, a system that bridges the gap between popular data analysis frameworks like Spark, Dask, and PySpark, and high-performance computing (HPC) libraries. The authors detail how they've made Alchemist more accessible by porting it to containers and integrating it with new interfaces, while also investigating the crucial data transfer overheads when running on supercomputers.

What Problem Does This Paper Address?

Traditional high-performance computing (HPC) libraries, while incredibly powerful for large-scale computations, often have steep learning curves and require specialized programming knowledge. On the other hand, data analysis frameworks like Apache Spark offer ease of use and broad functionality but can struggle with performance for certain computationally intensive tasks, particularly distributed linear algebra operations. This performance gap arises from significant overheads in Spark's native implementations, which can be orders of magnitude greater than the actual computation time and even scale negatively with increasing data size. Alchemist aims to solve this by allowing users to leverage the productivity of frameworks like Spark while offloading demanding computations to optimized HPC libraries.

Methods

The core of Alchemist's approach is its client-server architecture. A client application (e.g., a Spark job) communicates with an Alchemist driver through a client interface. Alchemist then manages a pool of worker processes, each capable of loading and executing HPC libraries dynamically.

Key methodological contributions in this paper include:

  • New Client Interfaces: Development of Python (ACIPython), Dask (ACIDask), and PySpark (ACIPySpark) interfaces. These build upon the original Spark interface, making Alchemist accessible to a wider range of users and applications.
  • Containerization: Porting Alchemist to Docker images for easier deployment across various platforms, including Cray XC and CS supercomputers (using Shifter and Singularity respectively) and Kubernetes clusters. This simplifies setup and dependency management.
  • Reinforcement Learning Integration: Exploring the combination of Alchemist with RLlib, a popular reinforcement learning library, to leverage HPC simulations for training RL agents.
  • Data Transfer Analysis: A qualitative assessment of data transfer times between client applications and Alchemist, investigating the impact of factors like matrix layout, message buffer size, and network variability.

Datasets

Not discussed in the paper. The paper focuses on experimental setups with synthetic data (e.g., randomly generated NumPy arrays) and large matrices (e.g., 400GB IndexedRowMatrix) for evaluating performance and transfer times.

Key Insights and Ideas

  • Bridging the Productivity-Performance Chasm: Alchemist effectively democratizes access to HPC libraries, allowing data scientists to benefit from high performance without becoming HPC experts.
  • Containerization is Key for HPC Adoption: Porting Alchemist to Docker images significantly lowers the barrier to entry for using it on complex HPC systems like Cray XC and CS, abstracting away intricate setup procedures.
  • Data Transfer is the Bottleneck: The paper strongly emphasizes that data transfer between client applications and Alchemist is the primary source of overhead. Optimizing this transfer is crucial for overall performance.
  • Buffer Size Matters, Up to a Point: Larger message buffers generally lead to faster and more consistent data transfer times, but there's a point of diminishing returns (around 100MB in their experiments) beyond which further increases don't offer significant benefits and can even introduce issues.
  • Matrix Layout and Aspect Ratio Influence Transfer: The way data is organized (matrix layout) and its shape (aspect ratio) significantly impacts transfer times. For example, layouts that align with how Spark stores data (row-wise) tend to be more efficient.

Key Results

  • Successful Deployment: Alchemist was successfully deployed on Cray XC and CS supercomputers using Shifter and Singularity, respectively, as well as on a local Kubernetes cluster.
  • New Interfaces Enable Broader Use: The Python, Dask, and PySpark interfaces open up Alchemist to a wider community of data scientists and engineers.
  • Data Transfer Insights: Experiments showed that larger message buffers (up to 100MB) reduce transfer times and variability. Matrix layouts like [VC, STAR] were generally more efficient for transferring data from Spark to Alchemist, especially for wide matrices.
  • RL Integration Potential: The paper outlines a clear path for integrating HPC simulations into reinforcement learning workflows via Alchemist, promising accelerated training for complex problems.

Limitations and Future Work

  • Data Transfer Overhead: While analyzed, data transfer remains the primary overhead. Further work is needed to minimize this.
  • RL Case Study: The combination of Alchemist with RLlib is presented as a promising area, but a detailed case study is deferred to future research.
  • Dask DataFrames: Support for Dask DataFrames and other constructs is planned for future versions.
  • Comprehensive Study: The authors acknowledge that a comprehensive study of all factors influencing transfer times (including serialization/deserialization and network variability) is beyond the scope of this paper and is a direction for future work.
  • ScaLAPACK Support: Alchemist plans to add support for ScaLAPACK in a future version.

Summary updated

Abstract

Alchemist is a system that allows Apache Spark to achieve better performance by interfacing with HPC libraries for large-scale distributed computations. In this paper, we highlight some recent developments in Alchemist that are of interest to Cray users and the scientific community in general. We discuss our experience porting Alchemist to container images and deploying it on Cray XC (using Shifter) and CS (using Singularity) series supercomputers and on a local Kubernetes cluster. Newly developed interfaces for Python, Dask, and PySpark enable the use of Alchemist with additional data analysis frameworks. We also briefly discuss the combination of Alchemist with RLlib, an increasingly popular library for reinforcement learning, and consider the benefits of leveraging HPC simulations in reinforcement learning. Finally, since data transfer between the client applications and Alchemist are the main overhead Alchemist encounters, we give a qualitative assessment of these transfer times with respect to different~factors.
BibTeX
@misc{rothauge2019running,
  author = {Kai Rothauge and Haripriya Ayyalasomayajula and Kristyn J. Maschhoff and Michael F. Ringenburg and Michael W. Mahoney},
  title = {{Running Alchemist on Cray XC and CS Series Supercomputers: Dask and PySpark Interfaces, Deployment Options, and Data Transfer Times}},
  year = {2019},
  eprint = {1910.01354},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.01354},
}
Figure