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

e2e_bg_homa.py: something wrong

parent cc62c4ef
...@@ -32,7 +32,8 @@ from simbricks.orchestration.e2e_topologies import ( ...@@ -32,7 +32,8 @@ from simbricks.orchestration.e2e_topologies import (
random.seed(42) random.seed(42)
e = exp.Experiment('e2e_bg_homa') types_of_host = ['qemu', 'qt', 'gem5']
types_of_protocol = ['tcp', 'dctcp', 'homa']
options = { options = {
'ns3::TcpSocket::SegmentSize': '1448', 'ns3::TcpSocket::SegmentSize': '1448',
...@@ -43,19 +44,78 @@ options = { ...@@ -43,19 +44,78 @@ options = {
topology = DCFatTree( topology = DCFatTree(
n_spine_sw=1, n_spine_sw=1,
n_agg_bl=1, n_agg_bl=4,
n_agg_sw=1, n_agg_sw=1,
n_agg_racks=2, n_agg_racks=4,
h_per_rack=1, h_per_rack=10,
) )
add_homa_bg(topology, app_proto='ns3::HomaSocketFactory')
net = sim.NS3E2ENet()
net.opt = ' '.join([f'--{o[0]}={o[1]}' for o in options.items()])
net.e2e_global.stop_time = "20s"
net.add_component(topology)
net.wait = True
e.add_network(net)
net.init_network()
experiments = [e] for h in types_of_host:
for p in types_of_protocol:
e = exp.Experiment('e2e_homa_' + h + '_bg_' + p)
def qemu_timing(node_config: node.NodeConfig):
h = sim.QemuHost(node_config)
h.sync = True
return h
if h == 'qemu':
HostClass = sim.QemuHost
elif h == 'qt':
HostClass = qemu_timing
elif h == 'gem5':
HostClass = sim.Gem5Host
e.checkpoint = True
else:
raise NameError(h)
add_homa_bg(topology, app_proto='homa')
net = sim.NS3E2ENet()
net.opt = ' '.join([f'--{o[0]}={o[1]}' for o in options.items()])
net.e2e_global.stop_time = "60s"
net.add_component(topology)
# net.wait = True
e.add_network(net)
# create client
client_config = node.I40eLinuxNode() # boot Linux with i40e NIC driver
client_config.disk_image = 'homa'
client_config.ip = '10.0.0.1'
client_config.app = node.HomaClientNode()
client_config.app.protocol = p
client = HostClass(client_config)
# client.sync = False
client.name = 'client'
client.wait = True # wait for client simulator to finish execution
e.add_host(client)
# attach client's NIC
client_nic = sim.I40eNIC()
e.add_nic(client_nic)
client.add_nic(client_nic)
# create server
server_config = node.I40eLinuxNode() # boot Linux with i40e NIC driver
server_config.disk_image = 'homa'
server_config.ip = '10.0.0.2'
server_config.app = node.HomaServerNode()
server_config.app.protocol = p
server = HostClass(server_config)
# server.sync = False
server.name = 'server'
# server.wait = True
e.add_host(server)
# attach server's NIC
server_nic = sim.I40eNIC()
e.add_nic(server_nic)
server.add_nic(server_nic)
client_nic.set_network(net)
server_nic.set_network(net)
net.init_network()
experiments = [e]
...@@ -320,12 +320,12 @@ def add_contig_bg(topo, subnet='10.42.0.0/16', **kwargs): ...@@ -320,12 +320,12 @@ def add_contig_bg(topo, subnet='10.42.0.0/16', **kwargs):
topo.add_host_r(c_host) topo.add_host_r(c_host)
def add_homa_bg(topo, subnet='10.42.0.0/16', **kwargs): def add_homa_bg(topo, subnet='10.0.0.0/16', **kwargs):
params = { params = {
'link_rate': '5Gbps', 'link_rate': '10Gbps',
'link_delay': '1us', 'link_delay': '500ns',
'link_queue_size': '512KB', 'link_queue_size': '512KB',
'app_stop_time': '10s', 'app_stop_time': '60s',
} }
for (k,v) in kwargs.items(): for (k,v) in kwargs.items():
params[k] = v params[k] = v
...@@ -346,7 +346,10 @@ def add_homa_bg(topo, subnet='10.42.0.0/16', **kwargs): ...@@ -346,7 +346,10 @@ def add_homa_bg(topo, subnet='10.42.0.0/16', **kwargs):
s_host.data_rate = params['link_rate'] s_host.data_rate = params['link_rate']
s_host.ip = ip + prefix s_host.ip = ip + prefix
s_host.queue_size = params['link_queue_size'] s_host.queue_size = params['link_queue_size']
if (params['app_proto'] == 'tcp'):
s_app = e2e.E2EMsgGenApplicationTCP('msggen') s_app = e2e.E2EMsgGenApplicationTCP('msggen')
elif(params['app_proto'] == 'homa'):
s_app = e2e.E2EMsgGenApplication('msggen')
s_app.stop_time = params['app_stop_time'] s_app.stop_time = params['app_stop_time']
s_app.remotes = remotes s_app.remotes = remotes
s_host.add_component(s_app) s_host.add_component(s_app)
......
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