← blog
performancegpuinfrastructurecostlocal-first

You probably don't need a GPU for that workload

Reaching for a GPU is usually sizing for the workload you imagine, not the one you have. A test for whether you need a GPU, and why the answer is often your laptop.

The holographic agent running steadily on a laptop-sized slab. Beside the slab, an oversized, dark, and idle GPU tower sits in the void

Someone on the team says the job is slow, and the next sentence is about a GPU. Or a bigger instance, or a cluster, or a managed service with an hourly rate that makes you blink. The reflex is automatic now: work is slow, so throw hardware at it, and the biggest hammer in the room is the GPU. Most of the time, you do not need it, and reaching for it hides the actual problem instead of solving it.

A GPU is very good at one narrow thing: the same simple operation applied to enormous amounts of data in parallel, over and over. Dense matrix math on millions of elements. If that is genuinely your bottleneck, a GPU is a miracle. But look honestly at the job in front of you. Is it that shape? Or is it a few thousand rows, a pile of string handling, a database call it spends most of its time waiting on, some branching logic that does not vectorize at all? Because that work does not get faster on a GPU. It gets more expensive and harder to deploy, at exactly the same speed.

You sized for the workload you imagined

Here is where the reflex comes from. You sized your infrastructure for the workload you pictured, not the one you have. In your head the data is millions of records streaming in real time, the model is serving thousands of requests a second, scale is the whole problem. In reality it is a nightly batch over a table that fits in memory, and it runs while everyone is asleep.

The distributed-systems world learned this the hard way years ago. There is a famous demonstration that a handful of Unix commands on a laptop beat a seven-node Hadoop cluster by more than two hundred times, on a real task, because the dataset was small enough that the cluster spent all its effort coordinating instead of computing. The GPU version of that mistake is quieter but just as common. You pay for the accelerator, the specialized runtime, the cold starts, the vendor you are now locked into, and the data you have to ship to where the GPU lives. You pay all of it up front, whether or not the GPU was ever your bottleneck.

The test before you reach for a GPU

Before you provision anything, do the boring measurement. Profile the job and find where the time actually goes. If it is waiting on IO or a database, a GPU changes nothing. If it is memory-bound, a GPU changes nothing. If it is a few thousand items, the whole thing probably finishes on one CPU core before a cloud GPU instance would have finished booting. Only if you find a genuine, parallel, compute-bound hot loop over a lot of data does the GPU even enter the conversation.

This is not anti-GPU. Real GPU workloads exist, and for them nothing else comes close. It is anti-cargo-cult. The default of "it is slow, get a GPU" skips the one step that tells you whether the answer is a GPU, a better query, or a tool that just runs on your machine and is done. Measure first. The hardware you need is usually smaller than the hardware you fear you need.

A GPU does not make slow code fast. It makes one specific kind of slow code fast, and most of your code is not that kind.

share