CZone: memory-efficient serverless container management with MCPV model
摘要
Serverless computing usually employs secure containers, which are encapsulated within lightweight microVMs, to isolate function invocations across different tenants. For high security guarantees, such Single-Container-Per-VM (SCPV) model results in large memory waste, as each microVM includes a guestOS, even though they are identical. For memory efficiency of the secure container architecture, we advocate for the dynamic Multi-Containers-Per-VM (MCPV) model. Adopting the MCPV model, a microVM can accommodate multiple containers for the same functions, and the microVM’s memory space adjusts dynamically based on workload.
However, implementing this model necessitates efficient memory hot-plug and hot-unplug techniques. Existing methods either significantly impair function performance within containers or fail to adequately unplug all required pages. To address this challenge, we propose CZone, a dedicated memory hot-plug and hot-unplug design specifically tailored to support the dynamic MCPV model. CZone ensures that the used memory pages of a container are located in contiguous physical memory regions, with each region exclusively allocated to a single container. Experimental results demonstrate that MCPV with CZone brings an 81.81% reduction in startup latency and an 89.87% reduction in memory footprint when compared to the existing SCPV model that utilizes microVM templating, with negligible system performance impact.