Beispiel #1
0
def matrix_sweep_figs():
    output_path = 'poster_figs'
    if not os.path.exists(output_path):
        os.makedirs(output_path)

    block_dims = get_block_dims(250, 8000)

    for block_dim in block_dims:
        drawplots_fn(experiment_name_matrix_sweep, lambda x: x['job_completion_time'],
            'job_completion_time', 'Job Completion Time [seconds]',
            lambda x: x['tracefile'].find('syn_mat_mul_8_{}_combined'.format(block_dim)) >= 0,
            'Global Schedulers - Synthetic Matrix Multiplication block dim {}'.format(block_dim),
            'poster_figs/syn_matmult_global_8_{}.png'.format(block_dim))
def global_figs():
    output_path = 'poster_figs'
    if not os.path.exists(output_path):
        os.makedirs(output_path)

    for network_slowdown in [1, 10, 100, 1000]:
        object_transfer_time_cost = .00000001 * network_slowdown
        experiment_name_graph2_matmult = gen_global.experiment_name_poster_synmatmul
        drawplots_fn(experiment_name_graph2_matmult, lambda x: x['job_completion_time'],
            'job_completion_time', 'Job Completion Time [seconds]',
            lambda x: x['object_transfer_time_cost'] == str(object_transfer_time_cost),
            'Global Schedulers - Synthetic Matrix Multiplication 16,000x16,000 - slow {}'.format(network_slowdown),
            'poster_figs/syn_matmult_global_slow_{}.png'.format(network_slowdown))

        experiment_name_graph2_rnn = gen_global.experiment_name_poster_rnn
        drawplots_fn(experiment_name_graph2_rnn, lambda x: x['job_completion_time'],
            'job_completion_time', 'Job Completion Time [seconds]',
            lambda x: x['object_transfer_time_cost'] == str(object_transfer_time_cost),
            'Global Schedulers - RNN - slow {}'.format(network_slowdown),
            'poster_figs/rnn_global_slow_{}.png'.format(network_slowdown))

        experiment_name_graph2_rlpong = gen_global.experiment_name_poster_rlpong
        drawplots_fn(experiment_name_graph2_rlpong, lambda x: x['job_completion_time'],
            'job_completion_time', 'Job Completion Time [seconds]',
            lambda x: x['object_transfer_time_cost'] == str(object_transfer_time_cost),
            'Global Schedulers - RLPong - slow {}'.format(network_slowdown),
            'poster_figs/rlpong_global_slow_{}.png'.format(network_slowdown))
def global_figs():
    output_path = 'poster_figs'
    if not os.path.exists(output_path):
        os.makedirs(output_path)

    to_graph = []
    to_graph.append(('total', lambda x: x['max_cache_depth_size'] * x['num_nodes'],
        'max_cache_depth_size', 'Total Cache Size Total [Bytes]'))
    to_graph.append(('per_host', lambda x: x['max_cache_depth_size'],
        'max_cache_depth_size', 'Total Cache Size Per Host [Bytes]'))

    to_graph.append(('total_precise', lambda x: x['max_cache_precise_size'] * x['num_nodes'],
        'max_cache_precise_size', 'Total Cache Size Total - Precise GC [Bytes]'))
    to_graph.append(('per_host_precise', lambda x: x['max_cache_precise_size'],
        'max_cache_precise_size', 'Total Cache Size Per Host - Precise GC [Bytes]'))


    for (desc, y_variable_fn, y_variable_name, y_variable_description) in to_graph:
        experiment_name_graph2_matmult = gen_global.experiment_name_poster_synmatmul
        drawplots_fn(experiment_name_graph2_matmult, y_variable_fn, y_variable_name, y_variable_description,
            lambda x: True,
            'Global Schedulers - Synthetic Matrix Multiplication 16,000x16,000',
            'poster_figs/syn_matmult_global_cache_{}.png'.format(desc))

        experiment_name_graph2_rnn = gen_global.experiment_name_poster_rnn
        drawplots_fn(experiment_name_graph2_rnn, y_variable_fn, y_variable_name, y_variable_description,
            lambda x: True,
            'Global Schedulers - RNN',
            'poster_figs/rnn_global_cache_{}.png'.format(desc))

        experiment_name_graph2_rlpong = gen_global.experiment_name_poster_rlpong
        drawplots_fn(experiment_name_graph2_rlpong, y_variable_fn, y_variable_name, y_variable_description,
            lambda x: True,
            'Global Schedulers - RLPong',
            'poster_figs/rlpong_global_cache_{}.png'.format(desc))
