Cores, Slots and CPUs
The History of Cores, Slots and CPUs
In the beginning, Accelerator only had CPUs, the number of central processing units in a system that are known as "processors" in Linux systems. Initially, each single-threaded job required one CPU. A machine with two CPUs could run two single-threaded jobs.
Today, because multi-threaded jobs are now commonly used, Accelerator now distinguishes between slots and cores. The terminology has been updated accordingly.
A CPU may contain many cores; the number of single-threaded jobs that can be run on a machine is related to the number of cores not the number of CPUs. The term "CPU" now indicates the "physical package that contains the cores", which is also known as a "socket".
CPUs become Cores and Slots
% nc run sleep 10 ;# Implicit
% nc run -r CORES/1 SLOTS/1 -- sleep 10 ;# Explicit
For backwards compatibility, the request for CPUs/1 maps directly to cores/1.
% nc run -r CPUS/2 -- myjob ;# Backwards compatibility
% nc run -r CORES/2 -- myjob ;# Correct submission
A multi-threaded job takes advantage of multiple cores. To avoid overloading a machine, it is good practice to request the correct number of cores when submitting a job.
% nc run -r CORES/4 RAM/8000 License:abc -- my_4_threaded_job
Because each core can run one job and each job takes one "slot", it is also considered good practice to request the same number of slots as cores. However, this is not critical, as this normally does not impact the scheduling of jobs.
% nc run -r CORES/4 SLOTS/4 RAM/8000 License:abc -- my_4_threaded_job
Alternative Way to Configure Taskers
An administrator can configure a tasker with any number of cores and slots; jobs can be submitted that request a number of slots that is different from the requested number of cores. This method is recommended only for advanced, experienced users.
% vovtasker -r "CORES/22 SLOTS/13" -a my_atypical_tasker