Allocations and compute scheduling

From Alliance Doc
Jump to navigation Jump to search
This site replaces the former Compute Canada documentation site, and is now being managed by the Digital Research Alliance of Canada.

Ce site remplace l'ancien site de documentation de Calcul Canada et est maintenant géré par l'Alliance de recherche numérique du Canada.

Other languages:


Parent page: Job scheduling policies

Allocations for high-performance computing[edit]

An allocation is an amount of resources that a research group can target for use for a period of time, usually a year. This amount is either a maximum amount, as is the case for storage, or an average amount of usage over the period, as is the case for shared resources like computation cores.

Allocations are usually made in terms of core years, GPU years, or storage space. Storage allocations are the most straightforward to understand: research groups will get a maximum amount of storage that they can use exclusively throughout the allocation period. Core year and GPU year allocations are more difficult to understand because these allocations are meant to capture average use throughout the allocation period---typically meant to be a year---and this use will occur across a set of resources shared with other research groups.

The time period of an allocation when it is granted is a reference value, used for the calculation of the average which is applied to the actual period during which the resources are available. This means that if the allocation period was a year and the clusters were down for a week of maintenance, a research group would not be entitled to an additional week of resource usage. Equally so, if the allocation period were to be extended by a month, research groups affected by such a change would not see their resource access diminish during this month.

It should be noted that in the case of core year and GPU year allocations, both of which target resource usage averages over time on shared resources, a research group is more likely to hit (or exceed) its target(s) if the resources are used evenly over the allocation period than if the resources are used in bursts or if use is put off until later in the allocation period.

From compute allocations to job scheduling[edit]

Compute-related resources granted by core-year and GPU-year allocations require research groups to submit what are referred to as jobs to a scheduler. A job is a combination of a computer program (an application) and a list of resources that the application is expected to use. The scheduler is a program that calculates the priority of each job submitted and provides the needed resources based on the priority of each job and the available resources.

The scheduler uses prioritization algorithms to meet the allocation targets of all groups and it is based on a research group’s recent usage of the system as compared to their allocated usage on that system. The past of the allocation period is taken into account but the most weight is put on recent usage (or non-usage). The point of this is to allow a research group that matches their actual usage with their allocated amounts to operate roughly continuously at that level. This smooths resource usage over time across all groups and resources, allowing for it to be theoretically possible for all research groups to hit their allocation targets.

Consequences of overusing a CPU or GPU allocation[edit]

If you have jobs waiting to run, and competing demand is low enough, then the scheduler may allow more of your jobs to run than your target level. The only consequence of this is that succeeding jobs of yours may have lower priority for a time while the scheduler prioritizes other groups which were below their target. You are not prevented from submitting or running new jobs, and the average of your usage over time should still be close to your target, that is, your allocation.

It is even possible that you could end a month or even a year having run more work than your allocation would seem to allow, although this is unlikely given the demand on our resources.

Reference GPU Units[edit]

Light-bulb.pngThis is a new unit that will be used from RAC 2024.


As you may be aware, the performance of GPUs has dramatically increased in the recent years and is expected to do so again with the upcoming next generation of GPUs. Until RAC 2023, in order to reduce complexity, we have been treating all GPUs as equivalent to each other at allocation time and when considering how many resources groups have consumed. This has raised issues of fairness, both in the allocation process and while running jobs. We cannot continue to treat all GPU types as the same.

To overcome the fairness problem, we have defined a reference GPU unit (or RGU) in order to be able to rank all GPU models in production. Because roughly half of our users use primarily single-precision floating-point operations (FP32), the other half use half-precision floating-point operations (FP16), and a significant portion of all users care about the memory on the GPU itself, we set the following evaluation criteria with their corresponding weight:

Evaluation Criteria Weight
(RGU)
FP32 score 40% * 4 = 1.6
FP16 score 40% * 4 = 1.6
GPU memory score 20% * 4 = 0.8

