Created
February 7, 2013 16:09
-
-
Save erikerlandson/4731965 to your computer and use it in GitHub Desktop.
examples of consumption policy use cases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spoof some cores | |
NUM_CPUS = 20 | |
# declare an extensible resource for a 'claim-based' consumption policy | |
MACHINE_RESOURCE_tokens = 3 | |
# startd-wide consumption policy config | |
# defaults for cpus/memory/disk consumption | |
CONSUMPTION_POLICY = True | |
SLOT_WEIGHT = Cpus | |
NUM_CLAIMS = 5 | |
# CONSUMPTION_TOKENS = ifthenelse(target.RequestTokens =?= undefined, 0, target.RequestTokens) | |
# slot type 1: a 'traditional' cpu-centric policy | |
SLOT_TYPE_1 = cpus=5,memory=100,disk=25%,tokens=0 | |
SLOT_TYPE_1_PARTITIONABLE = True | |
SLOT_TYPE_1_NUM_CLAIMS = 10 | |
NUM_SLOTS_TYPE_1 = 1 | |
SLOT_TYPE_1_CONSUMPTION_MEMORY = quantize(target.RequestMemory, {1}) | |
# slot type 2: will demo/test a memory-centric policy | |
SLOT_TYPE_2 = cpus=5,memory=100,disk=25%,tokens=0 | |
SLOT_TYPE_2_PARTITIONABLE = True | |
NUM_SLOTS_TYPE_2 = 1 | |
SLOT_TYPE_2_CONSUMPTION_MEMORY = quantize(target.RequestMemory, {25}) | |
SLOT_TYPE_2_SLOT_WEIGHT = floor(Memory / 25) | |
# slot type 3: a claim-based policy | |
# (not tied to resource such as cpu, mem, etc) | |
SLOT_TYPE_3 = cpus=5,memory=100,disk=25%,tokens=3 | |
SLOT_TYPE_3_PARTITIONABLE = True | |
NUM_SLOTS_TYPE_3 = 1 | |
# always consume 1 token, and none of anything else | |
SLOT_TYPE_3_CONSUMPTION_TOKENS = 1 | |
SLOT_TYPE_3_CONSUMPTION_CPUS = 0 | |
SLOT_TYPE_3_CONSUMPTION_MEMORY = 0 | |
SLOT_TYPE_3_CONSUMPTION_DISK = 0 | |
# define cost in terms of available tokens for serving jobs | |
SLOT_TYPE_3_SLOT_WEIGHT = Tokens | |
# slot type 4: a 'static slot' policy | |
# (always consume all resources) | |
SLOT_TYPE_4 = cpus=5,memory=100,disk=25%,tokens=0 | |
SLOT_TYPE_4_PARTITIONABLE = True | |
NUM_SLOTS_TYPE_4 = 1 | |
# consume all resources - emulate static slot | |
SLOT_TYPE_4_CONSUMPTION_CPUS = Cpus | |
SLOT_TYPE_4_CONSUMPTION_MEMORY = Memory | |
SLOT_TYPE_4_CONSUMPTION_DISK = Disk | |
SLOT_TYPE_4_CONSUMPTION_TOKENS = Tokens | |
# turn this off to demonstrate that consumption policy will handle this kind of logic | |
MUST_MODIFY_REQUEST_EXPRS = False | |
# turn off schedd-side resource splitting since we're demonstrating neg-side alternative | |
CLAIM_PARTITIONABLE_LEFTOVERS = False | |
# keep slot weights enabled for match costing | |
NEGOTIATOR_USE_SLOT_WEIGHTS = True | |
# for simplicity, turn off preemption, caching, worklife | |
CLAIM_WORKLIFE=0 | |
MAXJOBRETIREMENTTIME = 3600 | |
PREEMPT = False | |
RANK = 0 | |
PREEMPTION_REQUIREMENTS = False | |
NEGOTIATOR_CONSIDER_PREEMPTION = False | |
NEGOTIATOR_MATCHLIST_CACHING = False | |
# verbose logging | |
ALL_DEBUG = D_FULLDEBUG | |
# reduce daemon update latencies | |
NEGOTIATOR_INTERVAL = 30 | |
SCHEDD_INTERVAL = 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment