Also of note: because matching with Consumption Policies takes place in the negotiator, accounting of Concurrency Limits is also implicitly handled in the standard manner. -{section: Examples} +{section: Consumption Policy Examples} In the preceding discussion, examples of a cpu-centric and a memory-centric Consumption Policy were provided. A few other examples are listed here. {subsubsection: Extensible Resources} @@ -66,7 +66,7 @@ # declare an extensible resource for a claim-based consumption policy MACHINE_RESOURCE_tokens = 3 CONSUMPTION_POLICY = True -SLOT_TYPE_1 = cpus=5,memory=100,disk=100%,tokens=3 +SLOT_TYPE_1 = 100% SLOT_TYPE_1_PARTITIONABLE = True NUM_SLOTS_TYPE_1 = 1 # always consume 1 token, and none of anything else @@ -77,3 +77,17 @@ # define cost in terms of available tokens for serving jobs SLOT_TYPE_1_SLOT_WEIGHT = Tokens {endcode} + +{subsubsection: emulate a static slot} +This example uses a consumption policy to emulate static slot behavior +{code} +CONSUMPTION_POLICY = True +SLOT_TYPE_1 = 100% +SLOT_TYPE_1_PARTITIONABLE = True +NUM_SLOTS_TYPE_1 = 1 +# consume all resources - emulate static slot +SLOT_TYPE_1_CONSUMPTION_CPUS = TotalSlotCpus +SLOT_TYPE_1_CONSUMPTION_MEMORY = TotalSlotMemory +# Disk is unreliable -- TotalSlotDisk != Disk even on a virgin slot +SLOT_TYPE_1_CONSUMPTION_DISK = floor(0.9 * TotalSlotDisk) +{endcode}