For convenience, weights are based on percentages up-scaled by a factor of 4 reference GPU units (RGUs). Then, by using the A100-40gb as the reference GPU model, we get the following scores for each model:

FP32 score FP16 score Memory score Weighted Score
Weight: 1.6 1.6 0.8 (RGU)
Model
P100-12gb 0.48 0.00 0.3 1.0
P100-16gb 0.48 0.00 0.4 1.1
T4-16gb 0.42 0.21 0.4 1.3
V100-16gb 0.81 0.40 0.4 2.2
V100-32gb 0.81 0.40 0.8 2.6
A100-40gb 1.00 1.00 1.0 4.0
A100-80gb* 1.00 1.00 2.0 4.8

(*) On Graham, 16 of these GPU models are available on three contributed GPU nodes. While all users can use them for short (<3h) jobs, they are not allocatable through the RAC process.

As an example, the oldest GPU model in production (P100-12gb) is worth 1.0 RGU. The next few generations of GPUs will be compared to the A100-40gb using the same formula.

Choosing GPU models for your project[edit]

The relative scores in the above table should give you a hint on the models to choose. Here is an example with the extremes:

  • If your applications are doing primarily FP32 operations, an A100-40gb GPU is expected to be twice as fast as a P100-12gb GPU, but the recorded usage will be 4 times the resources. Consequently, for an equal amount of RGUs, P100-12gb GPUs should allow you to run double the computations.
  • If your applications (typically AI-related) are doing primarily FP16 operations (including mixed precision operations or using other floating-point formats), using an A100-40gb will result in getting evaluated as using 4x the resources of a P100-12gb, but it is capable of computing ~30x the calculations for the same amount of time, which would allow you to complete ~7.5x the computations.

Starting from RAC 2024[edit]

  • During the Resource Allocation Competition 2024 (RAC 2024), any proposal asking for GPUs will require to specify the preferred GPU model for the project. Then, in the CCDB form, the amount of reference GPU units (RGUs) will automatically be calculated from the requested amount of gpu-years per year of project.
    • For example, if you select the narval-gpu resource and request 13 gpu-years of the model A100-40gb, the corresponding amount of RGUs would be 13 * 4.0 = 52. The RAC committee would then allocate up to 52 RGUs, depending on the proposal score. In case your allocation must be moved to Cedar, the committee would instead allocate up to 20 gpu-years, because each V100-32gb GPU is worth 2.6 RGUs (and 52 / 2.6 = 20).
  • For job scheduling and for usage accounting on CCDB, the use of reference GPU units will take effect on April 1st, 2024, with the implementation of RAC 2024.

Detailed effect of resource usage on priority[edit]

The overarching principle governing the calculation of priority on our national clusters is that compute-based jobs are considered in the calculation based on the resources that others are prevented from using and not on the resources actually used.

The most common example of unused cores contributing to a priority calculation occurs when a submitted job requests multiple cores but uses fewer cores than requested when run. The usage that will affect the priority of future jobs is the number of cores requested, not the number of cores the application actually used. This is because the unused cores were unavailable to others to use during the job.

Another common case is when a job requests memory beyond what is associated with the cores requested. If a cluster that has 4GB of memory associated with each core receives a job request for only a single core but 8GB of memory, then the job will be deemed to have used two cores. This is because other researchers were effectively prevented from using the second core because there was no memory available for it.

Cores equivalent used by the scheduler[edit]

A core equivalent is a bundle made up of a single core and some amount of associated memory. In other words, a core equivalent is a core plus the amount of memory considered to be associated with each core on a given system.

Figure 1 - Core equivalent diagram for Cedar and Graham.

Cedar and Graham are considered to provide 4GB per core, since this corresponds to the most common node type in those clusters, making a core equivalent on these systems a core-memory bundle of 4GB per core. Niagara is considered to provide 4.8GB of memory per core, making a core equivalent on it a core-memory bundle of 4.8GB per core. Jobs are charged in terms of core equivalent usage at the rate of 4 or 4.8 GB per core, as explained above. See Figure 1.

