interviewpath
  • 0day streak
  • 10total XP
  • Level 1

Serverless in the Wild: Characterizing and Optimizing the Serverless Workload at a Large Cloud Provider

Mohammad Shahrad, Rodrigo Fonseca, Íñigo Goiri, Gohar Chaudhry, Paul Batum, Jason Cooke, Eduardo Laureano, Colby Tresness, Mark Russinovich, Ricardo Bianchini. USENIX ATC 2020, 2020.

Open the paper(opens in a new tab)Planning estimate 3 h 30 min (editable through its topic)

Who should read it

Read it if you prepare for cloud research on serverless, resource management or workload characterization, or want a model of a paper that pairs a production characterization with a policy and a public trace. It grounds cold-start discussions in production data. It is not needed for questions about using serverless platforms, and it does not cover sandbox technology; read Firecracker for that.

Study objectives

  • Summarize the workload characterization (invocation frequency skew, triggers, execution times, memory) and the resource-management implication of each finding.
  • Explain the fixed keep-alive policy and why it performs poorly on this workload.
  • Describe the hybrid histogram policy: idle-time histograms, pre-warming and keep-alive windows, the conservative fallback and time-series forecasting for out-of-range idle times.
  • Interpret the evaluation’s trade-off between cold-start percentage and wasted memory time.
  • Identify the assumptions and limitations of the trace and of the simulator.

Prerequisites

Main concepts to understand

  • Functions, applications and triggers; the application as the unit of scheduling and memory
  • Cold versus warm starts and who pays for keeping instances warm
  • Invocation frequencies spanning many orders of magnitude
  • Idle-time (inter-arrival) distributions and their variability
  • Fixed keep-alive versus per-application pre-warming and keep-alive windows
  • Range-limited histograms, percentile cut-offs and safety margins
  • Fallbacks: conservative keep-alive when data are scarce, time-series forecasting for long idle times
  • The trade-off curve between cold-start percentage and wasted memory time

What to inspect in the evaluation

  • Trace scope and granularity (Section 3.1): one provider, a two-week window, invocation counts in one-minute bins; list the questions this granularity cannot answer.
  • Simulator assumptions (Section 5.1): execution time treated as zero and equal memory per application to bound wasted memory; consider how these affect absolute and relative results.
  • Metrics: why the authors report the cold-start percentage of the 75th-percentile application and normalized wasted memory time, and what an alternative metric would show.
  • Baselines: fixed keep-alive windows of several lengths and a no-unloading bound; ask whether a stronger adaptive baseline should have been included.
  • Real-system experiment (Section 5.3): scale, duration and selection of applications on the OpenWhisk deployment, and how closely it tracks the simulation.
  • Production implementation (Section 6): what is described versus what is measured.

Guarantees versus empirical results

Correctness or design arguments

  • Design argument that a per-application histogram is compact and cheap to update, so the policy can run alongside short function executions.
  • Argument that adapting windows to each application’s idle-time distribution should beat one fixed window on a skewed workload (supported by evaluation, not proved).
  • Conservative fallbacks are argued to avoid making things worse when the histogram is not representative.

Empirical results (depend on setup)

  • Characterization of invocation skew, triggers, execution times and memory, specific to Azure Functions in July 2019 (Section 3).
  • Simulated trade-off curves of cold starts versus wasted memory time for fixed and hybrid policies (Section 5.2).
  • Cold-start and memory results from the OpenWhisk experiment (Section 5.3).

Reading plan

  1. Pass 1 (about 30 minutes): abstract, introduction and contributions, Section 3.6 (main takeaways), Figure 10 (policy overview) and the conclusion.
  2. Pass 2 (about 90 minutes): Section 3 figure by figure, writing one resource-management implication per figure; then Section 4, the policy and the challenges it is designed around.
  3. Pass 3 (about 60 minutes): Sections 5 and 6. List every simulator assumption and how it could bias the comparison, then sketch how you would replay the public trace yourself.

Discussion prompts

  • With invocations binned per minute, what errors arise for short idle times, and in which direction do they push the results?
  • Why report the 75th-percentile application rather than the mean cold-start rate across applications?
  • How would the results change if execution times and per-application memory were modeled instead of fixed?
  • When would a provider accept more memory cost for fewer cold starts, and how would that move the chosen operating point?
  • How would you adapt the policy for functions that must load large ML models during initialization?

Related topics

Your structured notes

The guide above is an original annotation; write your own reading of the paper here.

What is the provider’s dilemma between cold starts and memory, and why was public data on FaaS workloads missing?

What does the policy assume about the stability of idle times, and what does the simulator assume about execution time and memory?

Describe the histogram, the head and tail cut-offs, the margins and the two fallback paths.

Which contribution matters most to you: the characterization, the policy or the released trace? Why?

Which figures support the claim that the hybrid policy improves the trade-off, and on which metric?

Which fixed keep-alive lengths are compared, and what stronger adaptive baseline would you add?

Which components (pre-warming, percentile choices, margins, forecasting fallback) are varied separately?

List limits of the trace (one provider, period, granularity) and of the simulation, separating those the authors acknowledge from your own.

What state does the policy keep per application, and where does it run in the production description?

Propose an experiment, for example replaying the 2021 per-invocation trace to test sensitivity to sub-minute arrivals.