Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Modal 7 min read Opinion easyNovice

How to price serverless GPUs

Whether serverless or reserved GPUs are cheaper comes down to one comparison: the ratio of reserved to serverless cost equals the reservation discount multiplied by the workload's peak-to-average demand ratio, so serverless wins whenever peak-to-average exceeds the discount. Reservations must be sized for peak demand over the whole contract, while serverless bills only for actual use. Modal reports typical discounts of 2-5x against peak-to-average ratios of 5-10x for inference, training and agentic workloads, and 10-100x for burst load above a reserved baseline. The model's assumptions are also examined: perfect demand prediction, instant autoscaling, all-or-none strategies and GPU cost as the only factor.

Related posts

  • The future of AI needs more flexible GPU capacity

    Modal easyNovice

    Inference and many other GPU workloads are highly volatile: Poisson noise, daily and weekly cycles, viral spikes and bursty batch jobs, which pushes fixed-reservation GPU clusters below 50% utilization. A service at 1 req/s with 10s requests needs 12-15 GPUs rather than 10 just to absorb noise. Utilization improves through demand pooling across tenants (provision for the peak of the sum, not the sum of peaks), supply pooling across regions, GPU types and clouds, fast container and model startup, and shifting latency-insensitive work to off-peak hours. GPU spend is expected to skew toward inference served from on-demand, serverless capacity, with long-term reservations no longer the default.

  • Outgrowing Lambda Functions, Not Lambda | Honeycomb

    Honeycomb mediumAdept

    Honeycomb moved most of its S3-backed query mapper compute from Lambda Functions to AWS Lambda Managed Instances, eventually cutting query costs 40-56%, though the switchover itself was easy and the savings came from months of tuning. Lambda Functions had grown 5-8x more expensive per core-millisecond than EC2 because of an older Graviton mix and GB-second billing for network-bound waiting on S3. Agent-driven MCP queries also turned spiky load into a steady baseline. LMI is about 7.5x cheaper per CPU-second, but it bills for the whole fleet, so it only breaks even above roughly 12.5-14% utilization. Getting there required 16-way multi-concurrency, changes to GC, memory shedding and telemetry, capping the bang-bang autoscaler's max fleet size, and retry-then-spill routing plus query batching.

  • How we achieved truly serverless GPUs

    Modal mediumAdept

    Modal cuts GPU inference replica cold starts from roughly 2,000 seconds to about 50 seconds, a 40x speedup, by attacking each stage of spin-up. A solver-managed buffer of idle, health-checked GPUs, allocated with Google's GLOP linear program, takes instance provisioning out of the hot path. ImageFS, a libfuse filesystem, serves container images lazily from a tiered content-addressed cache, and CPU and CUDA checkpoint/restore skip host- and device-side initialization. The motivation is GPU Allocation Utilization: spiky inference demand leaves fixed allocations at 10-20% use, and fast autoscaling raises utilization and quality of service together.

  • Linear programming for fun and profit

    Modal mediumAdept

    Modal provisions GPU and CPU capacity across multiple clouds with a "resource solver" that formulates demand, prices, availability and per-instance limits as a linear program. It solves that program with Google's GLOP simplex solver from OR-Tools and outputs a delta of instances to spin up or down. Cheap preprocessing heuristics, such as pruning instance types, keep solves to fractions of a second rather than minutes, trading a little optimality for predictable scaling latency. Background workers make the actual cloud requests and feed observed capacity-limit failures back into later solves. The approach lets Modal exploit price arbitrage, such as H200s priced below H100s, and saves millions per year.

  • The Best Serverless Platforms in 2026

    Railway easyNovice

    "Serverless" in 2026 covers three distinct runtime contracts: function-as-a-service (Lambda, Workers, Vercel, Azure Functions), container-as-a-service with scale-to-zero (Cloud Run, Fargate/ECS Express Mode), and full-app scale-to-zero on usage-based pricing (Railway). Ten platforms are ranked by how often each is the right fit, with features, pricing, and tradeoffs for each, including cold starts, runtime constraints, cloud setup overhead, lock-in, and reliability history. The vendor-authored argument is that rewriting an existing app into FaaS handlers usually costs more than it saves. Edge-shaped workloads fit Cloudflare Workers, bursty GPU jobs fit Modal, and AWS- or GCP-native teams should stay with their cloud's offerings.

The quest for software engineering knowledge.

Look:
Layout: