4.5. Define Charge Rates

Gold allows you to define how much you will charge for your resources (see Creating Charge Rates).

In the Getting Started chapter, we relied on the fact that the default Gold installation predefines a Processors charge rate for you. This means that the total charge for a job will be calculated by taking the number of processors used in the job multiplied by the Processors charge rate which is then multiplied by the wallclock limit. For example: ( ( 16 [Processors] * 1 [ChargeRate{Resource}{Processors}] ) ) * 1234 [WallDuration] = 19744.

Example 4-9. Let's examine the predefined charge rates.

$ goldsh ChargeRate Query

Type     Name       Rate Description 
------------ --------------- ------ ---------------- 
Resource Processors 1                        
        

Now let's create a few of our own.

Example 4-10. Let's say we want to charge for memory used

$ goldsh ChargeRate Create Type=Resource Name=Memory Rate=0.001

Successfully created 1 ChargeRate
        

Example 4-11. We also want a quality of service multiplier

$ goldsh ChargeRate Create Type=QualityOfService Name=BottomFeeder Rate=0.5

Successfully created 1 ChargeRate
        

Example 4-12. Creating another quality-based charge multiplier

$ goldsh ChargeRate Create Type=QualityOfService Name=Premium Rate=2

Successfully created 1 ChargeRate
        

Example 4-13. Let's take a look at the current charge rates.

$ goldsh ChargeRate Query

Type             Name         Rate  Description 
------------------------ ------------------ ------- ---------------- 
Resource         Processors   1                 
Resource         Memory       0.001             
QualityOfService BottomFeeder 0.5               
QualityOfService Premium      2