Abstract
A graph neural network (GNN) enables deep learning on structured graph data. There are two major GNN training obstacles: 1) it relies on high-end servers with many GPUs which are expensive to purchase and maintain, and 2) limited memory on GPUs cannot scale to today's billion-edge graphs. This paper presents Dorylus: a distributed system for training GNNs. Uniquely, Dorylus can take advantage of serverless computing to increase scalability at a low cost. The key insight guiding our design is computation separation. Computation separation makes it possible to construct a deep, bounded-asynchronous pipeline where graph and tensor parallel tasks can fully overlap, effectively hiding the network latency incurred by Lambdas. With the help of thousands of Lambda threads, Dorylus scales GNN training to billion-edge graphs. Currently, for large graphs, CPU servers offer the best performance-per-dollar over GPU servers. Just using Lambdas on top of CPU servers offers up to 2.75x more performance-per-dollar than training only with CPU servers. Concretely, Dorylus is 1.22x faster and 4.83x cheaper than GPU servers for massive sparse graphs. Dorylus is up to 3.8x faster and 10.7x cheaper compared to existing sampling-based systems.
Introduction
Training Graph Neural Networks (GNNs) at scale is currently a "rich person's game." High-end GPU clusters, such as AWS p3 instances, are prohibitively expensive. Furthermore, the limited onboard memory of GPUs creates a significant bottleneck for real-world graphs that frequently exceed the billion-edge mark. To circumvent these issues, many researchers resort to graph sampling, which often degrades model accuracy and adds pre-processing overhead.
Dorylus addresses these challenges by introducing a distributed system that swaps expensive GPUs for a combination of affordable CPU servers and thousands of serverless threads (AWS Lambda). By training on the entire graph rather than samples, Dorylus maintains high accuracy while achieving superior cost-efficiency.
System Design: Computation Separation
The fundamental innovation in Dorylus is Computation Separation. GNN training involves two distinct types of workloads:
- Graph-Parallel Tasks: These involve moving data along edges (Gather and Scatter operations). They are memory-intensive but computationally light.
- Tensor-Parallel Tasks: These involve the neural network mathematics (ApplyVertex and ApplyEdge operations). They are computationally heavy but independent of the graph structure.
Dorylus assigns graph-parallel tasks to CPU servers, which have the large memory capacities needed for massive adjacency matrices. Tensor-parallel tasks are offloaded to thousands of AWS Lambda threads, which provide massive parallelism for matrix multiplications.
Bounded Pipeline Asynchronous Computation (BPAC)
To overcome the high network latency inherent in serverless functions, Dorylus employs Bounded Pipeline Asynchronous Computation (BPAC). This deep pipeline allows CPU and Lambda tasks to overlap.
While Lambdas perform math for one minibatch, the CPU servers simultaneously gather data for the next. To maintain model convergence in this asynchronous environment, Dorylus utilizes weight stashing and bounded staleness, ensuring that no part of the pipeline drifts too far ahead of the others.
Evaluation and Results
Dorylus was evaluated on several datasets, including Reddit, Amazon (313.9M edges), and Friendster (3.6B edges).
- Cost-Efficiency: Dorylus is 4.83× cheaper than GPU-based training for massive sparse graphs and 10.7× cheaper than sampling-based systems.
- Performance: On large, sparse graphs, Dorylus is 1.22× faster than GPU servers by avoiding the overhead of data movement into limited GPU memory.
- Scalability: Dorylus successfully trained a GCN on the 3.6-billion-edge Friendster graph without sampling—a feat previously impossible for most organizations.
- Value: Adding Lambdas to a CPU-only baseline provides up to 2.75× more performance-per-dollar.
Conclusion
Dorylus demonstrates that serverless computing can serve as a "poor man's supercomputer" for GNN training. While GPUs still excel for small, dense graphs, Dorylus provides a highly scalable and cost-effective alternative for the massive, sparse graphs common in industry. Future work will focus on reducing communication bottlenecks during the Scatter phase and improving graph partitioning strategies.
Summary updated