Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An experiment at running benchmarks on multiple EC2 instances #151

Open
wants to merge 29 commits into
base: future
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f5f4c38
A waiter script that can run long running jobs in the background
angelhof Feb 22, 2021
d258a84
Add VolumeType in make/suggest
angelhof Feb 22, 2021
23f128b
Add connection attempts
angelhof Feb 22, 2021
3a9f590
Add some informative messages
angelhof Feb 22, 2021
c52a32a
Add two profiles for instances
angelhof Feb 22, 2021
c9a9dc3
First stab at a multi-instance experiment
angelhof Feb 22, 2021
3307f19
New version of bg-worker and poller
angelhof Feb 22, 2021
f07db61
Execute a script on ec2
angelhof Feb 22, 2021
d1d3944
Modify instance profiles to have 20GB of storage since they were runn…
angelhof Feb 22, 2021
51cb05c
Remove the input script
angelhof Feb 22, 2021
abd1c4f
Update infrastructure to run experiments using async worker
angelhof Feb 22, 2021
db25df6
Add a no-stop flag in with-ec2
angelhof Feb 22, 2021
703afdb
Fix ssh background poller to incrementally update the output log to s…
angelhof Feb 22, 2021
b383cce
Close stdin, stdout, stderr so that bg worker can exit
angelhof Feb 22, 2021
fa7da49
Execute both experiments
angelhof Feb 22, 2021
659de2e
Rename and add comments
angelhof Feb 22, 2021
0892ca1
Remove unneccessary line
angelhof Feb 23, 2021
d5fc6b2
Add archive
angelhof Feb 28, 2021
ba30feb
Modify gather results so that it can be imported
angelhof Feb 28, 2021
1763d00
Add a plotting script in the multi-instance experiment
angelhof Feb 28, 2021
06905e7
Add plot
angelhof Feb 28, 2021
b4e0ccf
Allow commiting pdf plots in the archive directory
angelhof Feb 28, 2021
c26ac03
Create directory if it doesn't exist in plot.py
angelhof Feb 28, 2021
9c4bbc8
Gather results in named directories
angelhof Feb 28, 2021
f63d476
Plot bash and pash in the same plots
angelhof Feb 28, 2021
7f20fa6
Update archive results and plots
angelhof Feb 28, 2021
a735725
Make ec2 instance with IOPS too
angelhof Mar 1, 2021
34ee3e5
Update the profiles
angelhof Mar 1, 2021
5655d7e
Update instance id
angelhof Mar 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
319 changes: 162 additions & 157 deletions compiler/gather_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,25 @@
import matplotlib.lines as pltlines
import matplotlib.ticker as plticker

parser = argparse.ArgumentParser(description='Produce plots from various experiments with PaSh.')
parser.add_argument('--eurosys2021',
action='store_true',
help='generates the plots for all the experiments in the EuroSys2021 paper')
parser.add_argument('--all',
action='store_true',
help='generates all plots')

args = parser.parse_args()

if args.all is True:
args.eurosys2021 = True

if not args.all and not args.eurosys2021:
print("You have to specify some plot to generate!")
print("See command usage with --help.")
exit(0)
def parse_args():
parser = argparse.ArgumentParser(description='Produce plots from various experiments with PaSh.')
parser.add_argument('--eurosys2021',
action='store_true',
help='generates the plots for all the experiments in the EuroSys2021 paper')
parser.add_argument('--all',
action='store_true',
help='generates all plots')

args = parser.parse_args()

if args.all is True:
args.eurosys2021 = True

if not args.all and not args.eurosys2021:
print("You have to specify some plot to generate!")
print("See command usage with --help.")
exit(0)
return args

SMALL_SIZE = 16
MEDIUM_SIZE = 18
Expand Down Expand Up @@ -1526,147 +1528,150 @@ def any_wrong(correctness, experiment, line_plots):
return False


## Set the fonts to be larger
SMALL_SIZE = 22
MEDIUM_SIZE = 24
BIGGER_SIZE = 30

