Moves, suspend and resume
What Fluid does on its own
The policies that act on a running job without being asked, their defaults, and what Fluid never does.
Warnings and limits
- Fluid moves a running single-machine job to a cheaper offer on its own when the saving is at least 20% and at least 3 times the move's cost. Turn it off per job with
--no-cheaper, or for everyone in Settings. - A single-machine job is suspended after 30 minutes idle (no progress and CPU under 5% of a core) and stopped after 72 hours of running time. Both are on by default.
- An idle job can only be suspended if its program can be paused. A program that sits in one long call (
time.sleep(3600), a wait on input or on a socket, ajoin) cannot. Fluid tries for 2 minutes, then says once in the job's events that the job is idle and runs on, with its price. Stop it withfluid stop JOB, or setidle.actiontostopto have idle jobs stopped instead of suspended. A job started with--ranksthat has a checkpoint is suspended on that checkpoint instead. - The time limit (
ttl, 72 hours by default) counts the time machines run the job; a suspended job is not stopped by that count. While suspended, the same number of hours counted on the clock from the job's creation ends it instead, with its checkpoint kept 7 days forfluid resumeto continue it; and its checkpoint expires 3 days after the suspension by default, when the job fails. See Suspend and resume. - A job started with an exact
--onis pinned: no cheaper, return or resizing moves, and no move off spot for its state size (it is warned instead). Notices, out-of-memory rescues, provider time limits, budgets, idleness and the time limit still apply. - A single-machine job running on spot whose measured state grows past what its machine's notice can save is moved to an on-demand machine (
spot.move_when_over, on by default), and a spot offer whose notice cannot save a job's measured state is left out of that job's later placements. Every 10 minutes Fluid also checks whether a checkpoint could carry the job's state and warns when it could not; it never moves a job for that, since such a job cannot be moved. See Spot interruptions and checkpoints. - Fluid never resumes a suspended job on its own, never powers off your own machine, never requests quota and never spends past a connection's cap.
- Every move and suspension checks whether the checkpoint can carry the job's state. A value it cannot carry prevents the handoff. On a G2 Spot notice, a failed handoff ends the group.
The policies
Fluid checks each running job regularly. The full policy list below applies to single-machine jobs. Multi-node jobs enforce their time limit, leases and compute budget across the group. Google Cloud G2 Spot groups also support the Spot notice action.
| Policy | Default | What it does |
|---|---|---|
| ttl | on, 72 hours | stops a running job after this much running time (time suspended does not count); ends a suspended job this many hours after its creation on the clock, its checkpoint kept 7 days for a resume to continue it |
| spot | on | checkpoints and suspends a single-machine job on notice, or moves it to on-demand if its state outgrows the notice window (move_when_over). A notice on any G2 Spot group member allows one move of all ranks on the same pinned Spot route before the earliest deadline. See G2 Spot groups. |
| budget | on | suspends the job a little before its budget is spent (or stops it, if set to) |
| oom | on | on a recoverable out-of-memory error, checkpoints and suspends the job |
| idle | on, 30 minutes | suspends a job that made no progress and used under 5% of a CPU core for that long |
| lifetime | on, 30 minutes | checkpoints and suspends a single-machine job 30 minutes before the provider's limit (24 hours for Modal and Azure Container Apps, 24 hours by default for Google Cloud VMs). For a Google Cloud GPU group, request a live move before the first VM expires |
| lease | on | keeps each machine's hard stop about an hour ahead, renewed every 10 minutes |
| return | on | while a job runs off spot, looks every 10 minutes for a spot offer and moves there when it saves at least 20% and 3 times the move's cost |
| cheaper | on | looks every 10 minutes for a cheaper offer and moves there on the same terms |
| rightsize | on a move | when the job moves, sizes CPU and memory from its measured peaks with 1.3 times headroom, never below what it asked for |
After a move, a single-machine job waits 30 minutes before the next return or cheaper look. Its placements exclude a reclaimed Spot pool for 30 minutes. Every decision is in fluid explain JOB.
Set them for every job in the console's Settings, per project in portal.yaml, or per job with fluid run flags. See Settings and Run a job.
What Fluid never does
- Resume a suspended job on its own. You choose when and where to resume a suspended job. Its time limit keeps counting on the clock while it waits.
- Power off or reboot your own machine. Stopping a job there ends only the job.
- Request quota, or change your account's limits or access.
- Spend past a connection's cap. A machine whose worst-case cost would pass the cap is refused, and a running job is suspended when the cap would be reached.
- Keep a machine without a hard stop. Every machine has a lease that ends it if Fluid stops renewing it.
- Delete your data in your cloud. It terminates only the machines it started and tagged.