, ,

GPU Cost, Scale and Sizing Decisions for Machine Learning Workloads (Data Science Series, Part 28)

Nine percent average GPU utilisation on a cluster I inherited turned out to be the whole story. Here is how I size, buy and scale machine learning compute, with current instance rates and the arithmetic that decides each call.

Data Science Series · Part 28 of 30

Nine percent. That was the mean GPU utilisation across a training cluster I inherited two years ago, measured over a fortnight with the vendor tooling that had been installed and never opened. Eight accelerators were on the invoice every hour of every day. Slightly less than one of them was doing arithmetic at any given moment. Nobody on that team was careless. They had simply never been told that the number existed, and the finance report they were being judged against showed instance hours, which were exactly as expected.

Compute cost for machine learning is decided far less by which instance you pick than by how much of the hour that instance spends waiting. An architect who understands that spends their budget conversations arguing about pipelines and batch sizes rather than about hourly rates, and gets a better answer. This part is the arithmetic behind those conversations: how to size a training run, which accelerator class fits which job, how the purchase models actually price out, and where scaling out stops paying for itself.

Who this is for: anyone who signs off machine learning infrastructure spend or is about to be asked to. Assumed starting point: you have trained models yourself, you know what a training loop does (Part 17), and you have read the platform design in Part 27. Cloud pricing knowledge is not assumed. No code here, because none of these are coding decisions. Every rate quoted was read from vendor pricing pages on 20 July 2026 and will drift, so treat the ratios as the durable part.

Key takeaways

Cost per completed training run, not price per hour, is the number to manage. A cheaper accelerator running at 80 percent beats an expensive one running at 9 percent almost every time.

Most tabular work, including our churn project, never needs a data centre GPU at all. Reach for one when memory or matrix throughput is genuinely the binding constraint, and prove it with a profile first.

Reserved capacity is priced very differently from on demand. An EC2 Capacity Block for eight H100 GPUs runs at 34.608 US dollars an hour in North Virginia, against a 55.04 on demand list rate for the same instance.

Scaling from one GPU to eight rarely gives eight times the speed. Past the point where communication overhead bites, each extra GPU raises cost per epoch while shortening wall clock, and that is a schedule decision rather than a cost one.

Inference, not training, is where a successful model spends most of its lifetime budget. Size for it deliberately, and batch by default.

Utilisation, not price per hour

Where the churn project stands: Part 27 gave us four planes and a set of contracts between them, but said nothing about the hardware underneath. This part sizes that hardware, and our churn model is a useful test case precisely because it is unglamorous. Roughly seven thousand customers, twenty or so engineered features from Part 6, a gradient boosted model from Part 12, retrained nightly. Sizing compute for that honestly is a more common architectural problem than sizing a language model cluster, and it is the one people get wrong most often in the expensive direction.

One formula governs everything that follows. Cost of a training run equals hourly rate multiplied by wall clock hours, and wall clock hours equal useful compute time divided by utilisation. Halving utilisation doubles the bill just as surely as doubling the rate does, and utilisation is usually the variable you can move without asking anyone for money. On the cluster I opened with, moving utilisation from 9 percent to 78 percent was worth more than every negotiated discount that team had ever obtained, and it took an afternoon.

Low utilisation almost always has a mundane cause. Data loading on a single worker thread while the accelerator waits. Preprocessing that belongs in the warehouse running inside the training loop. Small batches that leave the tensor cores half empty. Synchronous logging of a metric to a remote server between steps. None of these are interesting, and all of them are cheaper to fix than to buy around. Profile before you procure is the whole discipline, stated in four words.

GPU utilisation across ten minutes of trainingSame model, same accelerator, before and after fixing the input pipeline100500percentafter: mean 78 percentbefore: mean 9 percentSame instance, same hourly rate. Cost per completed epoch fell by a factor of 8.4.
Nothing on the invoice changed. Everything about the cost of an experiment did.

GPU classes and what each one is for

Accelerators differ along three axes that matter to a modeller: memory capacity, memory bandwidth, and which numeric formats the tensor cores handle natively. Capacity decides whether your model and its optimiser state fit at all. Bandwidth decides how fast large batches move. Format support decides whether you can halve your memory footprint with mixed precision, which means computing most operations in a sixteen bit or eight bit format while keeping the master weights in thirty two bit. PyTorch exposes that through torch.amp, and it is the single highest leverage change available on most training jobs.

