Charge Rates establish how much it costs to use your resources. There are four main categories of charge rates: Consumable Resource Charge Rates, Usage Charge Rates, Name-Based Multiplier Rates and Value-Based Multiplier Rates.
Consumable Resource Charge Rates — Consumable Resource Charge Rates define how much it costs per unit of time to use a consumable resource like processors, memory, telescope, etc. These resource metrics must first be multiplied by wall duration before being added to the total charge. Consumable Resource Charge Rates are of Type "Resource", with the Name being the resource name (such as Processors) and the given Rate (such as 1) being multiplied by the consumed resource value (such as 8).
Usage Charge Rates — Usage Charge Rates define how much to charge for metrics of total resource usage such as CpuTime, Licenses used, Power consumed (in Watts), etc. These resource metrics are added to the total charge without being multiplied by wall duration. Usage Charge Rates are of Type "Usage", with the Name being the resource name (such as Power) and the given Rate (such as .001) being multiplied by the consumed resource value (such as 40000).
Name-Based Multiplier Rates — Name-Based Multiplier Rates are quality based charge rates which apply a multiplicative charge factor based on a quality of the job such as QOS, nodetype, queue, user, time of day, etc. These charge multipliers are determined by a hash or lookup table based on the value of the job attribute. These rates are multiplied against the total of the resource and usage charges for the job. Name-Based Multiplier Rates have a Type named according to the job quality (such as QOS), with the Name being the quality instance (such as Premium) and the given Rate (such as 2) being directly multiplied to the total of the resource and usage charges.
Value-Based Multiplier Rates — Value-Based Multiplier are scaled multipliers which apply a multiplicative charge factor based on a numeric scaling factor. These incoming scaling factors are multiplied against the Value-Based Multiplier Rate and then are multiplied against the total of the resource and usage charges for the job. Value-Based Multiplier Rates are of Type "Multiplier", with the Name being the multiplier name (such as Discount) and the given Rate (such as 1) being multiplied with the scaling factor before being multiplied to the total job charge.
By default, job charges are calculated according to the following formula: For each Consumable Resource Charge Type applicable to a given job, a resource charge is calculated by multiplying the amount of the resource used by the amount of time it was used, multiplied by the charge rate for that resource. For each Usage Charge Type applicable to a given job, a usage charge is calculated by multiplying the amount of the resource used by the charge rate for that resource. These resource charges and usage charges are added together. Then, for each Name-Based Charge Rate applicable to the job, a charge factor is looked-up based on the type and name of the charge rate. The sum of the resource charges is multiplied by each of the applicable name-based charge factors. Finally, for each Value-Based Charge Rate applicable to the job, a charge factor is determined by multiplying the multiplier value by its corresponding rate. These value-based charge rates are multiplied against the total job charge.
To create a new charge rate, use the command goldsh ChargeRate Create:
goldsh ChargeRate Create Type=<Charge Rate Type> Name=<Charge Rate Name> Rate=<Floating Point Multiplier> [Description=<Description>] [ShowUsage:=True]
Example 13-1. Creating a consumable resource charge rate
$ goldsh ChargeRate Create Type=Resource Name=Processors Rate=1
Successfully created 1 ChargeRate
Example 13-2. Creating another consumable resource charge rate
$ goldsh ChargeRate Create Type=Resource Name=Memory Rate=0.001
Successfully created 1 ChargeRate
Example 13-3. Creating a usage charge rate
$ goldsh ChargeRate Create Type=Usage Name=Power Rate=0.001
Successfully created 1 ChargeRate
Example 13-4. Creating another usage charge rate
$ goldsh ChargeRate Create Type=Usage Name=CpuTime Rate=1
Successfully created 1 ChargeRate
Example 13-5. Creating a name-based multiplier rate
$ goldsh ChargeRate Create Type=QualityOfService Name=BottomFeeder Rate=0.5
Successfully created 1 ChargeRate