Control the Capacity of Taskers: Slots and Cores
The resources of a tasker include SLOTS, SLOTSTOTAL, CORES and CORESTOTAL.
For example, a machine with 8 cores is normally assigned the following resources:
- CORESTOTAL#8
- The physical number of cores in the machine.
- CORES/8
- A consumable resource to represent the number of available cores on the tasker.
- SLOTSTOTAL#8
- The total number of slots available. Most jobs use only 1 slot, although you can submit jobs that request more than 1 slot.
- SLOTS/8
- A consumable resource indicating the number of available slots in a tasker.
A simple single-threaded job consumes 1 slot and 1 core. A multi-threaded job may consume 2 or more cores, but conventionally it is assumed that each job consumes only 1 slot.
Persistent Capacity Configuration
- -capacity or -cpus option to vtk_tasker_define
- -T or -C option to vovtasker
- Including SLOTS/N in the tasker resource specification or the vovtasker command line, where N is a positive integer number.
Refer to Tasker Attributes for more details about these methods.
Live Capacity Configuration
The behavior of manually overriding vovtasker cores and capacity has been improved. By default, the capacity follows the core count, but it can also be manually set via the -T option or by defining the SLOTS/N consumable resource via the -r option, where N is a positive integer. In all cases, the capacity directly affects the number of slot licenses that will be requested.
% nc cmd vovtaskermgr configure -resources SLOTS/4 lnx123
% nc cmd vovtaskermgr configure -capacity 4 lnx123
% nc cmd vovtaskermgr configure -resources "SLOTS/4 SLOTSTOTAL#4 CORES/4 CORESTOTAL#4" lnx123
Refresher: Submit Multi-threaded Jobs
% nc run -r SLOTS/1 CORES/4 License:abc -- my_mt_job
% nc run -r SLOTS/1 CORES/4 License:abc -fstokens 4my_mt_job
Stopped Tasker's Effect on a Newly Started Tasker
When a tasker has been requested to stop gracefully (allowing jobs to finish before exiting), it is suspended from scheduler consideration and its capacity is set to 0. If the same tasker is started on the same host before the stopped tasker exits, the slots consumed by the still-running jobs on the stopped tasker will be counted and deducted from the total slot capacity of the newly started tasker. This helps prevent overloading the machine on which the taskers are running.