Machine Learning SaaS: How Infrastructure Cost Scales Behind the API

In a machine learning SaaS, idle GPU time, tenancy, data movement and vector-store pricing set cost per request. Here is how to measure and design for it.

Machine Learning SaaS: How Infrastructure Cost Scales Behind the API
Written by TechnoLynx Published on 11 Jul 2026

In a machine learning SaaS, the expensive resource, GPU time, is billed whether the GPU is computing or waiting for data. Cast AI’s 2026 State of Kubernetes Optimization Report puts average GPU utilisation across production Kubernetes clusters at 5%. Online inference runs at small batch sizes to meet latency targets, and request rates swing through the day, so capacity sized for the peak sits idle for much of the rest. The number that sets the margin is idle GPU time, and an ML SaaS team needs to measure it per instance and per tenant.

What’s the Difference Between SaaS, PaaS and IaaS for Machine Learning?

NIST SP 800-145 defines three cloud service models (IaaS, PaaS and SaaS), and machine learning offerings span all three depending on how much of the stack the provider runs. At the IaaS layer you rent GPU instances and own everything above them: serving runtime, scaling, scheduling and monitoring. Managed ML platforms such as Amazon SageMaker, Google ML Engine and Azure ML sit at the PaaS layer, scaling provisioned resources once you set latency targets or throughput thresholds. At the SaaS layer the customer calls a model through an API or SDK without training or maintaining it, which is how the 2023 Model-as-a-Service survey describes delivering ML models as a cloud service.

Layer What the provider runs What you still own Where idle GPU cost lands
IaaS Hardware and virtualisation Runtime, serving, scaling, telemetry Directly on your instance-hour bill
PaaS (managed ML platform) Provisioning, scheduling, autoscaling Model, data path, scaling thresholds On your bill per GPU-second, computing or waiting
SaaS (your product) Everything behind the API Only the calls customers make In your margin, because customers pay per request or subscription

A machine learning SaaS is the case where you are the provider at the top layer: you build on IaaS or a managed platform and sell the predictions. As a provider, the SaaS takes on the characteristics NIST attaches to cloud services: resource pooling across tenants and metered service. Abstraction moves the operations work, not the physics of the data path, and our article on where GPU costs hide in machine learning as a service looks at that from the buyer’s side.

Why Machine Learning SaaS Cost Stops Tracking Requests

Inference is a low-latency online task, closer to a web service than to a batch job. A 2019 study of GPU inference scheduling found that the small batch sizes online serving with latency targets requires can leave GPU utilisation under 15%. The MuxFlow authors (2023) found GPU and SM utilisation below 60% on more than 99% of GPUs in a production cluster. Because inference runs continuously against variable demand, capacity is provisioned for peaks, which lowers utilisation further.

Host-side CPU starvation is one cause of that idle time; CPU-side bottlenecks that starve GPUs: cores, threads and data handoff covers how to profile it.

Capacity sized for an estimated peak that rarely arrives is a fixed cost spread across every request served. The 2019 paper “No DNN Left Behind” sets out the choice statically provisioned services face: over-provision for estimated peak and leave resources idle much of the time, or accept higher latency and even denial of service when demand rises.

Autoscaling helps, but it adapts only over long time periods. Managed platforms adapt over minutes: SageMaker made scaling decisions in 5-minute increments when that paper was written. Cast AI puts a cold start from zero at 8 to 15 minutes for large models, once node boot, driver initialisation, image pull and weight loading are counted. Dedicated endpoints keep warm instances for latency-sensitive applications, and every warm GPU-second is billed whether it computes or waits.

Cast AI reports its best-performing cluster at 49% average GPU utilisation against a fleet average of 5%, and attributes the gap almost entirely to autoscaling, bin-packing and GPU sharing rather than hardware.

Worked Example: What Idle Time Does to Cost per Million Inferences

The assumptions are the resnet18 figures from “No DNN Left Behind”. One CPU core served 5.24 inferences per second at 3.48 cents per hour, which is $1.84 per million. A GPU served 1,031 inferences per second at $2.55 per hour, which is $0.69 per million.

  • At full GPU throughput: 1,031 × 3,600 = 3,711,600 inferences per hour, so $2.55 ÷ 3.71 million ≈ $0.69 per million.
  • At 10% of that throughput: 371,160 inferences per hour, so $2.55 ÷ 0.371 million ≈ $6.87 per million, about 3.7 times the CPU core’s cost.
  • Break-even with the CPU core: $0.69 ÷ $1.84 ≈ 37% of full GPU throughput.

Per-request GPU cost rises in inverse proportion to utilisation, and at the paper’s resnet18 prices the GPU costs more than one CPU core below about 37% of its throughput.

