Resource-Centric Serverless Computing

Junda Chen, Zhiyuan Guo, Zachary Blanco, Mohammad Shahrad, Zerui Wei, Bili Dong, Jinmou Li, Ishaan Pota, Harry Xu, Yiying ZhangarXiv 2022 · DOI

Introduction

Serverless computing, primarily delivered as Function-as-a-Service (FaaS), has become a staple of cloud-native development due to its promise of seamless scaling and cost-efficiency. However, the traditional "function-centric" model—where the unit of execution is a rigid, pre-configured code block—is increasingly ill-suited for "bulky" applications like video transcoding, large-scale data analytics, and machine learning.

These applications face two major hurdles in current serverless environments. First, fixed resource sizing forces developers to over-provision CPU and memory to accommodate peak demands or varying input sizes (e.g., a high-resolution video vs. a low-resolution one), leading to substantial resource waste. Second, the serialization tax incurred when decomposing complex apps into Directed Acyclic Graphs (DAGs) of functions creates massive performance overhead as data is constantly moved and transformed between isolated containers.

BulkX addresses these challenges by shifting the paradigm from function-centric to resource-centric computing, allowing monolithic programs to dynamically adapt their resource footprint.

The BulkX Architecture

BulkX is designed to provide the benefits of serverless scaling without the rigidity of traditional FaaS. Its architecture spans from offline compilation to a highly responsive runtime.

The BulkX architecture overview, showing the offline compiler and the runtime components including the rack scheduler and server-level executors.

The system is built on four pillars:

  • Resource Graph: Instead of manual DAGs, BulkX uses a resource graph as an intermediate representation. Developers annotate monolithic code with @compute and @data tags, allowing the compiler to identify independent tasks and memory objects.
  • Adaptive Execution: BulkX prioritizes locality. If a server has capacity, it "materializes" multiple components into a single environment for native-speed memory access. When resources are constrained, it transparently offloads memory to other servers via RDMA or TCP.
  • Two-Level Scheduler: A global scheduler balances cluster-wide load, while a rack-level scheduler makes sub-millisecond placement decisions to optimize for data locality and minimize latency.
  • History-Guided Proactivity: By profiling previous runs, BulkX predicts the resource requirements of new tasks. This enables the system to pre-warm containers and establish network connections before they are needed, effectively hiding cold-start latencies.

Dynamic Resource Adaptation

The core strength of BulkX lies in its ability to "right-size" applications mid-execution. Traditional serverless functions are often "stranded" with unused resources or crash when they exceed their limits.

BulkX adapts to different inputs and auto-scales based on internal resource needs and cluster availability.

As shown in the adaptation logic, BulkX treats CPU and memory as independent, scaleable units. This is critical because the same query can require up to 12x more memory depending on the input data. BulkX manages this variance by scaling components internally or across the cluster, ensuring high utilization while maintaining performance.

Evaluation and Key Results

The researchers evaluated BulkX using a variety of workloads, including TPC-DS analytics, video transcoding pipelines, and machine learning training.

  • Efficiency: BulkX reduced memory consumption by 72.5% to 84.8% compared to PyWren on TPC-DS queries.
  • Performance: In video transcoding, BulkX outperformed the gg framework by 33% to 47% in total execution time.
  • Utilization: The system achieved an average CPU utilization of 91.2%, a significant improvement over the ~63% seen in traditional function-centric models.
  • Scalability: The global scheduler demonstrated the ability to handle 50,000 invocations per second, 2.5x faster than the OpenWhisk cluster scheduler.

Conclusion

BulkX represents a significant shift in serverless design, moving away from the limitations of fixed-size functions toward a flexible, resource-centric model. By automating resource management and optimizing for locality, BulkX enables "bulky" applications to run with the efficiency and performance previously reserved for specialized monolithic deployments. Future work will expand language support and explore hardware-level coherence to further reduce the overhead of distributed execution.

Summary updated

BibTeX
@misc{chen2022resource,
  author = {Junda Chen and Zhiyuan Guo and Zachary Blanco and Mohammad Shahrad and Zerui Wei and Bili Dong and Jinmou Li and Ishaan Pota and Harry Xu and Yiying Zhang},
  title = {{Resource-Centric Serverless Computing}},
  year = {2022},
  eprint = {2206.13444},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.13444},
}
Figure