plt.rc('font', size=SMALL_SIZE) # controls default text sizes
plt.rc('axes', titlesize=MEDIUM_SIZE) # fontsize of the axes title
plt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x and y labels
plt.rc('xtick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('ytick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('legend', fontsize=SMALL_SIZE) # legend fontsize
plt.rc('figure', titlesize=BIGGER_SIZE) # fontsize of the figure title

# Plot microbenchmarks
diff_results = []
all_scaleup_numbers = [2, 4, 8, 16, 32, 64]
all_experiment_results = {}
all_sequential_results = {}
correctness = {}
for experiment in all_experiments:
all_speedup_results, output_diff, sequential_time = collect_scaleup_line_speedups(experiment, all_scaleup_numbers, RESULTS)
all_experiment_results[experiment] = all_speedup_results
all_sequential_results[experiment] = sequential_time
correctness[experiment] = output_diff

small_one_liners_scaleup_numbers = [2, 16]
small_one_liner_results = {}
for experiment in all_experiments:
small_speedup_results, _, sequential_time = collect_scaleup_line_speedups(experiment, small_one_liners_scaleup_numbers, SMALL_RESULTS)
small_one_liner_results[experiment] = small_speedup_results


## Make a report of all one-liners
report_all_one_liners(all_scaleup_numbers, all_experiment_results, correctness)

## Legacy unix50 results
if args.all:
unix50_results, unix50_results_fan_in = collect_all_unix50_results(UNIX50_RESULTS)

## Collect all unix50 results
if args.eurosys2021:
small_unix50_results, _ = collect_all_unix50_results(SMALL_UNIX50_RESULTS, scaleup_numbers=[4], suffix='distr_auto_split.time')
big_unix50_results, _ = collect_all_unix50_results(BIG_UNIX50_RESULTS, scaleup_numbers=[16], suffix='distr_auto_split.time')
if __name__ == "__main__":
args = parse_args()
## Set the fonts to be larger
SMALL_SIZE = 22
MEDIUM_SIZE = 24
BIGGER_SIZE = 30

##
## Theory Paper
##
coarse_experiments = ["minimal_grep",
"minimal_sort",
"topn",
"wf",
"spell",
"bigrams",
"diff",
"set-diff",
"shortest_scripts"]

if args.all:
plot_less_one_liners_tiling(all_experiment_results, all_sequential_results,
coarse_experiments, (unix50_results, unix50_results_fan_in))
generate_tex_coarse_table(coarse_experiments)
# collect_unix50_coarse_scaleup_times(unix50_results)
plt.rc('font', size=SMALL_SIZE) # controls default text sizes
plt.rc('axes', titlesize=MEDIUM_SIZE) # fontsize of the axes title
plt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x and y labels
plt.rc('xtick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('ytick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('legend', fontsize=SMALL_SIZE) # legend fontsize
plt.rc('figure', titlesize=BIGGER_SIZE) # fontsize of the figure title

# Plot microbenchmarks
diff_results = []
all_scaleup_numbers = [2, 4, 8, 16, 32, 64]
all_experiment_results = {}
all_sequential_results = {}
correctness = {}
for experiment in all_experiments:
all_speedup_results, output_diff, sequential_time = collect_scaleup_line_speedups(experiment, all_scaleup_numbers, RESULTS)
all_experiment_results[experiment] = all_speedup_results
all_sequential_results[experiment] = sequential_time
correctness[experiment] = output_diff

##
## Systems Paper
##
experiments = ["minimal_grep",
"minimal_sort",
"topn",
"wf",
"spell",
"diff",
"bigrams",
"set-diff",
"double_sort",
"shortest_scripts"]

## Large inputs `-l`
custom_scaleup_plots = {"minimal_grep" : ["eager", "blocking-eager"],
"minimal_sort": ["eager", "blocking-eager", "no-eager"],
"topn": ["eager", "blocking-eager", "no-eager"],
"wf": ["eager", "blocking-eager", "no-eager"],
"spell" : ["split", "eager"],
"diff" : ["eager", "blocking-eager", "no-eager"],
"bigrams" : ["split", "eager"],
"set-diff" : ["eager", "blocking-eager", "no-eager"],
"double_sort" : ["split", "eager", "blocking-eager", "no-eager"],
"shortest_scripts" : ["eager", "blocking-eager", "no-eager"]}

if args.eurosys2021:
plot_one_liners_tiling(all_experiment_results, experiments, custom_scaleup_plots)

## Medium input `-m`
medium_custom_scaleup_plots = {"minimal_grep" : ["split", "blocking-eager"],
"minimal_sort": ["split", "blocking-eager", "no-eager"],
"topn": ["split", "blocking-eager", "no-eager"],
"wf": ["split", "blocking-eager", "no-eager"],
"spell" : ["split", "eager"],
"diff" : ["split", "blocking-eager", "no-eager"],
"bigrams" : ["split", "eager"],
"set-diff" : ["split", "blocking-eager", "no-eager"],
"double_sort" : ["split", "eager", "blocking-eager", "no-eager"],
"shortest_scripts" : ["split", "blocking-eager", "no-eager"]}


if args.eurosys2021:
plot_one_liners_tiling(small_one_liner_results, experiments,
medium_custom_scaleup_plots,
all_scaleup_numbers=small_one_liners_scaleup_numbers,
prefix="medium_")

## Small input `-s`
small_custom_scaleup_plots = {"minimal_grep" : ["split"],
"minimal_sort": ["split"],
"topn": ["split"],
"wf": ["split"],
"spell" : ["split"],
"diff" : ["split"],
"bigrams" : ["split"],
"set-diff" : ["split"],
"double_sort" : ["split"],
"shortest_scripts" : ["split"]}

if args.eurosys2021:
plot_one_liners_tiling(small_one_liner_results, experiments,
small_custom_scaleup_plots,
all_scaleup_numbers=small_one_liners_scaleup_numbers,
prefix="small_")

if args.eurosys2021:
generate_tex_table(experiments)
collect_unix50_scaleup_times(small_unix50_results, scaleup=[4], small_prefix="_1GB")
collect_unix50_scaleup_times(big_unix50_results, scaleup=[16], small_prefix="_10GB")
plot_sort_with_baseline(RESULTS)

## Legacy plots
if args.all:
collect_unix50_scaleup_times(unix50_results)


## Format and print correctness results
if args.all:
format_correctness(correctness)
small_one_liners_scaleup_numbers = [2, 16]
small_one_liner_results = {}
for experiment in all_experiments:
small_speedup_results, _, sequential_time = collect_scaleup_line_speedups(experiment, small_one_liners_scaleup_numbers, SMALL_RESULTS)
small_one_liner_results[experiment] = small_speedup_results


## Make a report of all one-liners
report_all_one_liners(all_scaleup_numbers, all_experiment_results, correctness)

## Legacy unix50 results
if args.all:
unix50_results, unix50_results_fan_in = collect_all_unix50_results(UNIX50_RESULTS)

## Collect all unix50 results
if args.eurosys2021:
small_unix50_results, _ = collect_all_unix50_results(SMALL_UNIX50_RESULTS, scaleup_numbers=[4], suffix='distr_auto_split.time')
big_unix50_results, _ = collect_all_unix50_results(BIG_UNIX50_RESULTS, scaleup_numbers=[16], suffix='distr_auto_split.time')

##
## Theory Paper
##
coarse_experiments = ["minimal_grep",
"minimal_sort",
"topn",
"wf",
"spell",
"bigrams",
"diff",
"set-diff",
"shortest_scripts"]

if args.all:
plot_less_one_liners_tiling(all_experiment_results, all_sequential_results,
coarse_experiments, (unix50_results, unix50_results_fan_in))
generate_tex_coarse_table(coarse_experiments)
# collect_unix50_coarse_scaleup_times(unix50_results)


##
## Systems Paper
##
experiments = ["minimal_grep",
"minimal_sort",
"topn",
"wf",
"spell",
"diff",
"bigrams",
"set-diff",
"double_sort",
"shortest_scripts"]

## Large inputs `-l`
custom_scaleup_plots = {"minimal_grep" : ["eager", "blocking-eager"],
"minimal_sort": ["eager", "blocking-eager", "no-eager"],
"topn": ["eager", "blocking-eager", "no-eager"],
"wf": ["eager", "blocking-eager", "no-eager"],
"spell" : ["split", "eager"],
"diff" : ["eager", "blocking-eager", "no-eager"],
"bigrams" : ["split", "eager"],
"set-diff" : ["eager", "blocking-eager", "no-eager"],
"double_sort" : ["split", "eager", "blocking-eager", "no-eager"],
"shortest_scripts" : ["eager", "blocking-eager", "no-eager"]}

if args.eurosys2021:
plot_one_liners_tiling(all_experiment_results, experiments, custom_scaleup_plots)

## Medium input `-m`
medium_custom_scaleup_plots = {"minimal_grep" : ["split", "blocking-eager"],
"minimal_sort": ["split", "blocking-eager", "no-eager"],
"topn": ["split", "blocking-eager", "no-eager"],
"wf": ["split", "blocking-eager", "no-eager"],
"spell" : ["split", "eager"],
"diff" : ["split", "blocking-eager", "no-eager"],
"bigrams" : ["split", "eager"],
"set-diff" : ["split", "blocking-eager", "no-eager"],
"double_sort" : ["split", "eager", "blocking-eager", "no-eager"],
"shortest_scripts" : ["split", "blocking-eager", "no-eager"]}


if args.eurosys2021:
plot_one_liners_tiling(small_one_liner_results, experiments,
medium_custom_scaleup_plots,
all_scaleup_numbers=small_one_liners_scaleup_numbers,
prefix="medium_")

## Small input `-s`
small_custom_scaleup_plots = {"minimal_grep" : ["split"],
"minimal_sort": ["split"],
"topn": ["split"],
"wf": ["split"],
"spell" : ["split"],
"diff" : ["split"],
"bigrams" : ["split"],
"set-diff" : ["split"],
"double_sort" : ["split"],
"shortest_scripts" : ["split"]}

if args.eurosys2021:
plot_one_liners_tiling(small_one_liner_results, experiments,
small_custom_scaleup_plots,
all_scaleup_numbers=small_one_liners_scaleup_numbers,
prefix="small_")

if args.eurosys2021:
generate_tex_table(experiments)
collect_unix50_scaleup_times(small_unix50_results, scaleup=[4], small_prefix="_1GB")
collect_unix50_scaleup_times(big_unix50_results, scaleup=[16], small_prefix="_10GB")
plot_sort_with_baseline(RESULTS)

## Legacy plots
if args.all:
collect_unix50_scaleup_times(unix50_results)


## Format and print correctness results
if args.all:
format_correctness(correctness)
2 changes: 2 additions & 0 deletions evaluation/multi-instance-experiment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
results/*
!archive/plots/*.pdf
Binary file not shown.
Loading