How Do Serial Host-Side Bottlenecks Show up as Idle GPU Time Across a Fleet?

Serial host-side work shows up as time the GPU spends waiting rather than computing. Total inference latency combines execution on the accelerator with transfer over PCIe, disk and network. In a multi-tenant service, a request may also need its model copied from host memory or cold storage before it can run. The same paper notes that for resnet18 a GPU cache hit ratio of 85% or higher moves the bottleneck from PCIe bandwidth to GPU execution.

NVIDIA’s work on its own clusters shows what hides in those gaps. Its GPU idle-waste metric found CPU-only jobs running on GPU nodes, misconfigured exclusive-node requests, stalled jobs, delays in downloading containers, and interactive sessions left unattended. For inference, Cast AI calls request queue depth a more accurate scaling signal than raw GPU utilisation.

How Do I Profile Per-Instance GPU Utilisation to Find Wasted Pipeline Parallelism?

Start from GPU telemetry joined to the job that produced it. That join gives a unified view of how each workload actually consumed GPU resources. Profile before you change any serving code.

  1. Export GPU metrics. NVIDIA’s DCGM Exporter exposes GPU metrics on an HTTP /metrics endpoint for Prometheus, both per GPU and per MIG instance.
  2. Tag every sample with workload context. NVIDIA joined DCGM telemetry to Slurm job metadata and found Slurm’s five-minute granularity enough to join with the higher-resolution GPU fields. On Kubernetes, the equivalent is pod, namespace and tenant labels.
  3. Define idle conservatively. NVIDIA counted a workload as idle only after a full hour of continuous GPU inactivity, and still cut GPU waste from roughly 5.5% to about 1%.
  4. Put a price on idle. The OpenCost specification defines cluster idle cost as asset costs minus workload costs. It charges workloads at the higher of request and usage, and allows idle and shared costs to be distributed to tenants.
  5. Read SM activity next to “GPU utilisation”. In MuxFlow’s production deployment, GPU utilisation rose from 26% to 76% while SM activity rose from 16% to 33%. The headline counter records that a kernel was running, not how much of the chip it occupied.

Converting those readings into a per-request figure is a separate step, and measuring inference cost per request before any optimisation works through it in full.

How Do I Right-Size Instance CPU-GPU Balance Against the Real Parallel Fraction?

Size against the profile, not the instance catalogue. The real parallel fraction, the share of request time the GPU is busy, tells you whether you need more host capacity, a smaller GPU slice or more batching. If the GPU waits on preprocessing, deserialisation or transfer, a bigger GPU does not remove the wait.

If the GPU is waiting on demand instead, the answer is a smaller slice of a shared GPU, not a smaller fleet of whole ones. Multi-Instance GPU (MIG) splits an A100 into up to seven fully isolated instances, partitioning both SMs and memory bandwidth. NVIDIA MPS assigns sets of SMs to concurrent workloads. The MuxFlow authors measured one GPU giving up to 62% more computing power while slowing online workloads by less than 20%. In “No DNN Left Behind”, batching and batch interleaving raised resnet18 GPU throughput from 1,031 to as much as 4,083 inferences per second, at an elevated median latency of 62.1 ms.

Sharing has costs that a right-sizing plan has to price in. Interference between tenants can degrade tail latency and throughput, and gets worse as more workloads are co-located. MPS can propagate one workload’s error to the others on the same GPU. Repartitioning a GPU takes tens of milliseconds or more, which rules out reconfiguring it for every request. Where the kernels themselves are the cost, ML compilers that cut cost per request are the next lever.

How Do I Design Multi-Tenant Storage and Data Pipelines Without Running a Stack per Customer?

Pool by default, and silo only the components that a tenant’s data, contract or noisy-neighbour profile requires. AWS’s tenant isolation whitepaper says plainly that silo is not an all-or-nothing decision.

Model Cost profile Per-tenant cost attribution Noisy-neighbour risk
Silo (stack per tenant) Idle resources in quiet periods, little economy of scale Simple, because the coarse-grained model maps cost to tenant Contained to the tenant’s own stack
Pool (shared) Scales with the actual load of all tenants Needs instrumentation to link consumption to each tenant Grows the more resources are shared
Mixed (silo for selected components or tiers) Pool efficiencies for parts that do not need silo Simple for siloed parts, instrumented for pooled ones Assessed per resource against cost and complexity

On the storage side, Microsoft’s multitenant guidance warns against a table per tenant inside one relational database, a pattern that stops scaling as tenant numbers grow. It also notes that a single shared storage account throttles every tenant once its operations limit is exceeded. Metering has to report at the tenant isolation boundary you use. Some data services report consumption per request and others do not, and application-level metering fills that gap. Data pipelines should carry the tenant identifier end to end, so that every GPU-second and storage operation can be charged back.

