def __init__(self): # Create schedule builders with different configurations self.builders = [] duration = hour(12) max_parallelity = 12 launches = 30 scale = 40 self.builders.append(DynamicScheduleBuilder( max_duration=duration, max_parallelity=max_parallelity, launches=launches, scale_arrival=scale, scale_duration=scale, domain_size=conf_domainsize.SET_MKII, inter_arrival=DynamicScheduleBuilder.INTER_ARRIVAL_S1, lifetime=DynamicScheduleBuilder.LIFETIME_UNPOPULAR)) self.builders.append(DynamicScheduleBuilder( max_duration=duration, max_parallelity=max_parallelity, launches=launches, scale_arrival=scale, scale_duration=scale, domain_size=conf_domainsize.SET_MKII, inter_arrival=DynamicScheduleBuilder.INTER_ARRIVAL_S1, lifetime=DynamicScheduleBuilder.LIFETIME_S1)) self.builders.append(DynamicScheduleBuilder( max_duration=duration, max_parallelity=max_parallelity, launches=launches, scale_arrival=scale, scale_duration=scale, domain_size=conf_domainsize.SET_MKII, inter_arrival=DynamicScheduleBuilder.INTER_ARRIVAL_S5, lifetime=DynamicScheduleBuilder.LIFETIME_UNPOPULAR)) self.builders.append(DynamicScheduleBuilder( max_duration=duration, max_parallelity=max_parallelity, launches=launches, scale_arrival=scale, scale_duration=scale, domain_size=conf_domainsize.SET_MKII, inter_arrival=DynamicScheduleBuilder.INTER_ARRIVAL_S5, lifetime=DynamicScheduleBuilder.LIFETIME_S1))
from collector import ttypes from workload import timeutil as tutil, wtimes_meta as wmeta import configuration import conf_nodes import conf_load import model import sys import os ########################## # CONFIGURATION ## BASE_LOAD = 0 # Base load of the server (e.g. by hypervisor) MIGRATION_SOURCE = 20 # additional load on migration source node MIGRATION_TARGET = 20 # additional load on migration target node MAX_TIME = tutil.hour(42) # Random time threshold to exit simualtion in case of an error ########################## class Driver: # The default settings are estimations of the real world infrastructure def __init__(self, scoreboard, pump, model, metric_handler, terminates_simulation, report_rate=None): # Reference to scoreboard self.scoreboard = scoreboard # Reference to the message pump self.pump = pump # Reference to the data model which stores the current infrastructure status # Time series are attached to the model self.model = model
import conf_load import configuration import heapq import itertools import json import numpy as np import random import sys # Constants SCH_RAMP_UP = minu(10) # Ramp up duration of the experiment SCH_RAMP_DOWN = minu(10) # Ramp down duration of the experiment ID_START_STATIC = 10000 ID_START_DYNAMIC_PRODUCTION = 20000 ID_START_DYNAMIC_SENSITIVITY = 30000 EXPERIMENT_DURATION = hour(6) # 6 hours steady-state duration of a static experiment ''' Difference between Lifetime and Duration: - Lifetime = How long is a VM running it includes ramp-up, ramp-down, and duration - Lifetime = ramp-up + duration + ramp-down - Duration = length of the steady-state load generation ''' ''' Domain sizes: Domain size describes the domain set index that will be used while running the schedule. The set information will ***only be used to calculate the number of domain types***. Domain sizes are not stored in the schedule!