Share GPUs and the queue
A server's GPU is shared by many people's training runs, workspaces and test serving. After reading this page you can read wait reasons and tell why your run is waiting. It also covers reordering your own runs and asking for an urgent run to move to the front. Knowing how the server guards memory helps you find the cause quickly when a run stops suddenly.
How the server shares the GPU
Section titled “How the server shares the GPU”qgon does not slice GPU memory per run. Runs and programs on the same GPU share its memory and compute time, so they can slow each other down. Two mechanisms protect the server instead. Before a run on the queue starts, auto-assign checks the free memory. During runs, when memory is about to run out, the memory guard stops whatever started using the GPU most recently.
The server memory bar at the top of Build › Scheduling shows the current state. Memory used by training runs and workspaces, other memory use and the free memory sit on one bar. A serving segment appears while serving is running, and the memory guard threshold appears on servers where the guard actually stops processes. The Running tab shows each run's current and peak GPU memory (measured). Measurements are a few seconds apart, so very short peaks are sometimes missed.
Every user sees the memory bar, training runs and serving. Admins see all workspaces by name. Members see by name only the workspaces they belong to, and the rest as one 'other workspaces' line.


Auto-assign
Section titled “Auto-assign”On a server with auto-assign on, the gpu queue is an intake queue. Runs do not start as soon as they are queued. The server checks conditions for the run at the front and starts runs one by one.
- There must be an idle GPU agent.
- If the run's expected memory is known, it starts when free memory is at least the expected memory plus the memory guard threshold.
- If the expected memory is unknown, free memory must be at least twice the threshold. It also waits for the run started just before to settle. In this case runs start one at a time.
Expected memory is the peak that runs of the same family actually used before. Runs created by re-run, resume training or requeue, and recent runs by the same author with the same name in the same project, count as the same family. A run's first time has no expected memory.
Later runs do not overtake earlier ones. If the run at the front waits for memory, the runs behind it wait too (runs waiting for team quota are the exception, see below). If no run is using the GPU at all, the front run starts even when memory looks short. This keeps workspaces or serving that hold memory from blocking every start.
The server admin turns auto-assign on. To check whether it is on, look at the Scheduling page or run qgon queue status. If the first line starts with 배차: 켜짐 (the CLI prints Korean), auto-assign is on. On a server with it off, the next run starts as soon as an agent is free, without a memory check. Team quotas, automatic requeue after low memory, and GPU yields also work only when auto-assign is on.
The total time limit of a hyperparameter search includes the time trials spend waiting for memory. When the server is busy, give a generous time limit or run fewer trials at once.
Read wait reasons
Section titled “Read wait reasons”Each run in the Scheduling Waiting tab shows why it is waiting.
| Label | Meaning |
|---|---|
| Waiting for memory · needs N / M free | Free memory is less than this run is expected to use. It starts when runs ahead finish and free memory |
| Waiting for an agent | No GPU agent is free. It starts when a running job finishes |
| Waiting for a start gap | Expected memory is unknown, so it waits until the run started before it settles |
| Waiting in line | Runs ahead in the queue start first |
| Checking memory | It checks how much memory the run that just started uses, then starts the next one |
| Waiting for memory reading | The GPU memory reading is missing or out of date, so it waits for a fresh one |
| Retrying queue hand-off | It could not hand the run to the run queue and is retrying. Tell an admin if this keeps happening |
| Team quota · team name … / Waiting for team quota | The team has used up its quota. Runs of other teams show only 'Waiting for team quota', without the team name |
If the run at the front waits for memory for more than 10 minutes, admins are notified.
Memory guard
Section titled “Memory guard”On servers where the GPU and CPU share one memory (unified memory), GPU memory requests are not held by the memory limits of workspaces or jobs. Left alone, one program could use up the server memory and freeze the whole server.
When available memory drops below the threshold, the memory guard picks the workspace, training run or serving that started using the GPU most recently and stops the GPU processes in it. If memory is still short, it stops the next most recent one. The threshold is a server setting. The default is the larger of 12GB and 10% of server memory.
This rule protects the runs that started first. The one that started last is not guaranteed to be the one using the most memory. On the stopped side you see the following.
- A workspace program ends with "Killed" (exit code 137). A notebook reports that its kernel died. The workspace itself and its files stay as they are.
- A run sent to a queue ends as failed and the owner gets a notification. If conditions are met, it is requeued from its checkpoint on its own. The conditions are under 'When runs resume on their own' in Checkpoints and resume.
Before running again, check whether other GPU runs have finished and whether a smaller batch size can lower memory use. On servers where each GPU has its own memory, the memory guard does not stop anything and only records.
Each workspace chooses a GPU mode: none, dedicated or shared. Shared mode does not split GPU memory either and gets the same memory guard. The workspace GPU mode does not apply to runs sent to a queue. Auto-assign starts those runs based on server memory. Workspace settings are in Workspaces and environments.
Reorder the queue
Section titled “Reorder the queue”What you can do depends on who you are.
- Members reorder their own waiting runs among themselves. Moving one up swaps it with the nearest of your runs ahead of it. Other people's runs stay where they are. For example, if your runs are at 2 and 5 and 3 and 4 belong to others, moving 5 up puts it at 2 and the run that was at 2 goes to 5.
- Team leads reorder runs of their team among themselves.
- Admins move any run up or down one place, to the front or to the back.
There is no moving to an arbitrary place, such as 'in front of X'. In the UI, use Changing the order in the Scheduling Waiting tab. You can do the same from the command line or code.
qgon queue ls # gpu queue: position, job, owner, marks, wait reason, and running jobsqgon queue move 3fa8c2d1 --up # swap with the nearest of your runs aheadqgon queue move 3fa8c2d1 --swap 9b01e7aa # swap with your run right before or after itqgon queue status # auto-assign, free memory, wait reasons, yield statefrom qgon import queue as q
o = q.order() # {"queue", "admin", "entries": [...]}mine = [e["task_id"] for e in o["entries"] if e["mine"]]q.move(mine[-1], "up")st = q.status() # wait reasons, running, yieldsWrite a job as its 32-character id, or just its first 4 or more characters if that is unique. Choose another queue with qgon queue ls QUEUE or --queue QUEUE. The command exits with 0 on success, 1 if the server refused or could not be reached, and 2 on a usage error or missing configuration. With --json, the result is one JSON line. In Python, a server refusal comes as q.QueueError (message, status, code) and an argument error as q.QueueUsageError.
If the queue changes while you move a run, for example because an agent took a run, you are asked to refresh and try again. One person can reorder up to 30 times a minute. In the list members see, other people's runs have their names hidden and show only position and wait reason.
Urgent requests
Section titled “Urgent requests”If one of your runs must start before other people's runs, send an urgent request to the admins. In the UI, click Urgent request on your waiting run and enter a reason.
qgon queue urgent 3fa8c2d1 --reason "Results needed for tomorrow morning's review"qgon queue urgent ls # your requests and their state (admins see all)qgon queue urgent cancel 12 # cancel before it is handledfrom qgon import queue as q
r = q.urgent("3fa8c2d1", reason="Results needed for tomorrow morning's review")q.urgent_requests("all") # pending, approving, approved, rejected, cancelled, allq.cancel_urgent(r["id"])- Write the reason as one line of up to 200 characters.
- Sending a request notifies all admins. If an admin approves, the run moves to the front with an urgent mark. If rejected, the order stays the same. The requester is notified of the result.
- One person can have up to 3 open requests, and one run can have one. You can send up to 10 an hour, and cancelled requests count too.
- When the run starts or leaves the queue, its open request is cancelled on its own. If the same run is queued again later, the urgent mark is gone.
Admins approve or reject in the Scheduling page, or use qgon queue urgent approve 12 --note "…" and qgon queue urgent reject 12.
Waiting for team quota
Section titled “Waiting for team quota”On a server with teams, when an admin sets per-team quotas for concurrent runs or total memory, runs over the quota wait with the 'team quota' reason. Such runs do not block the runs behind them. They are released only when a run of the same team finishes, so other teams' runs sometimes start first. Within a team the order stays the same.
Choose which team a run counts toward with qgon run --team or the Quota team field on the New run screen. Otherwise a run sent from a team workspace counts toward that team, and other runs toward your primary team. Setting quotas is covered in Teams and quotas.
Request a GPU yield
Section titled “Request a GPU yield”Ask a GPU run that is already running to save a checkpoint and make room on the GPU. In the UI, do this in the Scheduling Running tab.
- Admins can request it for any running GPU run. They also choose the Yield to run (an urgent run in the queue) that takes the place. If left empty, the first run in the queue is the target. The run's owner is notified.
- Owners can yield their own runs. The run saves a checkpoint and lines up again at the back of the queue.
- A run that yielded at an admin's request becomes a new run that resumes from its last checkpoint, and lines up right behind the target. If the target has already started, it goes to the front.
- Only runs whose code saves checkpoints are marked yieldable. Runs without the mark can only be handled by an admin with Force stop and requeue. With a checkpoint the run resumes from there, without one it trains from scratch.
- If the run does not end within the deadline (5 minutes by default on the server), the server stops it by force.
- The requester, an admin or the owner can cancel a request, but only before the SDK starts ending the run. Only admins can cancel forced requests.
- One run can have only one open request. One person can send up to 10 requests an hour.
- Hyperparameter search and pipeline controllers, and their trials and steps, cannot be asked to yield.
qgon queue yield 5c77e0a9 --reason "Make room for an urgent evaluation run"qgon queue yield 5c77e0a9 --cancel # cancel the requestqgon queue yield 5c77e0a9 --for 3fa8c2d1 # admin: make room for this urgent runqgon queue yield 5c77e0a9 --force # admin: force stop and requeue even without the yieldable markHow training code responds to a yield request is in Checkpoints and resume.
Using it inside a workspace
Section titled “Using it inside a workspace”qgon queue and qgon.queue in a workspace terminal or notebook use that workspace's key. With this key, admin actions do not work even from an admin account. These include approving or rejecting urgent requests, moving to the front or back, and --for and --force on yields. The reason is that other members of the same workspace can read that key.
Do admin actions in the Scheduling page, or call the REST API with a token from your own API key made in Settings › API credentials. See REST API for how to get a token.
BASE="http://<server address>:<web port>"curl -sS -X POST "$BASE/qgon-api/queues/urgent-requests/12/approve" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"note": "approved"}'On a server where access from outside is set to 'Read-only' or 'Read + basic actions', reordering and urgent requests do not work from outside the internal network. Viewing the order still works. Access levels are in Security and access.
Who can do what
Section titled “Who can do what”| Action | Member | Team lead | Admin |
|---|---|---|---|
| See queue order and wait reasons | Yes (others' runs without names) | Yes | Yes |
| Move up or down one place | Own runs | Team runs | Any run |
| Move to the front or back | No | No | Yes |
| Send or cancel urgent requests | Own runs | Own runs | Yes |
| Approve or reject urgent requests | No | No | Yes |
| Request a yield | Own runs | Own runs | Any run, with target, forced |
| Stop running jobs | Own runs | Team members' runs | Any run |
Reordering, urgent requests and their handling, and yield requests are all recorded in the action log.