Commit fd32e173 authored by Hejing Li's avatar Hejing Li
Browse files

add homa benchmark tcp

parent d6f58633
......@@ -35,10 +35,12 @@ from simbricks.orchestration.simulators import QemuHost, Gem5Host, I40eNIC, Swit
experiments = []
workload = [1,2,3,4,5]
host_types = ['qemu', 'gem5', 'qt']
for w in workload:
protocol = ['tcp', 'dctcp', 'homa']
for p in protocol:
for w in workload:
for host_type in host_types:
e = Experiment(f'single_homa_w{w}_' + host_type)
e = Experiment(f'single_{p}_w{w}_{host_type}')
e.checkpoint = False # use checkpoint and restore to speed up simulation
# host
if host_type == 'qemu':
......@@ -62,6 +64,7 @@ for w in workload:
client_config.disk_image = 'homa'
client_config.ip = '10.0.0.1'
client_config.app = HomaClientNode()
client_config.app.protocol = p
client = HostClass(client_config)
# client.sync = False
client.name = 'client'
......@@ -78,6 +81,7 @@ for w in workload:
server_config.disk_image = 'homa'
server_config.ip = '10.0.0.2'
server_config.app = HomaServerNode()
server_config.app.protocol = p
server = HostClass(server_config)
# server.sync = False
server.name = 'server'
......
......@@ -450,6 +450,7 @@ class HomaClientNode(AppConfig):
self.id = 0
self.cluster_size = 2
self.workload = 2
self.protocol = 'homa'
def prepare_post_cp(self) -> tp.List[str]:
return super().prepare_post_cp() + [
......@@ -465,15 +466,21 @@ class HomaClientNode(AppConfig):
cmd.append('mount -t sysfs sysfs /sys')
cmd.append('mount -t proc proc /proc')
cmd.append('sleep 1')
cmd.append(f'/root/homa/util/cp_node client --protocol homa --workload w{self.workload} &')
cmd.append(f'/root/homa/util/cp_node client --protocol ' + self.protocol + ' &')
# cmd.append('sleep 2')
# cmd.append('touch /root/homa/util/client.tt')
# cmd.append('/root/homa/util/ttprint.py > /root/homa/util/client.tt')
cmd.append('sleep 10')
cmd.append('pkill cp_node')
# cmd.append('cat /root/homa/util/client.tt')
return cmd
# 'touch /root/homa/util/client.tt'
# '/root/homa/util/ttprint.py > /root/homa/util/client.tt'
class HomaServerNode(AppConfig):
def __init__(self) -> None:
super().__init__()
self.protocol = 'homa'
def prepare_post_cp(self) -> tp.List[str]:
return super().prepare_post_cp() + [
'insmod homa.ko'
......@@ -487,16 +494,14 @@ class HomaServerNode(AppConfig):
cmd = []
cmd.append('mount -t sysfs sysfs /sys')
cmd.append('mount -t proc proc /proc')
cmd.append('/root/homa/util/cp_node server --protocol homa &')
cmd.append('/root/homa/util/cp_node server --protocol ' + self.protocol + ' &')
# cmd.append('sleep 2')
# cmd.append('touch /root/homa/util/server.tt')
# cmd.append('/root/homa/util/ttprint.py > /root/homa/util/server.tt')
cmd.append('sleep 10')
cmd.append('pkill cp_node')
# cmd.append('cat /root/homa/util/server.tt')
return cmd
# 'sysctl -w .net.homa.poll_usecs=300000'
# 'sleep 1'
# 'touch /root/homa/util/server.tt'
# '/root/homa/util/ttprint.py > /root/homa/util/server.tt'
# 'cat /root/homa/util/server.tt'
class IdleHost(AppConfig):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment