"...composable_kernel.git" did not exist on "63fd5da63789ac59d9f4ebeefc38ba8397bc8a27"
Commit 5ca26fad authored by Jonas Kaufmann's avatar Jonas Kaufmann Committed by Antoine Kaufmann
Browse files

experiments: unify iPerf client server pair experiments

These all do the same thing except with different hosts or NICs. Combine them
in one script running all configurations.
- gem5_i40e_pair
- qemu_i40e_pair
- qemu_e1000_pair
parent 13673a6f
# Copyright 2021 Max Planck Institute for Software Systems, and
# Copyright 2023 Max Planck Institute for Software Systems, and
# National University of Singapore
#
# Permission is hereby granted, free of charge, to any person obtaining
......@@ -19,47 +19,85 @@
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
Two hosts connected by a switch. Both run iPerf where one host is the client and
the other the server.
import simbricks.orchestration.experiments as exp
import simbricks.orchestration.nodeconfig as node
import simbricks.orchestration.simulators as sim
from simbricks.orchestration.simulator_utils import create_basic_hosts
e = exp.Experiment('gem5-i40e-pair')
#e.timeout = 5 * 60
e.checkpoint = True
net = sim.SwitchNet()
e.add_network(net)
servers = create_basic_hosts(
e,
1,
'server',
net,
sim.I40eNIC,
sim.Gem5Host,
node.I40eLinuxNode,
node.IperfTCPServer
)
clients = create_basic_hosts(
e,
2,
'client',
net,
sim.I40eNIC,
sim.Gem5Host,
node.I40eLinuxNode,
node.IperfTCPClient,
ip_start=2
)
for h in servers + clients:
h.cpu_type = 'TimingSimpleCPU'
h.cpu_type_cp = 'TimingSimpleCPU'
for c in clients:
c.wait = True
c.node_config.app.server_ip = servers[0].node_config.ip
experiments = [e]
This module creates multiple experiments for comparing multiple host and NIC
simulator combinations. Client and Server use the same simulators.
"""
from simbricks.orchestration import experiments as exp
from simbricks.orchestration import nodeconfig, simulator_utils, simulators
host_types = ['qemu', 'gem5']
nic_types = ['i40e', 'e1000']
experiments = []
class QemuTiming(simulators.QemuHost):
def __init__(self, node_config):
super().__init__(node_config)
self.sync = True
class Gem5Timing(simulators.Gem5Host):
def __init__(self, node_config):
super().__init__(node_config)
self.cpu_type = 'TimingSimpleCPU'
self.cpu_type_cp = 'TimingSimpleCPU'
for host_type in host_types:
for nic_type in nic_types:
e = exp.Experiment(f'iperf-{host_type}-{nic_type}-pair')
net = simulators.SwitchNet()
e.add_network(net)
if host_type == 'qemu':
HostClass = QemuTiming
elif host_type == 'gem5':
HostClass = Gem5Timing
e.checkpoint = True
else:
raise NameError(host_type)
if nic_type == 'i40e':
NicClass = simulators.I40eNIC
NodeConfigClass = nodeconfig.I40eLinuxNode
elif nic_type == 'e1000':
NicClass = simulators.E1000NIC
NodeConfigClass = nodeconfig.E1000LinuxNode
else:
raise NameError(nic_type)
servers = simulator_utils.create_basic_hosts(
e,
1,
'server',
net,
NicClass,
HostClass,
NodeConfigClass,
nodeconfig.IperfTCPServer
)
clients = simulator_utils.create_basic_hosts(
e,
1,
'client',
net,
NicClass,
HostClass,
NodeConfigClass,
nodeconfig.IperfTCPClient,
ip_start=2
)
for c in clients:
c.wait = True
c.node_config.app.server_ip = servers[0].node_config.ip
experiments.append(e)
# Copyright 2021 Max Planck Institute for Software Systems, and
# National University of Singapore
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import simbricks.orchestration.experiments as exp
import simbricks.orchestration.nodeconfig as node
import simbricks.orchestration.simulators as sim
from simbricks.orchestration.simulator_utils import create_basic_hosts
e = exp.Experiment('qemu-e1000-pair')
net = sim.SwitchNet()
e.add_network(net)
servers = create_basic_hosts(
e,
1,
'server',
net,
sim.E1000NIC,
sim.QemuHost,
node.E1000LinuxNode,
node.IperfTCPServer
)
clients = create_basic_hosts(
e,
1,
'client',
net,
sim.E1000NIC,
sim.QemuHost,
node.E1000LinuxNode,
node.IperfTCPClient,
ip_start=2
)
for c in clients:
c.wait = True
c.node_config.app.server_ip = servers[0].node_config.ip
experiments = [e]
# Copyright 2021 Max Planck Institute for Software Systems, and
# National University of Singapore
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import simbricks.orchestration.experiments as exp
import simbricks.orchestration.nodeconfig as node
import simbricks.orchestration.simulators as sim
from simbricks.orchestration.simulator_utils import create_basic_hosts
e = exp.Experiment('qemu-i40e-pair')
net = sim.SwitchNet()
e.add_network(net)
servers = create_basic_hosts(
e,
1,
'server',
net,
sim.I40eNIC,
sim.QemuHost,
node.I40eLinuxNode,
node.IperfTCPServer
)
clients = create_basic_hosts(
e,
2,
'client',
net,
sim.I40eNIC,
sim.QemuHost,
node.I40eLinuxNode,
node.IperfTCPClient,
ip_start=2
)
for c in clients:
c.wait = True
c.node_config.app.server_ip = servers[0].node_config.ip
experiments = [e]
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