Challenges and opportunities in sustainable serverless computing
Status:: π©
Links:: Serverless#Energy-efficiency
Metadata
Authors:: Sharma, Prateek
Title:: Challenges and opportunities in sustainable serverless computing
Publication Title:: "ACM SIGEnergy Energy Informatics Review"
Date:: 2023
URL:: https://dl.acm.org/doi/10.1145/3630614.3630624
DOI:: 10.1145/3630614.3630624
Sharma, P. (2023). Challenges and opportunities in sustainable serverless computing. ACM SIGEnergy Energy Informatics Review, 3(3), 53β58. https://doi.org/10.1145/3630614.3630624
Serverless computing has rapidly emerged as a popular deployment model. However, its energy and carbon implications are unclear and require exploration. This paper takes a look at the fundamental distinguishing attributes of serverless functions, and shows how some of them make energy-efficiency challenging. The programming model and deployment requirements of serverless functions makes them terribly energy inefficient---consuming more than 15Γ energy compared to conventional web services. On the bright side, FaaS is still actively expanding, and there is also an opportunity for rethinking FaaS resource management and deployment models, and make carbon efficiency a primary consideration. We present a few such techniques: moving functions to energy-friendly locations in distributed edge clouds; machine learning based modeling and control; and function-level demand response that combines ideas from approximate computing. Together, these represent a possible path forward to making serverless cloud computing sustainable.
Notes & Annotations
Color-coded highlighting system used for annotations
π Note (last modified: 2024-03-08#11:25:49) (
Presentation
π Annotations (imported on 2024-03-08#11:42:21)
Our preliminary empirical investigation suggests that FaaS applications can be up to 15Γ more energy hungry than conventional web services. This energy and carbon (in)efficiency is unfortunately a fundamental attribute of serverless functions owing to their programming model and security isolation requirements. As FaaS usage continues its exponential growth, understanding and narrowing this energy gap will be vital for the carbon footprint of the overall computing ecosystem.
Serverless functions can provide some unique opportunities to reduce cloud carbon footprint, because of their location independence and programming model. Many energy-first techniques such as workload migration and demandresponse scaling, which are challenging for conventional VMs and containers, can be significantly easier to develop and optimize for serverless functions that can be βrun anywhereβ. FaaS can thus provide new energy knobs to cloud platforms for moving applications to carbon-friendly locations quickly and in a fine-grained manner, which will be especially beneficial for distributed edge clouds powered by intermittent renewable energy like solar and wind.
The control plane itself is highly distributed with many components such as API gateways, distributed message queues (such as Kafka), and databases. Thus the resource and energy footprint of functions is spread out across function initialization and virtualization components, and the control plane itself.
Measuring the energy consumption of applications is non-trivial because of multi-processing, limited hardware support, and fairly attributing the consumption of shared resources (such as the OS) [12, 20]. Software power monitors [13, 14, 41] use application and system level power models that relates resource consumption (such as CPU time and frequency) to actual physical power [11].
FaaS virtualization overheads can increase the energy consumption by more than 15x compared to conventional HTTP servers.
The conventional web server (pythonβs builtin httpserver), which does not incur any virtualization over- heads, requires around 0.6 Joules to serve a simple static βGET /β request. The FaaS approach requires using a Docker container, and the overhead of creating the container increases the energy footprint by 15Γ. Specifically, we measure the average energy consumption of a docker run command which spawns a container, and prints the contents of the home directory (equivalent to the above HTTP serverβs output), and destroys the container. Finally, we investigate full hardware virtualization, by spawning a Firecracker lightweight VM [4], and find its energy consumption to be more than 30Γ that of the simple HTTP server.
Keeping function execution environments in memory is likely to reduce the energy footprint just like it does the performance [15, 29], but the extra memory (and hence energy) consumption may offset those benefits.
By decoupling computation from its location, serverless computing allows us to run functions at the most energy-suitable location. Thus even though individual functions may not be energy efficient, they can be run in carbon-friendly locations to achieve better carbon efficiency.