For the models themselves, the options are tenant-specific models, one shared model, or a shared base tuned for each tenant. With hyper-personalised models, the “build once, use many times” SaaS paradigm cannot always be applied. AWS reports Zendesk serving such models through SageMaker multi-model endpoints at around 100 ms latency, with 90% savings against dedicated endpoints. AWS also states the limits: the models need to be of similar size (Zendesk’s range from 10 to 50 MB), and the application has to tolerate an occasional cold start when a rarely used model is reloaded. Pinecone’s documentation shows a query against a 1 GB tenant namespace costing 1 read unit, while the same query filtered across a shared 100 GB namespace costs 100.

What Cloud Substrate Does a Machine Learning SaaS Product Need?

It needs storage for data and models and compute for training and inference, each designed around tenant isolation. A feature store and a vector database earn their place only when the model needs them.

MuxFlow’s production clusters keep large datasets in a remote file system and fetch the data during execution. Proprietary feature stores, pipeline DSLs and model formats are also where migration friction builds up. Vector databases serve semantic search, recommendations and copilots in production, and their pricing behaves differently from compute, as the next section shows.

How Do Storage, Data Movement and Pipeline Costs Scale as an ML SaaS Takes on More Customer Data?

Actian, a database vendor, points out that in many pricing models the cost of a query rises with dataset size even when the query is unchanged. At Pinecone’s documented 1 read unit per GB, the same query costs ten times more at 100 GB than at 10 GB. Actian adds that embeddings, reranking, backups, reindexing and egress can double real production spend.

Pricing floors change the arithmetic for small, stable tenants. Actian reports that Pinecone’s $50 monthly minimum on paid Standard plans, introduced in October 2025, raised monthly costs five- to tenfold for some low-volume workloads designed to stay under $10 a month. Changing embedding model means re-vectorising everything, which Actian estimates at $8,000 to $15,000 in one-time embedding costs for 100 million vectors. Actian puts the point where self-hosting becomes materially cheaper at 60 to 100 million queries a month. Actian sells a database, so treat that threshold as a vendor estimate to test against your own traffic.

Shared resources also hit hard ceilings: the maximum size or throughput of a single database or file store eventually becomes a blocker. On the compute side, a tenant model that is not already loaded has to be copied from storage or host memory before it runs.

Should I Build an ML SaaS on a Managed ML Platform or Assemble It from Raw Cloud Services?

Start on a managed platform, then move off it one component at a time once its billing granularity or scaling behaviour costs more than the engineering needed to replace it. One MLaaS provider directory claims that organisations with fewer than five full-time ML engineers typically cannot match a managed platform’s operational reliability at comparable cost. That is a rough heuristic, not a threshold.

Cast AI reports that ALLEN Digital moved seven inference models from SageMaker to Kubernetes, using GPU time-slicing and Spot instances, and cut total GPU cost by more than 70% with no latency regression. Managed platforms offer serverless inference that scales to zero when idle, or dedicated endpoints that keep warm instances for latency-sensitive traffic. Shared-tenant inference costs less but has more variable latency, while dedicated endpoints give predictable latency at higher hourly prices. Raw cloud services pay off when the margin depends on control the platform does not expose: GPU sharing, custom batching, and per-tenant metering at the GPU. Whichever you choose, a portable model format such as ONNX reduces the serialisation lock-in that makes a later move expensive.

Keep, Shrink, Hybridise or Burst: What the GPU Cluster Behind the Service Has to Prove

Where an ML SaaS runs training, batch scoring or baseline inference on an owned or reserved GPU cluster, any decision to keep, shrink, hybridise or burst that cluster has to rest on instrumented utilisation data. That means fleet-wide and per-job data, covering compute, memory bandwidth and interconnect, over a full workload cycle. Peak or theoretical capacity tells you what the cluster could do, not what it does.

TechnoLynx runs that measurement through the Inference Cost-Cut Pack. The first step is agreeing which decision the data must support, and the time window and granularity it needs (fleet, group or job). The cluster then gets GPU, memory-bandwidth and network telemetry with per-job GPU-second metering, tied to spend through a cost-allocation model. The analysis produces peak-versus-average profiles, names the source of contention (compute, memory or interconnect), and checks the findings against finance’s TCO model as retain, hybrid and migrate scenarios. The tooling stays in place so the decision can be re-run as the workload mix changes. When the question becomes which hardware to buy or rent, LynxBenchAI is the measuring tool. Its published accelerator results inform the hardware choice, but they do not measure your own cluster or service.

