Getting to the Bottom of Serverless Billing
Changyuan Lin, Gigi (Yuanzhi) Ma ∗ , and Mohammad Shahrad · 2025
Read Getting to the Bottom of Serverless Billing by Changyuan Lin, Gigi (Yuanzhi) Ma ∗ , and Mohammad Shahrad (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-01283.txt.
Introduction
Changyuan Lin, Yuanzhi Ma, and Mohammad Shahrad open the black box of serverless cloud billing, in this 2025 paper. Serverless platforms promise pay-per-use computing, yet their per-second prices beat plain virtual machines, and billing quirks pile on top: wall-clock charging, per-call fees, and rounding up. The authors trace costs from the user's bill down through the serving architecture to the operating system's scheduler on major public platforms.
Their top-down audit shows where the money actually goes and which design choices inflate it. Users choosing between serverless and rented machines finally get an apples-to-apples map. The work also pressures providers: once billing mechanics are public, they must be justified, not just charged.
Catalog record
| CREATOR | Changyuan Lin, Gigi (Yuanzhi) Ma ∗ , and Mohammad Shahrad |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 64 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-01283
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Getting to the Bottom of Serverless Billing Changyuan Lin, Gigi (Yuanzhi) Ma ∗ , and Mohammad Shahrad Abstract . Public cloud serverless platforms have attracted a large user base due to their high scalability, plug-and-play deployment model, and pay-per-use billing. However, compared to virtual machines and container hosting services, modern serverless offerings typically impose higher per-unit time and resource charges. Additionally, billing practices such as wall-clock allocation-based billing, invocation fees, and usage rounding up can further increase costs. This work, for the first time, holistically demystifies these costs by conducting an in-depth, top-down characterization and analysis from user-facing billing models, through request serving architectures, and down to operating system scheduling on major public serverless platforms. We quantify, for the first time, how current billing practices inflate billable resources up to 5.49 × 5.49\times beyond actual consumption. Also, our analysis reveals previously unreported cost drivers, such as operational patterns of serving architectures that create overheads, details of resource allocation during keep-alive periods, and OS scheduling granularity effects that directly impact both performance and billing. By tracing the sources of costs from billing models down to OS scheduling, we uncover the rationale behind today’s expensive serverless billing model and practices and provide insights for designing performant and cost-effective serverless systems. † † footnotetext: * Ma is affiliated with Johns Hopkins University, but conducted the research at the University of British Columbia. 1. Introduction Serverless computing has become one of the mainstream cloud computing paradigms, enabling developers to quickly deploy scalable and event-driven applications on the cloud without needing to manage the underlying infrastructure ( Jonas et al. 2019 ; web 2023b ) . Major cloud providers offer serverless computing solutions, such as AWS Lambda ( web 2025w ) , Google Cloud (GCP) Run functions ( web 2025i ) , Azure Functions ( web 2025e ) , IBM Cloud Code Engine ( web 2025p ) , and Cloudflare Workers ( web 2025j ) . Serverless computing stands out as the purest existing pay-per-use cloud model, offering automated scaling—from zero to thousands of instances in seconds—and fine-grained billing. As a result, it is often advertised as cost-efficient ( Eismann et al. 2021b ; web 2025v ; Jonas et al. 2019 ; Wood 2024 ; Cloudflare 2025a ) . The widely acknowledged benefits of serverless architectures—such as high scalability, fine-grained pay-per-use billing, freedom from infrastructure management, and seamless integration with other cloud services—are not without associated costs ( Eivy and Weinman 2017 ; Hellerstein et al. 2018 ; Wen et al. 2023 ) . In terms of the per-unit resource price, serverless offerings are often priced higher than other cloud computing paradigms, such as virtual machines (VMs) and containers running on container hosting platforms. We demonstrate this by comparing the price of AWS Lambda, AWS EC2 VMs, and AWS Fargate containers, all configured on identical ARM-based hardware in the us-east-2 region. We specifically chose ARM due to the diverse and performance-varying nature of AWS’s x86 processors, which complicates fair comparisons across services. An AWS Lambda function with 1 vCPU, 1,769 MB of memory, and 512 MB of ephemeral storage costs \$2.3034\times 10^{-5} per second ( web 2025v ) , while a compute-optimized EC2 instance ( c6g.medium ) with 1 vCPU, 2 GB memory, and 1 GB storage and an AWS Fargate container with the identical resource allocation as EC2 cost only \$9.4753\times 10^{-6} and \$1.1003\times 10^{-5} per second, which are 41.1% and 47.8% of the AWS Lambda price. The cost of VMs can be further decreased by at least two times if using a burstable instance (e.g., AWS EC2 t4g.small flavor). Also, this comparison does not include the invocation fee of AWS Lambda, which is \$2\times 10^{-7} for each request, whereas EC2 instances and Fargate containers do not charge request fees. Additionally, our analysis of billing practices on major serverless platforms uncovers significant over-accounting (§ 2 ), showing that users can be charged for computing resources up to 5.49\times greater than their actual usage. These observations motivate a fundamental research question: What makes serverless expensive? We argue that the root cause of the high unit prices and expensive billing practices in serverless lies in the architecture of modern serverless computing systems. Resource consumption and overhead incurred by the underlying runtimes and control plane for request serving, such as sandbox provisioning, isolation, request dispatch, and keep-alive (KA), translate into higher per-unit charges passed on to serverless users. Additionally, some of our measurements of resource allocation patterns and performance behaviors on major serverless platforms point to part of the execution costs and performance fluctuations to the underlying operating system (OS) scheduling mechanisms. Serverless Platform Billable Time Billable Resources 1 Billing Granularity/Cutoffs Control Knobs and Steps AWS Lambda ( web 2025w ; web 2025k ; web 2025v ) Wall-Clock Turnaround Time 2 Allocated Memory 1 ms Memory 1 MB (CPU proportionally allocated) Google Cloud Run (Request-Based Billing) ( web 2025i ; web 2025t ) Wall-Clock Turnaround Time Allocated Memory and CPU 100 ms Memory 1 MB CPU 0.01 vCPUs (1st Gen)/1 vCPU (2nd Gen) Azure Functions Consumption Plan ( web 2025e ; web 2025s ; web 2025d ) Wall-Clock Execution Time Consumed Memory 1 ms (min cutoff 100 ms) 128 MB N/A (Fixed Resource Size of 1.5 GB memory and 1 vCPU) Azure Functions Flex Consumption Plan ( web 2025e ; web 2025c ; web 2025d ) Wall-Clock Execution Time Allocated Memory 100 ms (min cutoff 1 s) Memory (Either 2 GB or 4 GB) (CPU proportionally allocated) IBM Cloud Code Engine Function ( web 2025p ; Fassnacht and Regge 2021 ) Wall-Clock Turnaround Time Allocated Memory and CPU 100 ms Memory (Fixed Combos) CPU (Fixed Combos) Huawei Cloud Function Graph ( web 2025o ) Wall-Clock Execution Time Allocated Memory 1 ms Memory (Fixed CPU-Memory Combos) Alibaba Cloud Function Compute ( web 2025n ; web 2025f ; web 2025q ) Wall-Clock Execution Time Allocated Memory and CPU 1 ms Memory 64 MB CPU 0.05 vCPUs Oracle Cloud Functions ( web 2025h ) Wall-Clock Execution Time Allocated Memory Not Documented Publicly Memory (Fixed Combos) Vercel Functions ( web 2025y ) Wall-Clock Execution Time Allocated Memory Not Documented Publicly Memory 1 MB (CPU proportionally allocated) Cloudflare Workers ( web 2025j ) Consumed CPU Time Consumed CPU 1 ms N/A (Fixed Resource Size of 128 MB memory) 1 This table and related analysis in § 2 focus on the most basic billable computing resources (i.e., CPU and memory). Other billable resources (e.g., storage, GPUs, and network bandwidths) may apply in practice. 2 AWS bills wall-clock turnaround time that includes cold start latency (initialization duration) starting August 2025 ( Gupta and Gebhart 5 07 ) . Table 1 . The notion of billable time, billable resources, and billing granularity varies across different serverless platforms (as of 2025-05-15). To uncover these costs, a detailed analysis of current billing models together with measurements of the underlying serverless systems is required. Previous studies have characterized major serverless platforms in terms of architecture, performance, and resource management ( Adzic and Chatley 2017 ; Wang et al. 2018 ; Yu et al. 2020 ; Cvetković et al. 2023 ) . However, as serverless computing evolves rapidly and more serverless offerings become available, some earlier measurements do not