Skip to main content
QUICK REVIEW

[Paper Review] FaaSLight: General Application-Level Cold-Start Latency Optimization for Function-as-a-Service in Serverless Computing

Xuanzhe Liu, Jinfeng Wen|arXiv (Cornell University)|Jul 17, 2022
Cloud Computing and Resource ManagementComputer Science13 citations
TL;DR

FaaSLight proposes an application-level optimization to reduce Function-as-a-Service (FaaS) cold-start latency by identifying and separating non-essential (optional) code from essential application code using function-level call graphs. By loading optional code on demand, it reduces code loading latency by up to 78.95% (28.78% average), cutting total response latency by up to 42.05% (19.21% average), with a 21.25× improvement over state-of-the-art techniques, all without modifying underlying platforms or requiring developer effort.

ABSTRACT

Serverless computing is a popular cloud computing paradigm that frees developers from server management. Function-as-a-Service (FaaS) is the most popular implementation of serverless computing, representing applications as event-driven and stateless functions. However, existing studies report that functions of FaaS applications severely suffer from cold-start latency. In this paper, we propose an approach namely FaaSLight to accelerating the cold start for FaaS applications through application-level optimization. We first conduct a measurement study to investigate the possible root cause of the cold start problem of FaaS. The result shows that application code loading latency is a significant overhead. Therefore, loading only indispensable code from FaaS applications can be an adequate solution. Based on this insight, we identify code related to application functionalities by constructing the function-level call graph, and separate other code (i.e., optional code) from FaaS applications. The separated optional code can be loaded on demand to avoid the inaccurate identification of indispensable code causing application failure. In particular, a key principle guiding the design of FaaSLight is inherently general, i.e., platform- and language-agnostic. The evaluation results on real-world FaaS applications show that FaaSLight can significantly reduce the code loading latency (up to 78.95%, 28.78% on average), thereby reducing the cold-start latency. As a result, the total response latency of functions can be decreased by up to 42.05% (19.21% on average). Compared with the state-of-the-art, FaaSLight achieves a 21.25X improvement in reducing the average total response latency.

Motivation & Objective

  • To address the significant performance bottleneck of cold-start latency in FaaS applications, which can account for up to 80% of total response time.
  • To identify and isolate non-essential (optional) code from essential application code to reduce initialization overhead.
  • To design a platform- and language-agnostic solution that requires no changes to underlying OSes or hypervisors.
  • To enable on-demand loading of optional code to avoid incorrect identification of indispensable code, thus preventing application failure.
  • To achieve substantial performance improvements without requiring manual engineering or developer intervention.

Proposed method

  • Construct a function-level call graph to statically analyze dependencies and identify code essential for application functionality.
  • Separate identified optional code from the main application bundle to reduce initial code loading size.
  • Integrate a lightweight runtime mechanism to fetch and execute optional functions only when needed during execution.
  • Ensure backward compatibility and correctness by deferring optional code loading until runtime, minimizing impact on warm-start performance.
  • Implement platform- and language-agnostic prototypes in Python and JavaScript for evaluation on AWS Lambda and Google Cloud Functions.
  • Use lightweight file I/O for on-demand loading, with overhead (~100 ms) significantly smaller than typical cold-start latency.

Experimental results

Research questions

  • RQ1What is the primary root cause of high cold-start latency in FaaS applications?
  • RQ2Can application-level code analysis reduce cold-start latency without modifying underlying serverless platforms?
  • RQ3How effective is function-level call graph analysis in identifying indispensable code versus optional code?
  • RQ4What is the performance overhead of on-demand loading of optional code, and does it outweigh the benefits?
  • RQ5Can the proposed optimization achieve significant improvements across diverse programming languages and serverless platforms?

Key findings

  • Application code loading latency is a major contributor to cold-start latency, accounting for a significant portion of the total delay.
  • FaaSLight reduces code loading latency by up to 78.95% and by 28.78% on average across real-world FaaS applications.
  • Total response latency is reduced by up to 42.05% and by 19.21% on average, demonstrating substantial end-to-end performance gains.
  • The approach achieves a 21.25× improvement in reducing average total response latency compared to the state-of-the-art.
  • The on-demand loading mechanism introduces only ~100 ms overhead, which is negligible compared to cold-start latency and does not affect warm-start performance.
  • The solution is effective across different programming languages (Python, JavaScript) and serverless platforms (AWS Lambda, Google Cloud Functions), confirming its generalizability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.