Profiling-Based Adaptive GC Policy for Serverless
Profiling-Based Adaptive GC Policy for Serverless
06 December 2024
Serverless computing is an innovative computing model for deploying cloud-based applications. It is driven by the recent transition of enterprise application structures towards containers and microservices. In serverless, requests are typically independent, similar, single-threaded, and involve short-lived objects. Existing garbage collectors (GCs) often lack comprehensive application context, resulting in excess collections that occur during request processing and polluting the heap. This negatively impacts the entire system's efficiency, i.e., the ratio of operational throughput and memory footprint. In this work, we monitored and analyzed memory usage and request patterns in serverless applications to optimize efficiency. We implemented a GC policy that determines the optimal time for garbage collection based on the current workload. It also trades off operational throughput for vast memory savings. Our prototype is implemented within GraalVM Serial GC and evaluated using standard serverless benchmarks. Results show a significant improvement in efficiency, due to memory footprint savings. Furthermore, our prototype significantly reduces system latency by avoiding collections during requests.
Venue : The fourteenth Symposium "Mathematics and Applications" 2024 https://simpozijum.matf.bg.ac.rs/home.html
File Name : MATFSymp24_GCHints-1.pdf