← Course contents · Part 4

· Visual lesson · Session 31 of 56


How does a job get its GPUs?

A scheduler assigns resources to jobs. It needs to find the right arrangement of GPUs, not just a large enough total.

Picture the idea

Four free does not mean four together

Server A · four GPUs

3 free + 1 allocated

Server B · four GPUs

1 free + 3 allocated

Job needs 2 on one server

Fits on A

Job needs 4 on one server

Must wait under this requirement

Fictional placement example. Total free capacity hides its shape.

Count and placement both matter

A job may require a GPU type, memory capacity, CPU resources, and several GPUs on the same server.

Four free GPUs scattered across four servers cannot satisfy a request for four on one server. This is fragmentation: free capacity exists in the wrong shape.

Some distributed jobs need their participants allocated together. That requires suitable scheduler support and configuration.

Different schedulers use different models

Slurm commonly manages queued batch work. Kubernetes schedules Pods and can expose GPU resources through device plugins and other supported mechanisms.

Whichever you use, distinguish physical GPUs from partitions or sharing slots. An allocation is not proof that useful work is running.

Try it yourself

Server A has three free GPUs. Server B has one. Can jobs needing two or four GPUs on one server start?

Check your answer

The two-GPU job fits on A. The four-GPU job cannot start under that constraint, even though four are free overall.

Sources and further reading

← All sessions