def testClusterScalingWithPreemptableJobs(self): """ Test scaling simultaneously for a batch of preemptable and non-preemptable jobs. """ config = Config() # Make defaults dummy values config.defaultMemory = 1 config.defaultCores = 1 config.defaultDisk = 1 # Preemptable node parameters config.nodeType = Shape(20, 10, 10, 10) config.minNodes = 0 config.maxNodes = 10 # Preemptable node parameters config.preemptableNodeType = Shape(20, 10, 10, 10) config.minPreemptableNodes = 0 config.maxPreemptableNodes = 10 # Algorithm parameters config.alphaPacking = 0.8 config.betaInertia = 1.2 config.scaleInterval = 3 self._testClusterScaling(config, numJobs=100, numPreemptableJobs=100)
def testClusterScaling(self): """ Test scaling for a batch of non-preemptable jobs and no preemptable jobs (makes debugging easier). """ config = Config() # Make defaults dummy values config.defaultMemory = 1 config.defaultCores = 1 config.defaultDisk = 1 # No preemptable nodes/jobs config.maxPreemptableNodes = 0 # No preemptable nodes # Non-preemptable parameters config.nodeType = Shape(20, 10, 10, 10) config.minNodes = 0 config.maxNodes = 10 # Algorithm parameters config.alphaPacking = 0.8 config.betaInertia = 1.2 config.scaleInterval = 3 self._testClusterScaling(config, numJobs=100, numPreemptableJobs=0)