Reading the table below, notice that per accelerator rates span roughly eight times from an A100 to a B200, while memory capacity spans under three times. Paying for a newer part buys throughput and format support far more than it buys room. If your problem is that the model will not fit, more memory per device or sharding across devices is the answer. If your problem is that a run takes fourteen hours, throughput is the answer. Confusing the two is how teams end up renting a B200 to hold a model that fits comfortably in 24 gigabytes.

AcceleratorMemoryReserved USD per accelerator hourWhere I would use it
L424 GB GDDR6, 300 GB/snot offered as a capacity blockInference, small model training, video. 72 watt part, fits anywhere
A100 80 GB (p4d)80 GB HBM2e, 2,039 GB/s1.475Best value per hour for training that is not latency critical
H100 (p5.48xlarge)80 GB HBM3, 3,350 GB/s4.326Transformer training where FP8 and the transformer engine actually engage
H200 (p5e.48xlarge)141 GB HBM3e4.975Same jobs as H100 when capacity is the binding constraint
B200 (p6-b200)HBM3e, 8 per instance10.296Frontier scale pretraining. Very hard to justify below that
Trainium (trn1)16 devices per instance0.596Cheapest per device by a wide margin, at the cost of framework portability
Reserved rates are EC2 Capacity Block effective hourly rates per accelerator, US regions, read 20 July 2026. L4 pricing sits in general on demand rather than capacity blocks.

My verdict for a team in the churn project’s position: default to CPU for gradient boosted models on tabular data, and buy a single L4 when you start doing anything with text or embeddings. What I would avoid is standing up an eight GPU H100 instance for exploratory work, because the utilisation pattern of exploration is bursts of activity around long human thinking pauses, and that pattern is the worst possible match for a machine that costs 55 dollars an hour whether or not anyone is looking at it.

flowchart TD A[Training job to size] --> B{Neural network or tabular model} B -->|tabular| C[CPU instance, no accelerator] B -->|neural| D{Profile shows GPU bound} D -->|no| E[Fix input pipeline first] D -->|yes| F{Fits in 24 GB with mixed precision} F -->|yes| G[Single L4 or A10G] F -->|no| H{Fits in 80 GB} H -->|yes| I[Single A100, H100 only if FP8 helps] H -->|no| J[Shard across devices, H200 or B200]
Sizing path I follow. Note that two of the eight outcomes involve buying no accelerator at all.

Rightsizing a training run

Memory sizing is arithmetic anyone can do on a whiteboard, and doing it in the room saves a procurement cycle. Take the parameter count, multiply by bytes per parameter, then account for what training adds. Weights in thirty two bit floating point cost four bytes each. Gradients cost the same again. A momentum based optimiser such as Adam keeps two further state tensors, so another eight bytes. That is sixteen bytes per parameter before a single activation is stored, which means a one billion parameter model needs roughly sixteen gigabytes just to exist in a training state.

Activations are the part people forget, and they scale with batch size rather than with parameters. Doubling the batch roughly doubles activation memory, which is why a job that trains happily at batch 16 dies at batch 64 with a message about being unable to allocate. Mixed precision helps on both fronts by storing activations in a sixteen bit format, and bfloat16 in particular keeps the same exponent range as thirty two bit floating point, which is why it converges without the loss scaling gymnastics that half precision needs.

Worked example: sizing a 7 billion parameter model for full fine tuning. Weights at four bytes give 28 GB. Gradients add 28 GB. Adam state adds 56 GB. Running total is 112 GB before activations, which already exceeds one 80 GB H100 and explains why full fine tuning at that scale needs either sharding across devices or an H200 with 141 GB. Switch to a parameter efficient method that freezes the base weights and the optimiser state collapses to a few hundred megabytes, total under 20 GB, and the same job fits on a single 24 GB card. That single architectural choice moves the workload between two price tiers separated by more than a factor of six.
Gotcha: reserved GPU capacity is billed for the window you reserved, not the window you used. An EC2 Capacity Block reservation fee is charged up front at the time you schedule it, and the block runs whether or not you launch anything into it. I have watched a team reserve three days of eight H100 GPUs for a job that finished in eleven hours, then leave the remaining sixty one hours idle because nobody had a second experiment queued. At the North Virginia rate of 34.608 dollars an hour, those idle hours cost just over 2,100 dollars. Reserve the window you can fill, and keep a backlog of secondary experiments ready to absorb the tail.

