-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskystore.py
45 lines (39 loc) · 3.05 KB
/
skystore.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import os
from typing import Tuple
from deploy import Experiment
def build_skystore_experiments(*, latency_slos=[2.0, 4.0, 8.0], replication_factors=[1,2,3,5,8], region_selectors=None, replication_range: "Tuple[int,int]|None" = None):
fixed_args = dict(
output_dir = os.path.join(os.getcwd(), "results", "skystore"),
batch_size = 200,
redundancy_elimination_workers = 80,
#redundancy_elimination_workers = 1,
#replication_factor = 0,
optimizer="PrimalSimplex",
use_clarkson=False,
#profile= "dev",
latency_file = os.path.join(os.getcwd(), "data", "latency_41943040.csv")
)
scaling = []
for latency_slo in latency_slos:
for region_selector in region_selectors:
if replication_range is not None:
scaling += [Experiment(region_selector=region_selector, **fixed_args, latency_slo=latency_slo, replication_factor=replication_range[0], replication_factor_max=replication_range[1])]
else:
scaling += Experiment(region_selector=region_selector, **fixed_args, latency_slo=latency_slo, replication_factor=0).as_args(key="replication_factor", args=replication_factors)
#scaling = Experiment(replication_factor=0, region_selector="aws", **fixed_args, latency_slo=latency_slos[-1]).as_args(key="replication_factor", args=replication_factors)
#scaling = Experiment(replication_factor=0, region_selector="aws", **fixed_args).as_args(key="replication_factor", args=[1])
#[Experiment(region_selector="gcp", **fixed_args, replication_factor=1)] #.as_args(key="latency_slo", args=latency_slos)
#Experiment(region_selector="aws", **fixed_args, replication_factor=8).as_args(key="latency_slo", args=latency_slos) + \
#Experiment(region_selector="aws", **fixed_args, replication_factor=10).as_args(key="latency_slo", args=latency_slos)
#Experiment(region_selector="aws", **fixed_args, replication_factor=1).as_args(key="latency_slo", args=latency_slos) + \
#Experiment(region_selector="aws", **fixed_args, replication_factor=3).as_args(key="latency_slo", args=latency_slos) + \
#Experiment(region_selector="aws", **fixed_args, replication_factor=5).as_args(key="latency_slo", args=latency_slos)
#Experiment(region_selector="azure", **fixed_args).as_replication_factors(min_replication_factor, max_replication_factor) + \
#Experiment(region_selector="azure|aws", **fixed_args).as_replication_factors(min_replication_factor, min(4, max_replication_factor))
return scaling
named_experiments = {
"slos_aws": lambda: build_skystore_experiments(latency_slos=[6.0], replication_range=(1,5), region_selectors=["aws"]),
"no_slos_aws": lambda: build_skystore_experiments(latency_slos=[None], replication_range=(1,5), region_selectors=["aws"]),
"no_slos_aws_rep1": lambda: build_skystore_experiments(latency_slos=[None], replication_range=(1,1), region_selectors=["aws"]),
"no_slos_multicloud_rep1": lambda: build_skystore_experiments(latency_slos=[None], replication_range=(1,1), region_selectors=[""]),
}