Qube!'s reservation system is important for correct management of host resources. This is accomplished with the relationship between reservations and resources.
Each host has a list of resources including system resources such as memory and number of processors. It also includes user-specified resources. Resources are integer based (meaning '1' and '99' are valid resource counts; 'a' and '4.5' are not) and automatically decrement/increment upon acceptance of a job. Reservations are used to reserve these resources prior to execution of a job. These resources are always numeric and are integer based. A resource can be defined "discovered" by either the system (eg, or the administratornumber of cores) or defined by admins (eg, number of licenses).
The user must know where whether the resource is located. Examples of this include global and host resources. The global resource is tracked in the entire system. For example, it can be used to simulate tracking of licensesglobal or host-based (see System-Wide Resource Tracking). Global resources are tracked through the entire system, for example, license tracking. A host resource is local and specific per host.The format of this string isto each host, for example the number of cores.
Resources are defined and reserved through this syntax:
type.name=quantity[,[type.name=quantity…]
Examples
Reserves 200MB of memory on the host
% qbsub --reservations "host.memory=200" set
Reserves at least 1 processor and up to all processors on a host
% qbsub --reservations "host.processors=1+" set
Reserves from 1 to 20 processors on a single host
% qbsub --reservations "host.processors=1-20" set
Reserves a global resource called maya
%
qbsub --reservations "global.maya=1" "maya -batch -render ...."
...
This is set on the Supervisor (for global resources, see supervisor_global_resources), on the host (for host-based resources, see worker_resources) and/or in the job submission UI in the reservations field.
Specifying Quantity
Syntax | Meaning |
---|---|
host.processors=1+ |
...
Dispatch to a worker with at least 1 open slot, then occupy all currently open slots. |
...
The general form is host.processors=N+, where N is a positive integer |
...
. |
...
host.processors=1* |
...
Dispatch to a worker with at least |
...
1 open |
...
slot and no used slots (i.e. worker must be idle!), then occupy all currently open slots. |
...
The general form is host.processors=N*, where N is a positive integer |
...
...
host.processors=all |
...
Equivalent to |
...
host.processors=1* |
...
...
host.processors=N |
...
-M | Dispatch to a worker with at least N to M open slots. Upon being dispatched to a worker, it occupies as many slots as it can, up to M, as slots |
...
become available. |
Info |
---|
New in Qube! 6.5 Qube! 6.5 allows for a more "dynamic" evaluation of the "host.processors=1+" or "host.processors=4-8" style of reservations. A "1+" reservation used to mean "all the slots", but there was no way to know how many slots it was allocated; there could be a 2-slot job already running on an 8-slot worker, and then the 1+ would just assume that it was getting all 8 slots and the worker would be over-scheduled for as long as both the 2-slot and the 1+ job were running at the same time. With Qube! 6.5, the reservations as evaluated on each worker at the time the job instance starts on the particular worker. So in the above example, the 2-slot job has already been allocated 2 worker slots, and when the 1+ instance starts, it's allocated the remaining 6 slots. |
Relevant environment variables
...
Dynamic Thread Assignment
When a 1+ or similar job picks up on a Worker, we don't know how many slots were available or assigned to that instance. That number is made available dynamically in the running job's environment as an environment variable, QB_JOBSLOTS=6
, (or whatever the value) and stored in the Qube! database in the job's subjob table as "allocations". One use of this could be that the job references $QB_JOBSLOTS on the command line to specify the number of threads a renderer should use.
See Also
...
Examples
Reservation | Explanation |
---|---|
"host.memory=200" | Reserve 200MB of memory on the host |
"host.processors=1+" | Reserve all processors on a host, but at least 1 must be available in order to start |
"host.processors=1-20" | Reserve 20 processors on a single host, but at least 1 must be available in order to start |
"global.maya=1" | Reserve a global resource called maya |
See Also
supervisor_global_resources
worker_resources
System-Wide Resource Tracking