Purchase models and what each one really costs

Four ways exist to pay for accelerator time, and they differ in price by more than most people assume. On demand is the list rate, currently 55.04 dollars an hour for a p5.48xlarge with eight H100 GPUs in North Virginia. Reserved capacity blocks price the same instance at 34.608 in that region and 31.464 in Mumbai, Tokyo, London and several others, a discount of roughly 37 to 43 percent in exchange for committing to a fixed window scheduled in advance. Spot capacity is cheaper again but can be reclaimed with short notice, which is survivable for a job that checkpoints and fatal for one that does not. Commitment plans discount steady baseline usage over one or three years.

Operating system charges are a small trap worth naming. Linux carries no additional charge on capacity blocks, while Red Hat Enterprise Linux adds 1.8432 dollars per instance hour on the P5 family. Across a 192 instance hour reservation that is 354 dollars of pure licensing on top of the compute, which is the kind of line item that appears in month two and surprises somebody. AWS publishes a worked example on exactly this: four p5.48xlarge instances reserved for 48 hours at 31.464 dollars comes to 6,041.09 in reservation fee, plus 346.52 for Red Hat usage across 188 instance hours, for 6,387.61 total.

Cost of one 40 hour training job, eight acceleratorsUS dollars, compute only, rates read 20 July 20262000100002202H100 on demand1384H100 reserved US1259H100 reserved Mumbai897A100 reserved, 76 hA100 bar assumes the same job takes 1.9 times longer and still lands 59 percent cheaper.
Older silicon running longer often wins on cost. It loses on schedule, which is a different conversation with a different owner.

Reading that chart, my verdict is that reserved capacity on the previous generation is the right default for scheduled retraining, and I would avoid on demand H100 for anything with a predictable cadence. Spot deserves a separate note. It suits hyperparameter sweeps beautifully, because each trial is independent and losing one costs you one trial. It suits a single long distributed run poorly, because reclamation of any one node halts everything. Checkpoint every few minutes and spot becomes viable even for long runs, and that engineering effort is normally the cheapest discount available to you.

Scaling out, and where returns stop

Adding accelerators to a job does not divide its duration proportionally. Data parallel training synchronises gradients across devices after each step, and that exchange grows with device count. Inside a single instance the interconnect is fast, and P5 instances give 900 GB/s of NVSwitch bandwidth between the eight GPUs, so intra node scaling stays efficient. Crossing to a second instance drops you onto the network, where even 3,200 Gbps of Elastic Fabric Adapter bandwidth is an order of magnitude slower than the internal fabric. That discontinuity is the single most important shape in distributed training economics.

Speedup and cost per epoch against GPU countData parallel training, one instance, measured on a mid sized model8x4x01 GPU2 GPUs4 GPUs8 GPUsideal linear speedupmeasured speeduprelative cost per epoch, 1.00 to 1.38Eight GPUs finish 5.8 times faster and cost 38 percent more per epoch than one.
Scaling out buys wall clock time and sells cost efficiency. Know which of the two your deadline is made of.

Two practical rules follow. Fill one instance before reaching for a second, because the interconnect inside the box is free relative to the network between boxes. And measure scaling efficiency on your actual model before committing to a cluster size, because efficiency depends on the ratio of computation to parameters, and a model with many small layers behaves quite differently from one with few large ones. I have seen efficiency at eight GPUs range from 0.51 to 0.94 on models of similar parameter count, and no rule of thumb would have predicted either.

War story

Our churn retraining job took three hours and ten minutes on a single A100, so I approved a move to four GPUs to bring the nightly window under an hour. Duration fell to two hours and fifty one minutes. Nine minutes, for four times the hardware. A profile I should have run first showed the accelerator idle 91 percent of the time while a pandas feature build ran on one CPU core, exactly the pattern described earlier in this part. We pushed that transformation into the warehouse, and the same job on the original single GPU dropped to 41 minutes. Cost per retrain went from about 37 dollars to just under 8. I had spent two weeks negotiating capacity for a problem that a profiler would have diagnosed in four minutes, and the wrong turn was mine: I treated a slow job as a hardware shortage without evidence. Now nobody on my teams requests more accelerators without attaching a utilisation trace.