Beispiel #4
0
def poster_figs():
    output_path = 'poster_figs'
    if not os.path.exists(output_path):
        os.makedirs(output_path)

    experiment_name_graph2_matmult = poster_gen.experiment_name_poster_synmatmul
    drawplots_fn(
        experiment_name_graph2_matmult, lambda x: x['job_completion_time'],
        'job_completion_time', 'Job Completion Time [seconds]',
        lambda x: not x['scheduler'].endswith('local'),
        'Global Schedulers - Synthetic Matrix Multiplication 16,000x16,000',
        'poster_figs/syn_matmult_global.png')

    experiment_name_graph2_rnn = poster_gen.experiment_name_poster_rnn
    drawplots_fn(experiment_name_graph2_rnn,
                 lambda x: x['job_completion_time'], 'job_completion_time',
                 'Job Completion Time [seconds]',
                 lambda x: not x['scheduler'].endswith('local'),
                 'Global Schedulers - RNN', 'poster_figs/rnn_global.png')

    experiment_name_graph2_rlpong = poster_gen.experiment_name_poster_rlpong
    drawplots_fn(experiment_name_graph2_rlpong,
                 lambda x: x['job_completion_time'], 'job_completion_time',
                 'Job Completion Time [seconds]',
                 lambda x: not x['scheduler'].endswith('local'),
                 'Global Schedulers - RLPong', 'poster_figs/rlpong_global.png')

    experiment_name_threshold = poster_gen.experiment_name_t1l
    threshold_schedulers = set([
        'trivial_threshold_local', 'transfer_aware_threshold_local',
        'location_aware_threshold_local'
    ])

    def plot_threshold(experiment_name, name, description, tracefile):
        print "threshold plot {} {}".format(description, tracefile)
        drawplots_generic(
            experiment_name, lambda x: x['env']['RAY_SCHED_THRESHOLD1L'],
            't1l', 'Threshold 1L', lambda x: x['job_completion_time'],
            'job_completion_time', 'Job Completion Time [seconds]',
            lambda x: x['scheduler'] in threshold_schedulers and x['tracefile']
            == tracefile, 'Threshold - {}'.format(description),
            'poster_figs/{}_threshold.png'.format(name))

    plot_threshold(experiment_name_threshold, 'rnn', 'RNN',
                   poster_gen.trace_single_rnn)
    plot_threshold(experiment_name_threshold, 'rlpong', 'RLPong',
                   poster_gen.trace_single_rlpong)
    plot_threshold(experiment_name_threshold, 'synmatmul',
                   'Synthetic Matrix Multiplication',
                   poster_gen.trace_single_synmatmul)

    # Figure 3
    def plot_relative(experiment_name, ref_scheduler, plot_schedulers, name,
                      output_path):
        drawplots_relative(experiment_name, lambda x: x['num_nodes'],
                           'num_nodes', 'Number of Nodes', ref_scheduler,
                           plot_schedulers, 'Local / Global - {}'.format(name),
                           output_path)

    scheduler_combinations = [
        ('trivial', ['trivial_local', 'trivial_threshold_local']),
        ('transfer_aware',
         ['transfer_aware_local', 'transfer_aware_threshold_local'])
    ]
    workloads = [(experiment_name_graph2_matmult, 'syn_matmult',
                  'Synthetic Matrix Multiplication 16,000x16,000'),
                 (experiment_name_graph2_rnn, 'rnn', 'RNN'),
                 (experiment_name_graph2_rlpong, 'rlpong', 'RLPong')]

    for ref_scheduler, plot_schedulers in scheduler_combinations:
        for experiment_name, workload, workload_desc in workloads:
            plot_relative(
                experiment_name, ref_scheduler, plot_schedulers, workload_desc,
                'poster_figs/{}_{}_localvglobal.png'.format(
                    workload, ref_scheduler))