TL;DR
This paper introduces FlexPS, a novel parameter server (PS) architecture that addresses the critical limitation of fixed parallelism in distributed machine learning. By introducing a multi-stage abstraction, FlexPS allows for dynamic adjustment of parallelism during runtime, significantly improving efficiency and resource utilization for machine learning tasks with dynamic workloads.
What Problem Does This Paper Address?
Distributed machine learning (ML) is essential for handling large datasets and complex models that exceed the capabilities of a single machine. The parameter server (PS) architecture has become a de facto standard for this, separating model storage (servers) from computation (workers). However, existing PS systems typically employ a fixed parallelism degree throughout the entire training process. This is problematic because many ML algorithms, such as Stochastic Gradient Descent (SGD) with growing batch sizes and variance-reduced SGD methods (like SVRG), exhibit dynamic workloads. A fixed parallelism degree can lead to suboptimal performance, either by wasting computational resources during low-workload phases or by creating communication bottlenecks during high-workload phases. This inefficiency translates to longer training times and wasted computational resources.
Methods
FlexPS introduces a multi-stage abstraction for ML tasks. Instead of treating an entire ML job as a single unit, it's decomposed into a series of "stages." Each stage can be configured with a specific parallelism degree tailored to its workload. This allows for dynamic adjustment of parallelism between stages.
Key innovations in FlexPS include:
- Stage Scheduler: Manages the execution of stages, considering stage specifications, resource availability, and data locality.
- Stage-Aware Consistency Controller: Adapts consistency protocols to the multi-stage execution, ensuring correct synchronization between stages.
- Direct Model Transfer (DMT): Optimizes transitions between stages by allowing direct transfer of model parameters, bypassing the global KV-store for faster stage switching.
- Automatic Parallelism Adjustment: A mechanism that dynamically searches for the optimal parallelism degree for each stage, reducing the burden on users. This is achieved by dividing stages into smaller sub-stages for exploration.
- Local Zero-Copy Communication: For single-machine modes, FlexPS optimizes communication between local workers and servers by passing pointers directly, avoiding serialization/deserialization overhead.
- Local Model Store and Consistency Controller: In single-machine scenarios, these components keep model data and consistency management local, further reducing communication.
Datasets
The paper evaluates FlexPS on two datasets:
- webspam: 350,000 samples, 16,609,143 features, sparse.
- kdd: 149,639,105 samples, 54,686,452 features, very sparse.
These datasets are standard for evaluating ML systems and are used for tasks like SVM, logistic regression, and LDA.
Key Insights and Ideas
- Dynamic workloads demand dynamic parallelism: The core insight is that fixed parallelism is a significant bottleneck for modern ML algorithms with varying computational demands. FlexPS's multi-stage approach directly tackles this.
- Multi-stage abstraction simplifies dynamic parallelism: Decomposing tasks into stages provides a natural way to map varying workloads to appropriate parallelism levels, making dynamic control manageable.
- Efficiency gains are substantial: The paper demonstrates that flexible parallelism not only speeds up training but also significantly reduces resource consumption (total worker time).
- Automatic adjustment is practical: The automatic parallelism adjustment feature shows promising results, achieving performance close to manually optimized settings with minimal user effort.
- Unified programming model: FlexPS supports both single-machine and distributed ML paradigms, simplifying the development and deployment workflow.
Key Results
- Significant Speedups: FlexPS achieved speedups of up to 2x over state-of-the-art systems like Petuum and Multiverso on tasks with dynamic workloads (e.g., SVRG, SGD with growing batch size).
- Resource Savings: FlexPS-Opt and FlexPS-Auto (with flexible parallelism) used significantly less total worker time (up to 4x less) compared to their single-stage counterparts (FlexPS-), highlighting substantial resource efficiency gains.
- Automatic Adjustment Performance: FlexPS-Auto (automatic parallelism) achieved task completion times only 11-12% longer than manually optimized FlexPS-Opt, while outperforming random parallelism choices by over 45%.
- Competitive on Static Workloads: FlexPS also performed competitively on tasks with static workloads (like LDA and Matrix Factorization), often achieving similar or better results than Petuum with less training time.
- Marginal Stage Transition Overhead: The overhead of transitioning between stages was found to be marginal, typically around 0.01-0.02 seconds, making the multi-stage approach practical.
Limitations and Future Work
- Manual Parallelism Tuning Still Beneficial: While automatic adjustment is effective, manually tuning parallelism (FlexPS-Opt) still yielded the best performance, suggesting room for further improvement in the automatic adjustment algorithm.
- Automatic Adjustment for Small Iterations: The authors note that the automatic parallelism adjustment method might not be as effective for stages with a very small number of iterations, though typical ML tasks involve many iterations.
- Future Work: The paper suggests that the design ideas in FlexPS can benefit deep learning systems, and that the unified programming model can aid ML theory researchers in experimenting with algorithms in distributed settings. Further exploration of optimizing for specific hardware architectures and more complex dynamic workload patterns could be future directions.
Summary updated