Design and Operation of Shared Machine Learning Clusters on Campus

Kaiqiang Xu, Decang Sun, Hao Wang, Zhenghang Ren, Xinchen Wan, Xudong Liao, Zilong Wang, Junxue Zhang, Kai Chen

TL;DR

Universities are struggling to manage shared GPU clusters for machine learning research, leading to underutilization and accessibility issues. This paper introduces SING, a full-stack system designed for simplicity and efficiency, which streamlines ML job management and significantly improves resource utilization and user experience.

What Problem Does This Paper Address?

The explosion of large machine learning (ML) models has led universities to invest heavily in GPU clusters. However, effectively sharing these expensive resources among many researchers presents a significant challenge. Existing solutions, like direct SSH access or complex container orchestration platforms (e.g., Kubernetes), often fall short. Direct access leads to instability and poor resource management, while Kubernetes is overly complex for academic environments and lacks native ML-specific features. Traditional HPC schedulers like Slurm are better but still struggle with the unique demands of ML workflows, particularly dependency management and user isolation. This gap results in underutilized hardware, frustrated researchers, and a barrier to democratizing access to ML resources.

Methods

SING tackles these challenges with a four-layer architectural abstraction:

  • Job Profile Layer: Users define their ML jobs using a simple, self-contained profile syntax. This layer supports both script-based and container-based job submissions, offering flexibility and minimizing migration effort.
  • Adapter Layer: This layer acts as the user-friendly interface, translating job profiles into a format the scheduler understands. It provides features like remote job monitoring and interactive debugging, abstracting away cluster complexity.
  • Scheduler Layer: SING employs an optimized First-Come, First-Served (FCFS) scheduling strategy with a backfill mechanism. This approach aims for fairness while improving cluster utilization by allowing smaller jobs to run when larger ones are waiting. It also incorporates strategies like "Tidy Granularity" (predefined GPU counts per node) and reserved resources for small jobs to combat fragmentation.
  • Executor Layer: This layer handles the actual execution of ML jobs. SING uses Slurm as its default backend but is designed to be extensible, supporting other backends like Kubernetes. Key features include distributed job bootstrapping, environment caching, and heterogeneous executor support.

Datasets

The paper uses a real-world dataset of job traces collected from their SING deployment over 2.5 years (July 2021 to December 2023). This dataset includes job submission history, resource requests, node status, and specifications. The authors also mention releasing this job trace data to facilitate further research.

Key Insights and Ideas

  • Simplicity is Key for Academia: The paper strongly advocates for a "less is more" approach in academic ML cluster management. Overly complex solutions like Kubernetes, while powerful, introduce significant overhead for both operators and users in research settings.
  • FCFS with Smart Backfill Works: A well-tuned FCFS scheduler with intelligent backfilling and resource reservation for small jobs can achieve high GPU utilization and fair access, outperforming basic FCFS and even SJF in certain metrics.
  • Job Profile Unification: Supporting both script and container formats within a single job profile simplifies the user experience and reduces the burden of adapting jobs to different environments.
  • Operational Efficiency Matters: The design prioritizes reducing maintenance costs and operational complexity for university IT teams, which are often understaffed.
  • User Behavior Drives Design: Insights into user submission patterns (e.g., late-night work habits, preference for smaller jobs for debugging) directly informed design choices like interactive features and resource allocation strategies.

Key Results

  • High GPU Assignment Rate: SING maintained a GPU assignment rate of over 96% during a busy week, indicating efficient resource utilization.
  • Reduced Queueing Times: SING's average queueing time was 0.81 hours, significantly better than FCFS (1.32 hours) and comparable to SJF (0.64 hours), while avoiding SJF's potential for longer job starvation.
  • Operational Efficiency: The system has managed over 160 GPUs for more than 480 active users, supporting over 28,000 ML jobs, contributing to approximately 40 peer-reviewed papers.
  • Reduced Service Requests: The cluster saw an average of only one service request for every 940 jobs submitted, highlighting the system's stability and user-friendliness.
  • Estimated Effort: Building SING from scratch for a new cluster is estimated at 17 person-days, while adopting the open-source version requires about 8 person-days.

Limitations and Future Work

  • Resource Isolation: While SING relies on Slurm's cgroups for resource isolation, the paper acknowledges that further research is needed to fully guarantee security and performance separation, especially for containerized jobs.
  • Connection Security: The current SSH-based connection between SING-cli and SING-service, while flexible, has potential security risks. The authors suggest exploring secure API-based authentication as a more robust alternative.
  • Cluster Failure Recovery: SING does not automatically recover from cluster failures (e.g., node failures). Manual intervention is required, leading to job progress loss.
  • Extensibility: The paper mentions the potential for extending SING with Kubernetes as an executor backend and exploring more advanced scheduling policies. Future work could also focus on more automated scaling operations based on cluster occupancy and cloud budgets.

Summary updated

BibTeX
@inproceedings{xu2021design,
  author = {Kaiqiang Xu and Decang Sun and Hao Wang and Zhenghang Ren and Xinchen Wan and Xudong Liao and Zilong Wang and Junxue Zhang and Kai Chen},
  title = {{Design and Operation of Shared Machine Learning Clusters on Campus}},
  booktitle = {Asplos},
  year = {2021},
}
Figure