Skip to content

Commit

Permalink
Updated network mix script to submit CPU spin tasks as well.
Browse files Browse the repository at this point in the history
The workload now consists of 1/3 HDFS get tasks and
2/3 CPU spin tasks.

Affected modules: scripts/job/benchmark

Change-Id: Id03647d2f614e977fb57d072c10f51caff689956
  • Loading branch information
Ionel Gog committed Sep 6, 2016
1 parent f9351e9 commit 52d829a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions scripts/job/benchmark/cluster_mix_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ def parse_arguments():
rv.net_bw = 600
rv.disk_bw = 0

# CPU SPIN JOB
rv_cpuspin = resource_vector_pb2.ResourceVector()
rv_cpuspin.cpu_cores = 1.0
rv_cpuspin.ram_cap = 10
rv_cpuspin.net_bw = 0
rv_cpuspin.disk_bw = 0

# 3 NGINX with 4 AB each
# 3 PS with 4 workers

Expand All @@ -56,8 +63,15 @@ def parse_arguments():
tasks_args = ["caelum10g-301.cl.cam.ac.uk 8020 /input/test_data/task_runtime_events.csv",
"caelum10g-301.cl.cam.ac.uk 8020 /input/test_data/task_runtime_events.csv"]

cpu_task_args = []
for i in range(0, 32):
cpu_task_args.append("7")

spin_index = 0
for i in range(0, 96000, 8000):
wl.add(i, "hdfs_get_task_runtime_events%d" % (i), bin_path + "/hdfs/hdfs_get", tasks_args, 2, 2, rv)
wl.add(i, "cpuspin%d" % (spin_index), bin_path + "/cpu_spin/cpu_spin", cpu_task_args, 4, 2, rv_cpuspin)
spin_index = spin_index + 1

# About 3.7GB of input (8)
tasks_args = []
Expand All @@ -66,6 +80,8 @@ def parse_arguments():

for i in range(2000, 96000, 8000):
wl.add(i, "hdfs_get_sspp_tw%d" % (i), bin_path + "/hdfs/hdfs_get", tasks_args, 8, 2, rv)
wl.add(i, "cpuspin%d" % (spin_index), bin_path + "/cpu_spin/cpu_spin", cpu_task_args, 16, 2, rv_cpuspin)
spin_index = spin_index + 1

# About 3.9GB of input (16). Each task takes about 6-8 seconds.
tasks_args = []
Expand All @@ -74,6 +90,8 @@ def parse_arguments():

for i in range(6000, 96000, 8000):
wl.add(i, "hdfs_get_pagerank_uk%d" % (i), bin_path + "/hdfs/hdfs_get", tasks_args, 16, 2, rv)
wl.add(i, "cpuspin%d" % (spin_index), bin_path + "/cpu_spin/cpu_spin", cpu_task_args, 32, 2, rv_cpuspin)
spin_index = spin_index + 1

# We don't submit lineitem tasks because we would end up oversubscribing the
# network.
Expand All @@ -86,13 +104,18 @@ def parse_arguments():
# wl.add(i, "hdfs_get_lineitem%d" % (i), bin_path + "/hdfs/hdfs_get", tasks_args, 14, 2, rv)
elif target == 'mesos':
index = 0
spin_index = 0
for i in range(0, 96000, 8000):
tasks_args = ["caelum10g-301.cl.cam.ac.uk 8020 /input/test_data/task_runtime_events.csv",
"caelum10g-301.cl.cam.ac.uk 8020 /input/test_data/task_runtime_events.csv"]
for j in range(0, 2):
wl.add(i, "hdfs_get_task_runtime_events%d" % (index), bin_path + "/hdfs/hdfs_get",
tasks_args[j], 1, 2, rv)
wl.add(i, "cpuspin%d" % (spin_index), bin_path + "/cpu_spin/cpu_spin", "7", 1, 2, rv_cpuspin)
wl.add(i, "cpuspin%d" % (spin_index + 1), bin_path + "/cpu_spin/cpu_spin", "7", 1, 2, rv_cpuspin)
index = index + 1
spin_index = spin_index + 2


tasks_args = []
for i in range(0, 8):
Expand All @@ -102,7 +125,10 @@ def parse_arguments():
for j in range(0, 8):
wl.add(i, "hdfs_get_sspp_tw%d" % (index), bin_path + "/hdfs/hdfs_get", tasks_args[j],
1, 2, rv)
wl.add(i, "cpuspin%d" % (spin_index), bin_path + "/cpu_spin/cpu_spin", "7", 1, 2, rv_cpuspin)
wl.add(i, "cpuspin%d" % (spin_index + 1), bin_path + "/cpu_spin/cpu_spin", "7", 1, 2, rv_cpuspin)
index = index + 1
spin_index = spin_index + 2

tasks_args = []
for i in range(0, 16):
Expand All @@ -112,7 +138,10 @@ def parse_arguments():
for j in range(0, 16):
wl.add(i, "hdfs_get_pagerank_uk%d" % (index), bin_path + "/hdfs/hdfs_get", tasks_args[j],
1, 2, rv)
wl.add(i, "cpuspin%d" % (spin_index), bin_path + "/cpu_spin/cpu_spin", "7", 1, 2, rv_cpuspin)
wl.add(i, "cpuspin%d" % (spin_index + 1), bin_path + "/cpu_spin/cpu_spin", "7", 1, 2, rv_cpuspin)
index = index + 1
spin_index = spin_index + 2

wl.start()

Expand Down

0 comments on commit 52d829a

Please sign in to comment.