Allocation target tracking is straightforward when requests to use resources on the clusters are made entirely of core and memory amounts that can be portioned only into complete equivalent cores. Things become more complicated when jobs request portions of a core equivalent because it is possible to have many points counted against a research group’s allocation, even when they are using only portions of core equivalents. In practice, the method used by the Alliance to account for system usage solves problems about fairness and perceptions of fairness but unfortunately the method is not initially intuitive.

Research groups are charged for the maximum number of core equivalents they take from the resources. Assuming a core equivalent of 1 core and 4GB of memory:

  • Figure 2 - Two core equivalents.
    Research groups using more cores than memory (above the 1 core/4GB memory ratio), will be charged by cores. For example, a research group requesting two cores and 2GB per core for a total of 4 GB of memory. The request requires 2 core equivalents worth of cores but only one bundle for memory. This job request will be counted as 2 core equivalents when priority is calculated. See Figure 2.
  • Figure 3 - 2.5 core equivalents.
    Research groups using more memory than the 1 core/4GB ratio will be charged by memory. For example, a research group requests two cores and 5GB per core for a total of 10 GB of memory. The request requires 2.5 core equivalents worth of memory, but only two bundles for cores. This job request will be counted as 2.5 core equivalents when priority is calculated. See Figure 3.

Reference GPU unit equivalent used by the scheduler[edit]

Use of GPUs and their associated resources follow the same principles as already described for core equivalents, except that a reference GPU unit (RGU) is added to the bundle alongside multiple cores and memory. This means that the accounting for GPU-based allocation targets must include the RGU. Similar to how the point system was used above when considering resource use as an expression of the concept of core equivalence, we use a similar point system here as an expression of RGU equivalence.

Research groups are charged for the maximum number of RGU-core-memory bundles they use. Assuming a fictive bundle of 1 RGU, 3 cores, and 4 GB of memory:

Figure 4 - RGU equivalent diagram.


  • Research groups using more RGUs than cores or memory per RGU-core-memory bundle will be charged by RGU. For example, a research group requests 2 P100-12gb GPUs (1 RGU each), 3 cores, and 4 GB of memory. The request is for 2 bundles worth of RGUs, but only one bundle for memory and cores. This job request will be counted as 2 RGU equivalents when the research group’s priority is calculated.
Figure 5 - Two RGU equivalents.


  • Research groups using more cores than RGUs or memory per RGU-core-memory bundle will be charged by core. For example, a researcher requests 1 RGU, 5 cores, and 5 GB of memory. The request is for 1.66 bundles worth of cores, but only one bundle for RGUs and 1.25 bundles for memory. This job request will be counted as 1.66 RGU equivalents when the research group’s priority is calculated.
Figure 6 - 1.66 RGU equivalents, based on cores.


  • Research groups using more memory than RGUs or cores per RGU-core-memory bundle will be charged by memory. For example, a researcher requests 1 RGU, 2 cores, and 6 GB of memory. The request is for 1.5 bundles worth of memory, but only one bundle for GPUs and 0.66 bundle for cores. This job request will be counted as 1.5 RGU equivalents when the research group’s priority is calculated.
Figure 7 - 1.5 RGU equivalents, based on memory.


  • On the same fictive cluster, a bundle with one V100-32gb GPU, 7.8 CPU cores and 10.4 GB of memory is worth 2.6 RGU equivalents:
Figure 8 - 2.6 RGU equivalents, based on the V100-32gb GPU.


  • On the same fictive cluster, a bundle with one A100-40gb GPU, 12 CPU cores and 16 GB of memory is worth 4.0 RGU equivalents:
Figure 9 - 4.0 RGU equivalents, based on the A100-40gb GPU.


Ratios in bundles[edit]

