NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Harnessing the Power of Serverless Runtimes for Large-Scale Optimization

Arda Aytekin, Mikael JohanssonarXiv 2019

Abstract: The event-driven and elastic nature of serverless runtimes makes them a very efficient and cost-effective alternative for scaling up computations. So far, they have mostly been used for stateless, data parallel and ephemeral computations. In this work, we propose using serverless runtimes to solve generic, large-scale optimization problems. Specifically, we build a master-worker setup using AWS Lambda as the source of our workers, implement a parallel optimization algorithm to solve a regularized logistic regression problem, and show that relative speedups up to 256 workers and efficiencies above 70% up to 64 workers can be expected. We also identify possible algorithmic and system-level bottlenecks, propose improvements, and discuss the limitations and challenges in realizing these improvements.

Introduction

Large-scale optimization serves as the foundational engine for training deep neural networks and solving complex logistics problems. Traditionally, these tasks have required High-Performance Computing (HPC) environments or clusters of Virtual Machines (VMs). However, both approaches present significant friction: HPC environments often involve inflexible administrative overhead, while VMs are "coarse-grained" resources where users frequently pay for idle time or excess capacity.

Serverless computing, specifically Function-as-a-Service (FaaS), offers a compelling "pay-as-you-go" alternative with near-instant elasticity. The primary challenge lies in the fact that serverless functions are inherently stateless and ephemeral, typically designed for short-lived tasks rather than long-running, iterative mathematical algorithms. This research investigates whether these limitations can be overcome to perform heavy-duty scientific computing effectively.

System Architecture

To leverage serverless elasticity, the researchers developed a distributed system based on a master-worker architecture organized in a star network topology.

Overview of the serverless master-worker architecture and AWS Lambda spawning mechanism.

The Algorithm

The system implements the Alternating Direction Method of Multipliers (ADMM) using a "global variable consensus" formulation. This mathematical framework allows a massive optimization problem to be decomposed into smaller subproblems. Each subproblem is solved locally by a worker, while a central master node aggregates these local results to iterate toward a global solution.

Infrastructure and Tech Stack

  • AWS Lambda: Serves as the worker pool. Since Lambda functions do not allow inbound network connections, a central Scheduler triggers them via API calls.
  • Communication: High-speed messaging is handled by ZMQ, while data objects are converted into bits for transmission using the cereal serialization library.
  • Local Solver: Individual workers utilize FISTA (Fast Iterative Shrinkage-Thresholding Algorithm) to solve their assigned local subproblems.

Experimental Evaluation

The system was evaluated by solving a regularized logistic regression problem, a standard benchmark in machine learning classification. The dataset consisted of 600,000 samples with 10,000 features, featuring a sparsity of 0.001. The problem scale was intentionally set to exceed the capabilities of a single Lambda function within its 15-minute execution limit, necessitating a distributed approach.

Performance and Bottlenecks

The study revealed that the overhead associated with managing state and "cold starts" (initialization delays) is manageable. Cold starts typically ranged between 2 and 4 seconds, a cost that becomes negligible as total computation time increases. The system demonstrated remarkable consistency, with AWS Lambda performance remaining stable across hundreds of concurrent instances without significant "straggler" effects.

Timing diagram illustrating the communication and computation cycles between the master and worker nodes.

However, the researchers identified an "efficiency wall." While the system maintained over 70% efficiency up to 64 workers, efficiency dropped to 26% when scaling to 256 workers. As shown in the timing analysis above, as subproblems become smaller, the time spent on network communication (Tx/Rx) and master-node processing (Reduce/Update) begins to dominate the total runtime, leading to increased worker idle time ($t_{idle}$).

Key Results

  • Scaling: Achieved a relative speedup of 17x when scaling from 4 to 256 workers.
  • Convergence: The ADMM algorithm successfully converged in approximately 23 iterations for the test problem.
  • Predictability: Implementing uniform loads (fixed local iterations) helped reduce variance in idle time, enhancing system predictability.

Conclusion and Future Directions

This work proves that serverless runtimes are a viable platform for iterative optimization. The primary bottleneck is the star network topology, where the central scheduler becomes a communication choke point.

Future research will explore asynchronous ADMM, which allows the master to proceed without waiting for the slowest worker, and the use of high-bandwidth distributed object stores (like Redis or S3) to replace the central master's shared memory. Overcoming the lack of peer-to-peer communication in serverless environments remains a critical challenge for matching the performance of traditional MPI-based HPC clusters.

Summary updated

BibTeX
@misc{aytekin2019harnessing,
  author = {Arda Aytekin and Mikael Johansson},
  title = {{Harnessing the Power of Serverless Runtimes for Large-Scale Optimization}},
  year = {2019},
  eprint = {1901.03161},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1901.03161},
}
Figure