Inference economics on the churn platform

Training is a burst. Inference is a tenancy. A model that trains for forty hours once a month and then serves predictions continuously will spend the large majority of its lifetime cost on serving, and yet almost every sizing discussion I sit in spends its energy on the training side. Part 22 covered the serving patterns; here is what they cost.

Serving patternCompute heldUSD per monthFreshness delivered
Nightly batch scoring, CPU4 vCPU for 22 minutes a day3Up to 24 hours old
Hourly micro batch, CPU4 vCPU for 3 minutes an hour9Up to 60 minutes old
Real time endpoint, CPU, two replicas2 x 2 vCPU always on1,150Current at request time
Real time endpoint on one L41 accelerator always onabout 570Current, and unnecessary for this model
Churn scoring for roughly seven thousand customers. Freshness is the only thing the extra 1,147 dollars a month buys.

Sit with the gap between rows one and three for a moment. Nearly four hundred times the cost, for a freshness improvement that a retention team contacting customers on a weekly cycle cannot use. That is the most expensive unexamined assumption in applied machine learning, and it is usually made in the first design meeting by someone saying that predictions should obviously be real time. Ask what happens to the prediction after it is made. If a human reads it tomorrow, batch.

Where an accelerator is genuinely needed at serving time, which for us means the text classification work on support tickets rather than churn itself, throughput per dollar is the metric and batching is the lever. Grouping requests raises latency slightly and raises throughput a great deal, because the fixed overhead of a forward pass is amortised across the batch. An L4 at 24 gigabytes and 72 watts serves quantised models at a fraction of the cost of a training class part, and quantisation to eight bit integers commonly halves memory again with accuracy loss small enough to be lost in the noise of a business metric. One caution worth stating: measure that accuracy loss on your own data rather than trusting a published benchmark, because the tolerance depends entirely on how the prediction is used. Note also that the heavy preprocessing an analyst does, of the kind covered in cleaning messy data for analysts, belongs on cheap CPU capacity upstream and never inside a GPU serving path.

Compute plan I would fund for the churn platform

Concretely, for the platform designed in Part 27 running the churn workload and a small amount of text work alongside it: no accelerator for the churn model at all, since gradient boosting on seven thousand rows trains in under a minute on four CPU cores. One L4 for the text and embedding work, sized by memory rather than by throughput. Batch scoring by default, with a real time path only for the cancellation page where a session bound action genuinely consumes the score. Capacity blocks on previous generation hardware for any occasional larger training, booked to a window we have enough experiments to fill. Spot for hyperparameter sweeps, because losing a trial costs a trial.

What I would avoid, stated plainly: an always on GPU endpoint for a tabular model, an eight GPU instance held for exploratory work, current generation silicon bought for a job whose bottleneck has not been profiled, and any reservation window longer than the queue of experiments waiting to fill it. Each of those looks like capability in a budget request and reads as waste in a quarterly review.

Underneath all of it sits one governance habit that costs nothing. Publish utilisation alongside spend, on the same dashboard, refreshed at the same cadence. Spend without utilisation produces pressure to buy cheaper hardware. Utilisation without spend produces pressure to buy more hardware. Together they produce the only question worth asking, which is whether the money already committed is doing work. Part 29 takes the same platform into responsible AI, model risk and governance that survives an audit, where the constraint stops being money and starts being defensibility. Before you read it, go and look up the mean GPU utilisation on whatever your organisation is currently paying for. If you cannot find the number in ten minutes, that is the finding.

Data Science Series · Part 28 of 30
« Previous: Part 27  |  Guide  |  Next: Part 29 »

References

About The Author


Discover more from Journal of Intelligent Infrastructure – By Dr Pranay Jha

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Architect’s Toolkit

About the Author

Dr. Pranay Jha is a Cloud and AI Consultant with 18+ years of experience in hybrid cloud, virtualization, and enterprise infrastructure transformation. He specializes in VMware technologies, multi-cloud strategy, and Generative AI solutions. He holds a PhD in Computer Applications with research focused on Cloud and AI, has published multiple research papers, and has been a VMware vExpert since 2016 and a VMUG Community Leader.

Discover more from Journal of Intelligent Infrastructure - By Dr Pranay Jha

Subscribe now to keep reading and get access to the full archive.

Continue reading