TL;DR
This paper introduces rFaaS, a novel serverless platform that leverages RDMA (Remote Direct Memory Access) and a new "lease" mechanism to achieve microsecond-level invocation latencies. By bypassing traditional network stacks and optimizing resource allocation, rFaaS makes serverless computing a viable option for high-performance and latency-sensitive applications, bridging the gap between HPC clusters and cloud elasticity.
What Problem Does This Paper Address?
The paper tackles a critical disconnect in modern computing: the need for both the elasticity of cloud serverless platforms (like Function-as-a-Service, FaaS) and the high performance required by traditional High-Performance Computing (HPC) workloads. Current FaaS platforms, while elastic and cost-effective for many tasks, suffer from significant latency (milliseconds) due to their complex invocation paths, centralized scheduling, and reliance on standard network protocols (HTTP/TCP). This makes them unsuitable for HPC applications that demand microsecond-level responsiveness. Conversely, HPC clusters, while offering raw performance, lack the dynamic resource allocation and pay-as-you-go models that make cloud services attractive. This leads to either overprovisioning in the cloud or underutilization in HPC environments, both of which are economically inefficient.
Methods
rFaaS introduces several key innovations to bridge this gap:
- RDMA Acceleration: The core of rFaaS is its use of RDMA, a technology that allows direct memory access between network nodes, bypassing the CPU and operating system. This drastically reduces communication latency.
- Lease-Based Resource Management: Instead of traditional centralized scheduling, rFaaS uses an "allocation lease" system. Clients acquire leases for "spot executors" (idle resources), which are then managed by decentralized resource managers. This significantly reduces the overhead for warm and hot invocations, as the control plane is only involved during initial allocation.
- Optimized Invocation Path: rFaaS removes the multi-step invocation path common in other FaaS platforms. It enables direct RDMA connections between clients and function executors, eliminating bottlenecks like API gateways and message buses for warm and hot invocations.
- Hot/Warm/Cold Invocation Types:
- Cold: Involves full sandbox initialization, similar to other FaaS, but optimized.
- Warm: Executors are kept in a low-power state, ready to receive invocations with minimal overhead.
- Hot: Executors actively poll for requests, achieving the lowest latency (sub-microsecond overhead) by keeping the CPU core busy. This is ideal for iterative, latency-sensitive tasks.
- C++ Programming Model: A user-friendly C++ interface is provided to abstract RDMA complexity and facilitate integration into existing HPC applications.
Datasets
The paper does not explicitly mention specific datasets for training. However, it uses real-world benchmarks and applications for evaluation:
- Microbenchmarks: No-op "echo" functions and RDMA/TCP/IP latency benchmarks are used to measure raw invocation latency and network performance.
- Serverless Benchmarks: Functions from the SeBS benchmark suite are used, specifically:
- Image Processing (Thumbnail Generation): Evaluated with small and large image inputs.
- Image Recognition (ResNet-50 Prediction): Evaluated with PyTorch and OpenCV.
- HPC Applications:
- Black-Scholes Solver: A parallel application from the PARSEC suite, used to test offloading of massively parallel computations with significant data movement.
- Jacobi Linear Solver: A bulk synchronous parallel problem used to demonstrate serverless acceleration for millisecond-scale computations.
- Matrix-Matrix Multiplication: Used to evaluate the performance gains of integrating rFaaS with MPI applications.
Key Insights and Ideas
- RDMA is the Key to Microsecond Serverless: The paper strongly demonstrates that leveraging RDMA is not just beneficial but essential for achieving the microsecond-level latencies required for HPC-grade serverless computing.
- Decentralization Reduces Latency: Moving away from centralized schedulers and invocation paths, and adopting a lease-based system, significantly cuts down overhead for frequent, low-latency operations.
- "Hot" Polling is a Trade-off: The "hot" invocation mode offers incredible speed but comes at the cost of keeping CPU cores occupied. This highlights a design choice between raw performance and resource utilization, which users can manage.
- Serverless Can Augment HPC: rFaaS shows that serverless functions can effectively augment existing HPC applications (like MPI) by offloading specific computational tasks, leading to speedups without requiring a complete rewrite.
- Bridging the HPC-Cloud Divide: The work presents a concrete path towards unifying the elastic, cost-effective nature of cloud serverless with the demanding performance requirements of HPC.
Key Results
- Invocation Latency:
- Hot Invocations: Achieved an average overhead of ~300 nanoseconds on top of baseline RDMA transmission.
- Warm Invocations: Had an overhead of ~4.67 microseconds.
- Performance Comparison:
- vs. AWS Lambda: rFaaS invocations were 695x to 3,692x faster.
- vs. Nightcore: rFaaS was 23x to 39x faster.
- vs. OpenWhisk: rFaaS provided a speedup of 5,904x to 22,406x.
- Bandwidth: rFaaS achieved near-maximal link bandwidth (11.686.4 MiB/s) for large payloads.
- Parallel Scalability: rFaaS scales efficiently with the number of workers, with performance primarily limited by network capacity.
- HPC Application Speedups:
- Matrix-Matrix Multiplication: Achieved speedups of 1.88x to 1.94x when offloading half the computation to rFaaS alongside MPI.
- Jacobi Linear Solver: Showed speedups of 1.7x to 2.2x.
- Cold Start Overhead: While significant (around 2.7 seconds for Docker), it's comparable to other FaaS platforms and compatible with techniques like container warming.
Limitations and Future Work
- Cold Start Latency: While comparable to other FaaS, cold start times are still in the realm of milliseconds to seconds, which might be a bottleneck for extremely latency-sensitive applications that cannot tolerate any startup delay. The authors note that techniques like container warming can mitigate this.
- Resource Management Complexity: While leases decentralize management, the overall system still requires careful configuration and monitoring, especially in multi-tenant environments.
- RDMA Network Dependency: The core performance relies on RDMA-capable hardware, which might not be universally available in all cloud or edge environments.
- Future Work: The authors suggest exploring further integration with other emerging FaaS solutions, such as those leveraging SmartNICs or advanced containerization techniques. They also aim to support a wider range of programming languages and environments. The modular design of rFaaS is intended to facilitate these extensions.
Summary updated