Is the Existing Cluster Worth Keeping?

The case for keeping the cluster rests on utilisation over a full workload cycle, broken down by group and by job. A single deadline rush can make a quiet cluster look saturated, and a quiet month can make a busy one look wasteful. Answering “what has our utilisation been this year, by research group?” requires GPU telemetry joined to job metadata, the same join NVIDIA built for its own clusters.

Justifying Spend When Load Is Uneven Outside the Batch Window

The MuxFlow authors found GPU utilisation and SM activity in a production online workload fluctuating greatly within a day while following a daily cycle. A finance case needs the peak, the average and the idle hours priced in money. The average alone hides the peak the cluster exists to meet, and the peak alone hides the idle hours finance is paying for.

Evidence That Rules Migration in or Out

Whether you can shed the cluster entirely, need a hybrid footprint or should keep it depends on measured idle capacity against burst demand, not on vendor benchmark scores. Comparisons with cloud bursting are sensitive to egress, idle reservation costs and sovereignty requirements that utilisation figures do not capture. Those cost lines belong in a full cloud GPU versus on-premise total cost analysis.

Visibility While the Migration Runs

During a move, the same telemetry on both sides keeps the sizing honest. Without it, a rehost risks copying oversized instances from the old on-premise sizing.

Per-Job Attribution Before Buying More GPUs

“Are we using the GPUs we have before buying more?” and “which jobs are starving others of interconnect bandwidth?” are attribution questions, and aggregate utilisation cannot answer either one. Microsoft’s Philly trace study (2019) of multi-tenant training clusters linked gang scheduling and locality constraints to queuing, and locality to GPU utilisation. Effects like these only show up in per-job data.

Measured pattern over a full cycle Lean towards Re-run the decision when
High, sustained utilisation, little idle outside deadlines, tight interconnect contention Retain or expand on-prem capacity The workload mix shifts
Steady baseline with bursty, deadline-driven peaks Hybrid: baseline on-prem, peaks burst to cloud Egress or reservation pricing changes
Persistently low across the year Build the case to shrink or migrate, subject to sovereignty and recurring-cost comparison Before the next hardware refresh

Who Can Find the Idle GPU Time in Our ML SaaS and Bring Cost per Request Down?

TechnoLynx measures where GPU time goes in each instance and tenant of an ML SaaS fleet, then lowers the cost built into each request by fixing what the profile points to: host-side stalls, batching, GPU sharing or instance sizing. Whether to build that capability in-house or bring in a specialist depends on whether your team already has GPU telemetry joined to tenants and requests. If it does, the gap is engineering time. If it does not, TechnoLynx instruments the fleet first, adding GPU telemetry and per-job metering. When choosing a partner, ask to see the measurement plan before any promise of savings, and check that the telemetry stays with your team afterwards. TechnoLynx delivers the work as the Inference Cost-Cut Pack, within its wider practice in AI infrastructure and production SaaS.

There are realistic alternatives. A platform team can set up DCGM Exporter for GPU metrics and OpenCost for cost allocation itself.

Before Migrating an ML SaaS Workload Between Clouds or off On-Premise Hardware

Before you move, check that you have a utilisation baseline, a data-transfer estimate in both directions, and a named reason for the move. Without a baseline, a rehost risks copying oversized instances from the old sizing to the new bill.

  • Baseline metrics. Microsoft’s migration assessment guidance says to gather CPU utilisation, memory usage, disk I/O, network throughput, peak concurrency, daily and weekly peaks, response times and SLA metrics. For an ML service, add SM activity, GPU memory and per-tenant GPU-seconds.
  • Dependency map. Components that call each other constantly either migrate together or keep network connectivity until both have moved.
  • Data transfer in both directions. One migration runbook template names data transfer as the cost most often missing from estimates, and notes that it runs both ways. AWS waives data-transfer-out charges to the internet for customers moving off AWS, arranged through AWS Support.
  • Strategy per workload. Rehosting risks copying oversized instances sized for on-premise hardware. AWS calls refactoring the most complex and costly strategy, and recommends modernising after the move in large migrations. Retaining remains a valid choice for applications tied to specialised hardware or recently upgraded systems.
  • Comparable cost units. Compare target clouds on measured work, not list prices. Comparing cost per useful FLOP for GPU workloads on AWS and Azure is one way to frame that.
  • A named trigger. Treat the move as portability work with a measurable trigger: a performance ceiling, a constraint of the deployment target, or a lock-in cost. A model that performs on one stack is a different artefact from one that performs on the next.

A service that never measured its idle GPU time takes that idle time to the new cloud unchanged, with a new egress line added to every month’s bill.