Mosaic: Harnessing Micro-architectural Resources of Servers in Serverless Environments - Stojkovic, Jovan; Choukse, Esha; Saurez, Enrique; Goiri, Íñigo; Torrellas, Josep (MICRO, 2024)
With serverless computing, users develop scalable applications using lightweight functions as building blocks, while cloud providers own most of the stack, allowing for better resource optimizations. However, due to the frequent context switches within function invocations and a high degree of core oversubscription, functions frequently lose their microarchitectural state causing a performance degradation. At the same time, hardware structures in modern cores are dimensionedfor the broader computational needs of applications, rendering them oversized for many serverless functions. Based on these insights, we propose Mosaic, a hardware-software co-design composed of (1) MosaicCPU, a processor architecture that can efficiently run both serverless workloads and traditional monolithic applications, and (2) MosaicScheduler, a serverless software stack that maximizes the architecture benefits. MosaicCPU slices the oversized micro-architectural resources into smaller chunks and dedicates tiles of such chunks to functions. The processor maintains the function’s state across context switches and concurrently for multiple functions across different tiles, improving their performance. Furthermore, it operates the currently inactive tiles in low-power mode, thereby reducing energy consumption. To maximize efficiency, MosaicScheduler introduces predictive right-sizing of the per-function tiles alongside smart scheduling based on the status of the tile contexts. Mosaic improves the throughput by 225% while using 22% less power than the conventional server-class processors.