Alliance systems have the following RPU-core-memory and GPU-core-memory bundle characteristics:

Cluster GPU model RGU per GPU Bundle per RGU Bundle per GPU Physical ratios
Béluga V100-16gb 2.2 4.5 cores / 21 GB 10 cores / 46.5 GB 10 cores / 46.5 GB
Cedar P100-12gb 1.0 3.1 cores / 25 GB 3.1 cores / 25 GB 6 cores / 31.2 GB
P100-16gb 1.1 3.4 cores / 27 GB 6 cores / 62.5 GB
V100-32gb 2.6 8.0 cores / 65 GB 8 cores / 46.5 GB
Graham P100-12gb 1.0 9.7 cores / 43 GB 9.7 cores / 43 GB 16 cores / 62 GB
T4-16gb 1.3 12.6 cores / 56 GB {4, 11} cores / 46.8 GB
V100-16gb* 2.2 21.3 cores / 95 GB 3.5 cores / 23.4 GB
V100-32gb* 2.6 25.2 cores / 112 GB 5 cores / 47.1 GB
A100-80gb* 4.8 46.6 cores / 206 GB {8, 16} c. / {62, 248} GB
Narval A100-40gb 4.0 3.0 cores / 31 GB 12 cores / 124.5 GB 12 cores / 124.5 GB

(*) These GPU models are available through a very few contributed GPU nodes. While all users can use them, they are not allocatable through the RAC process.

Note: While the scheduler will compute the priority based on the usage calculated with the above bundles, users requesting multiple GPUs per node also have to take into account the physical ratios.

Viewing group usage of compute resources[edit]

Navigation to View Group Usage

Information on the usage of compute resources by your groups can be found by logging into the CCDB and navigating to My Account > View Group Usage.

CPU and GPU usage by compute resource

CPU and GPU core year values are calculated based on the quantity of the resources allocated to jobs on the clusters. It is important to note that the values summarized in these pages do not represent core-equivalent measures such that, in the case of large memory jobs, the usage values will not match the cluster scheduler’s representation of the account usage.

The first tab bar offers these options:

By Compute Resource: cluster on which jobs are submitted;
By Resource Allocation Project: projects to which jobs are submitted;
By Submitter: user that submits the jobs;
Storage usage is discussed in Storage and file management.


Usage by compute resource[edit]

This view shows the usage of compute resources per cluster used by groups owned by you or of which you are a member for the current allocation year starting April 1st. The tables contain the total usage to date as well as the projected usage to the end of the current allocation period.

Usage by compute resource with monthly breakdown

From the Extra Info column of the usage table Show monthly usage can be clicked to display a further breakdown of the usage by month for the specific cluster row in the table. By clicking Show submitter usage, a similar breakdown is displayed for the specific users submitting the jobs on the cluster.

Usage by resource allocation project[edit]

Usage by Resource Allocation Project with monthly breakdown

Under this tab, a third tag bar displays the RAPIs (Resource Allocation Project Identifiers) for the selected allocation year. The tables contain detailed information for each allocation project and the resources used by the projects on all of the clusters. The top of the page summarizes information such as the account name (e.g. def-, rrg- or rpp-*, etc.), the project title and ownership, as well as allocation and usage summaries.

GPU usage and Reference GPU Units (RGUs)[edit]

GPU usage
GPU usage summary with Reference GPU Unit (RGU) breakdown table.

For resource allocation projects that have GPU usage the table is broken down into usage on various GPU models and measured in RGUs.

Usage by submitter[edit]

CPU and GPU usage by submitter

Usage can also be displayed grouped by the users that submitted jobs from within the resource allocation projects (group accounts). The view shows the usage for each user aggregated across systems. Selecting from the list of users will display that user’s usage broken down by cluster. Like the group summaries, these user summaries can then be broken down monthly by clicking the Show monthly usage link of the Extra Info column of the CPU/GPU Usage (in core/GPU] years) table for the specific Resource row.