Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
7549fa9e
Commit
7549fa9e
authored
Jul 09, 2022
by
Jonas Kaufmann
Committed by
Antoine Kaufmann
Jul 12, 2022
Browse files
pre-commit run -a
parent
aac98df8
Changes
89
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
909 additions
and
546 deletions
+909
-546
experiments/pyexps/ae/nopaxos.py
experiments/pyexps/ae/nopaxos.py
+45
-12
experiments/pyexps/ae/t1_netperf.py
experiments/pyexps/ae/t1_netperf.py
+32
-11
experiments/pyexps/ae/utils/iperf.py
experiments/pyexps/ae/utils/iperf.py
+11
-7
experiments/pyexps/ae/utils/netperf.py
experiments/pyexps/ae/utils/netperf.py
+5
-4
experiments/pyexps/ae/utils/parse_nopaxos.py
experiments/pyexps/ae/utils/parse_nopaxos.py
+4
-4
experiments/pyexps/dctcp.py
experiments/pyexps/dctcp.py
+46
-19
experiments/pyexps/dist_memcache.py
experiments/pyexps/dist_memcache.py
+139
-111
experiments/pyexps/dist_multinet.py
experiments/pyexps/dist_multinet.py
+103
-82
experiments/pyexps/dist_netperf.py
experiments/pyexps/dist_netperf.py
+30
-8
experiments/pyexps/femutest.py
experiments/pyexps/femutest.py
+4
-4
experiments/pyexps/gem5_i40e_pair.py
experiments/pyexps/gem5_i40e_pair.py
+24
-6
experiments/pyexps/gt_tcp_multi.py
experiments/pyexps/gt_tcp_multi.py
+69
-24
experiments/pyexps/gt_tcp_single.py
experiments/pyexps/gt_tcp_single.py
+69
-23
experiments/pyexps/gt_udp_multi.py
experiments/pyexps/gt_udp_multi.py
+69
-24
experiments/pyexps/log_parser.py
experiments/pyexps/log_parser.py
+18
-18
experiments/pyexps/modetcp.py
experiments/pyexps/modetcp.py
+38
-21
experiments/pyexps/mtcp_cores.py
experiments/pyexps/mtcp_cores.py
+62
-53
experiments/pyexps/mtcp_httpd.py
experiments/pyexps/mtcp_httpd.py
+19
-9
experiments/pyexps/mtcp_mpcs.py
experiments/pyexps/mtcp_mpcs.py
+60
-53
experiments/pyexps/mtcp_msgsz.py
experiments/pyexps/mtcp_msgsz.py
+62
-53
No files found.
experiments/pyexps/ae/nopaxos.py
View file @
7549fa9e
...
@@ -20,11 +20,12 @@
...
@@ -20,11 +20,12 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
host_configs
=
[
'qt'
]
host_configs
=
[
'qt'
]
seq_configs
=
[
'swseq'
,
'ehseq'
,
'tofino'
]
seq_configs
=
[
'swseq'
,
'ehseq'
,
'tofino'
]
nic_configs
=
[
'ib'
]
nic_configs
=
[
'ib'
]
...
@@ -33,7 +34,7 @@ num_client_configs = [1, 2, 3, 4, 5, 6, 8, 10]
...
@@ -33,7 +34,7 @@ num_client_configs = [1, 2, 3, 4, 5, 6, 8, 10]
experiments
=
[]
experiments
=
[]
sync_period
=
200
sync_period
=
200
link_rate_opt
=
'--LinkRate=100Gb/s '
# don't forget space at the end
link_rate_opt
=
'--LinkRate=100Gb/s '
# don't forget space at the end
link_latency_opt
=
'--LinkLatency=500ns '
link_latency_opt
=
'--LinkLatency=500ns '
for
proto_config
in
proto_configs
:
for
proto_config
in
proto_configs
:
...
@@ -41,7 +42,10 @@ for proto_config in proto_configs:
...
@@ -41,7 +42,10 @@ for proto_config in proto_configs:
for
host_config
in
host_configs
:
for
host_config
in
host_configs
:
for
seq_config
in
seq_configs
:
for
seq_config
in
seq_configs
:
for
nic_config
in
nic_configs
:
for
nic_config
in
nic_configs
:
e
=
exp
.
Experiment
(
proto_config
+
'-'
+
host_config
+
'-'
+
nic_config
+
'-'
+
seq_config
+
f
'-
{
num_c
}
'
)
e
=
exp
.
Experiment
(
proto_config
+
'-'
+
host_config
+
'-'
+
nic_config
+
'-'
+
seq_config
+
f
'-
{
num_c
}
'
)
if
seq_config
==
'tofino'
:
if
seq_config
==
'tofino'
:
net
=
sim
.
TofinoNet
()
net
=
sim
.
TofinoNet
()
else
:
else
:
...
@@ -58,10 +62,12 @@ for proto_config in proto_configs:
...
@@ -58,10 +62,12 @@ for proto_config in proto_configs:
host_class
=
sim
.
Gem5Host
host_class
=
sim
.
Gem5Host
e
.
checkpoint
=
True
e
.
checkpoint
=
True
elif
host_config
==
'qt'
:
elif
host_config
==
'qt'
:
def
qemu_timing
():
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
=
sim
.
QemuHost
()
h
.
sync
=
True
h
.
sync
=
True
return
h
return
h
host_class
=
qemu_timing
host_class
=
qemu_timing
else
:
else
:
raise
NameError
(
host_config
)
raise
NameError
(
host_config
)
...
@@ -79,7 +85,6 @@ for proto_config in proto_configs:
...
@@ -79,7 +85,6 @@ for proto_config in proto_configs:
else
:
else
:
raise
NameError
(
nic_config
)
raise
NameError
(
nic_config
)
# app
# app
if
proto_config
==
'vr'
:
if
proto_config
==
'vr'
:
replica_class
=
node
.
VRReplica
replica_class
=
node
.
VRReplica
...
@@ -92,25 +97,53 @@ for proto_config in proto_configs:
...
@@ -92,25 +97,53 @@ for proto_config in proto_configs:
# endhost sequencer
# endhost sequencer
if
seq_config
==
'ehseq'
and
proto_config
==
'nopaxos'
:
if
seq_config
==
'ehseq'
and
proto_config
==
'nopaxos'
:
sequencer
=
create_basic_hosts
(
e
,
1
,
'sequencer'
,
net
,
nic_class
,
sequencer
=
create_basic_hosts
(
host_class
,
nc_class
,
node
.
NOPaxosSequencer
,
ip_start
=
100
)
e
,
1
,
'sequencer'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NOPaxosSequencer
,
ip_start
=
100
)
sequencer
[
0
].
node_config
.
disk_image
=
'nopaxos'
sequencer
[
0
].
node_config
.
disk_image
=
'nopaxos'
sequencer
[
0
].
pcidevs
[
0
].
sync_period
=
sync_period
sequencer
[
0
].
pcidevs
[
0
].
sync_period
=
sync_period
sequencer
[
0
].
sync_period
=
sync_period
sequencer
[
0
].
sync_period
=
sync_period
replicas
=
create_basic_hosts
(
e
,
3
,
'replica'
,
net
,
nic_class
,
replicas
=
create_basic_hosts
(
host_class
,
nc_class
,
replica_class
)
e
,
3
,
'replica'
,
net
,
nic_class
,
host_class
,
nc_class
,
replica_class
)
for
i
in
range
(
len
(
replicas
)):
for
i
in
range
(
len
(
replicas
)):
replicas
[
i
].
node_config
.
app
.
index
=
i
replicas
[
i
].
node_config
.
app
.
index
=
i
replicas
[
i
].
node_config
.
disk_image
=
'nopaxos'
replicas
[
i
].
node_config
.
disk_image
=
'nopaxos'
replicas
[
i
].
pcidevs
[
0
].
sync_period
=
sync_period
replicas
[
i
].
pcidevs
[
0
].
sync_period
=
sync_period
replicas
[
i
].
sync_period
=
sync_period
replicas
[
i
].
sync_period
=
sync_period
clients
=
create_basic_hosts
(
e
,
num_c
,
'client'
,
net
,
nic_class
,
clients
=
create_basic_hosts
(
host_class
,
nc_class
,
client_class
,
ip_start
=
4
)
e
,
num_c
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
client_class
,
ip_start
=
4
)
for
c
in
clients
:
for
c
in
clients
:
c
.
node_config
.
app
.
server_ips
=
[
'10.0.0.1'
,
'10.0.0.2'
,
'10.0.0.3'
]
c
.
node_config
.
app
.
server_ips
=
[
'10.0.0.1'
,
'10.0.0.2'
,
'10.0.0.3'
]
if
seq_config
==
'ehseq'
:
if
seq_config
==
'ehseq'
:
c
.
node_config
.
app
.
server_ips
.
append
(
'10.0.0.100'
)
c
.
node_config
.
app
.
server_ips
.
append
(
'10.0.0.100'
)
c
.
node_config
.
app
.
use_ehseq
=
True
c
.
node_config
.
app
.
use_ehseq
=
True
...
...
experiments/pyexps/ae/t1_netperf.py
View file @
7549fa9e
...
@@ -28,23 +28,23 @@
...
@@ -28,23 +28,23 @@
# Nic type has Intel_i40e behavioral model(ib), corundum behavioral model(cb), corundum verilator(cv)
# Nic type has Intel_i40e behavioral model(ib), corundum behavioral model(cb), corundum verilator(cv)
# Net type has Switch behavioral model(sw), ns-3(ns3)
# Net type has Switch behavioral model(sw), ns-3(ns3)
#
#
# In each simulation, two hosts are connected by a switch
# In each simulation, two hosts are connected by a switch
# [HOST_0] - [NIC_0] ---- [SWITCH] ---- [NIC_1] - [HOST_1]
# [HOST_0] - [NIC_0] ---- [SWITCH] ---- [NIC_1] - [HOST_1]
# server client
# server client
#
#
# The server host runs netperf server and client host runs TCP_RR and
# The server host runs netperf server and client host runs TCP_RR and
# TCP_STREAM test
# TCP_STREAM test
#
#
# The command to run all the experiments is:
# The command to run all the experiments is:
# $: python3 run.py pyexps/ae/t1_combination.py --filter nf-* --verbose
# $: python3 run.py pyexps/ae/t1_combination.py --filter nf-* --verbose
########################################################################
########################################################################
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
host_types
=
[
'qemu'
,
'gt'
,
'qt'
]
host_types
=
[
'qemu'
,
'gt'
,
'qt'
]
nic_types
=
[
'ib'
,
'cb'
,
'cv'
]
nic_types
=
[
'ib'
,
'cb'
,
'cv'
]
net_types
=
[
'sw'
,
'ns3'
]
net_types
=
[
'sw'
,
'ns3'
]
...
@@ -55,7 +55,9 @@ experiments = []
...
@@ -55,7 +55,9 @@ experiments = []
for
host_type
in
host_types
:
for
host_type
in
host_types
:
for
nic_type
in
nic_types
:
for
nic_type
in
nic_types
:
for
net_type
in
net_types
:
for
net_type
in
net_types
:
e
=
exp
.
Experiment
(
'nf-'
+
host_type
+
'-'
+
net_type
+
'-'
+
nic_type
)
e
=
exp
.
Experiment
(
'nf-'
+
host_type
+
'-'
+
net_type
+
'-'
+
nic_type
)
# network
# network
if
net_type
==
'sw'
:
if
net_type
==
'sw'
:
...
@@ -70,10 +72,12 @@ for host_type in host_types:
...
@@ -70,10 +72,12 @@ for host_type in host_types:
if
host_type
==
'qemu'
:
if
host_type
==
'qemu'
:
host_class
=
sim
.
QemuHost
host_class
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
elif
host_type
==
'qt'
:
def
qemu_timing
():
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
=
sim
.
QemuHost
()
h
.
sync
=
True
h
.
sync
=
True
return
h
return
h
host_class
=
qemu_timing
host_class
=
qemu_timing
elif
host_type
==
'gt'
:
elif
host_type
==
'gt'
:
host_class
=
sim
.
Gem5Host
host_class
=
sim
.
Gem5Host
...
@@ -95,11 +99,28 @@ for host_type in host_types:
...
@@ -95,11 +99,28 @@ for host_type in host_types:
raise
NameError
(
nic_type
)
raise
NameError
(
nic_type
)
# create servers and clients
# create servers and clients
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
servers
=
create_basic_hosts
(
nc_class
,
node
.
NetperfServer
)
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfServer
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
clients
=
create_basic_hosts
(
nc_class
,
node
.
NetperfClient
,
ip_start
=
2
)
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfClient
,
ip_start
=
2
)
for
c
in
clients
:
for
c
in
clients
:
c
.
wait
=
True
c
.
wait
=
True
...
...
experiments/pyexps/ae/utils/iperf.py
View file @
7549fa9e
...
@@ -20,16 +20,19 @@
...
@@ -20,16 +20,19 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
fnmatch
import
glob
import
glob
import
itertools
import
json
import
json
import
os
import
os
import
fnmatch
import
re
import
re
import
itertools
import
sys
import
sys
def
parse_iperf_run
(
data
,
skip
=
1
,
use
=
8
):
def
parse_iperf_run
(
data
,
skip
=
1
,
use
=
8
):
tp_pat
=
re
.
compile
(
r
'\[ *\d*\] *([0-9\.]*)- *([0-9\.]*) sec.*Bytes *([0-9\.]*) ([GM])bits.*'
)
tp_pat
=
re
.
compile
(
r
'\[ *\d*\] *([0-9\.]*)- *([0-9\.]*) sec.*Bytes *([0-9\.]*) ([GM])bits.*'
)
tps_time
=
{}
tps_time
=
{}
for
hn
in
fnmatch
.
filter
(
data
[
'sims'
].
keys
(),
'host.client.*'
):
for
hn
in
fnmatch
.
filter
(
data
[
'sims'
].
keys
(),
'host.client.*'
):
sim
=
data
[
'sims'
][
hn
]
sim
=
data
[
'sims'
][
hn
]
...
@@ -50,7 +53,7 @@ def parse_iperf_run(data, skip=1, use=8):
...
@@ -50,7 +53,7 @@ def parse_iperf_run(data, skip=1, use=8):
if
m
.
group
(
4
)
==
'G'
:
if
m
.
group
(
4
)
==
'G'
:
tps_time
[
time
].
append
(
float
(
m
.
group
(
3
)))
tps_time
[
time
].
append
(
float
(
m
.
group
(
3
)))
elif
m
.
group
(
4
)
==
'M'
:
elif
m
.
group
(
4
)
==
'M'
:
m_tps
=
float
(
m
.
group
(
3
))
/
1000
m_tps
=
float
(
m
.
group
(
3
))
/
1000
tps_time
[
time
].
append
(
m_tps
)
tps_time
[
time
].
append
(
m_tps
)
tps
=
[]
tps
=
[]
...
@@ -58,11 +61,11 @@ def parse_iperf_run(data, skip=1, use=8):
...
@@ -58,11 +61,11 @@ def parse_iperf_run(data, skip=1, use=8):
x
=
sum
(
tps_time
[
t
])
x
=
sum
(
tps_time
[
t
])
tps
.
append
(
x
)
tps
.
append
(
x
)
if
len
(
tps
)
==
0
:
if
len
(
tps
)
==
0
:
return
None
return
None
return
sum
(
tps
)
/
len
(
tps
)
return
sum
(
tps
)
/
len
(
tps
)
def
parse_iperf
(
basename
,
skip
=
1
,
use
=
8
):
def
parse_iperf
(
basename
,
skip
=
1
,
use
=
8
):
runs
=
[]
runs
=
[]
for
path
in
glob
.
glob
(
basename
+
'-*.json'
):
for
path
in
glob
.
glob
(
basename
+
'-*.json'
):
...
@@ -79,6 +82,7 @@ def parse_iperf(basename, skip=1, use=8):
...
@@ -79,6 +82,7 @@ def parse_iperf(basename, skip=1, use=8):
if
not
runs
:
if
not
runs
:
return
{
'avg'
:
None
,
'min'
:
None
,
'max'
:
None
}
return
{
'avg'
:
None
,
'min'
:
None
,
'max'
:
None
}
else
:
else
:
return
{
'avg'
:
sum
(
runs
)
/
len
(
runs
),
'min'
:
min
(
runs
),
return
{
'max'
:
max
(
runs
)}
'avg'
:
sum
(
runs
)
/
len
(
runs
),
'min'
:
min
(
runs
),
'max'
:
max
(
runs
)
}
result
=
{}
result
=
{}
experiments/pyexps/ae/utils/netperf.py
View file @
7549fa9e
...
@@ -21,8 +21,9 @@
...
@@ -21,8 +21,9 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
json
import
json
import
re
import
os
import
os
import
re
def
parse_netperf_run
(
path
):
def
parse_netperf_run
(
path
):
ret
=
{}
ret
=
{}
...
@@ -50,8 +51,6 @@ def parse_netperf_run(path):
...
@@ -50,8 +51,6 @@ def parse_netperf_run(path):
m
=
tp_pat
.
match
(
tp_line
)
m
=
tp_pat
.
match
(
tp_line
)
ret
[
'throughput'
]
=
float
(
m
.
group
(
1
))
ret
[
'throughput'
]
=
float
(
m
.
group
(
1
))
lath_pat
=
re
.
compile
(
r
'\s*Mean Latency.*'
)
lath_pat
=
re
.
compile
(
r
'\s*Mean Latency.*'
)
start
=
None
start
=
None
i
=
0
i
=
0
...
@@ -64,7 +63,9 @@ def parse_netperf_run(path):
...
@@ -64,7 +63,9 @@ def parse_netperf_run(path):
if
start
is
not
None
:
if
start
is
not
None
:
lat_line
=
lines
[
start
+
1
]
lat_line
=
lines
[
start
+
1
]
lat_pat
=
re
.
compile
(
r
'\s*([-0-9\.]*),([-0-9\.]*),([-0-9\.]*),([-0-9\.]*).*'
)
lat_pat
=
re
.
compile
(
r
'\s*([-0-9\.]*),([-0-9\.]*),([-0-9\.]*),([-0-9\.]*).*'
)
m
=
lat_pat
.
match
(
lat_line
)
m
=
lat_pat
.
match
(
lat_line
)
ret
[
'latenyMean'
]
=
float
(
m
.
group
(
1
))
ret
[
'latenyMean'
]
=
float
(
m
.
group
(
1
))
ret
[
'latenyTail'
]
=
float
(
m
.
group
(
4
))
ret
[
'latenyTail'
]
=
float
(
m
.
group
(
4
))
...
...
experiments/pyexps/ae/utils/parse_nopaxos.py
View file @
7549fa9e
...
@@ -21,8 +21,9 @@
...
@@ -21,8 +21,9 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
json
import
json
import
re
import
os
import
os
import
re
def
parse_nopaxos_run
(
num_c
,
path
):
def
parse_nopaxos_run
(
num_c
,
path
):
...
@@ -45,7 +46,7 @@ def parse_nopaxos_run(num_c, path):
...
@@ -45,7 +46,7 @@ def parse_nopaxos_run(num_c, path):
sim_name
=
f
'host.client.
{
i
}
'
sim_name
=
f
'host.client.
{
i
}
'
# in this host log stdout
# in this host log stdout
for
j
in
log
[
"
sims
"
][
sim_name
][
"
stdout
"
]:
for
j
in
log
[
'
sims
'
][
sim_name
][
'
stdout
'
]:
m_t
=
tp_pat
.
match
(
j
)
m_t
=
tp_pat
.
match
(
j
)
m_l
=
lat_pat
.
match
(
j
)
m_l
=
lat_pat
.
match
(
j
)
if
m_l
:
if
m_l
:
...
@@ -53,8 +54,7 @@ def parse_nopaxos_run(num_c, path):
...
@@ -53,8 +54,7 @@ def parse_nopaxos_run(num_c, path):
if
m_t
:
if
m_t
:
total_tput
+=
int
(
m_t
.
group
(
2
))
total_tput
+=
int
(
m_t
.
group
(
2
))
avg_lat
=
total_lat
/
num_c
avg_lat
=
total_lat
/
num_c
ret
[
'throughput'
]
=
total_tput
ret
[
'throughput'
]
=
total_tput
ret
[
'latency'
]
=
int
(
avg_lat
)
ret
[
'latency'
]
=
int
(
avg_lat
)
...
...
experiments/pyexps/dctcp.py
View file @
7549fa9e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_dctcp_hosts
from
simbricks.simulator_utils
import
create_dctcp_hosts
import
simbricks.experiments
as
exp
# iperf TCP_multi_client test
# iperf TCP_multi_client test
# naming convention following host-nic-net-app
# naming convention following host-nic-net-app
...
@@ -33,8 +33,8 @@ from simbricks.simulator_utils import create_dctcp_hosts
...
@@ -33,8 +33,8 @@ from simbricks.simulator_utils import create_dctcp_hosts
# net: switch/dumbbell/bridge
# net: switch/dumbbell/bridge
# app: DCTCPm
# app: DCTCPm
types_of_host
=
[
'qemu'
,
'qt'
,
'gt'
,
'gO3'
]
types_of_host
=
[
'qemu'
,
'qt'
,
'gt'
,
'gO3'
]
types_of_nic
=
[
'cv'
,
'cb'
,
'ib'
]
types_of_nic
=
[
'cv'
,
'cb'
,
'ib'
]
types_of_net
=
[
'dumbbell'
]
types_of_net
=
[
'dumbbell'
]
types_of_app
=
[
'DCTCPm'
]
types_of_app
=
[
'DCTCPm'
]
types_of_mtu
=
[
1500
,
4000
,
9000
]
types_of_mtu
=
[
1500
,
4000
,
9000
]
...
@@ -43,12 +43,12 @@ num_pairs = 2
...
@@ -43,12 +43,12 @@ num_pairs = 2
max_k
=
199680
max_k
=
199680
k_step
=
8320
k_step
=
8320
#k_step = 16640
#k_step = 16640
link_rate_opt
=
'--LinkRate=10Gb/s '
# don't forget space at the end
link_rate_opt
=
'--LinkRate=10Gb/s '
# don't forget space at the end
link_latency_opt
=
'--LinkLatency=500ns '
link_latency_opt
=
'--LinkLatency=500ns '
cpu_freq
=
'5GHz'
cpu_freq
=
'5GHz'
cpu_freq_qemu
=
'2GHz'
cpu_freq_qemu
=
'2GHz'
#mtu = 4000
#mtu = 4000
sys_clock
=
'1GHz'
# if not set, default 1GHz
sys_clock
=
'1GHz'
# if not set, default 1GHz
ip_start
=
'192.168.64.1'
ip_start
=
'192.168.64.1'
...
@@ -65,7 +65,10 @@ for mtu in types_of_mtu:
...
@@ -65,7 +65,10 @@ for mtu in types_of_mtu:
net
=
net_class
()
net
=
net_class
()
net
.
opt
=
link_rate_opt
+
link_latency_opt
+
f
'--EcnTh=
{
k_val
}
'
net
.
opt
=
link_rate_opt
+
link_latency_opt
+
f
'--EcnTh=
{
k_val
}
'
e
=
exp
.
Experiment
(
h
+
'-'
+
c
+
'-'
+
'dumbbell'
+
'-'
+
'DCTCPm'
+
f
'
{
k_val
}
'
+
f
'-
{
mtu
}
'
)
e
=
exp
.
Experiment
(
h
+
'-'
+
c
+
'-'
+
'dumbbell'
+
'-'
+
'DCTCPm'
+
f
'
{
k_val
}
'
+
f
'-
{
mtu
}
'
)
e
.
add_network
(
net
)
e
.
add_network
(
net
)
freq
=
cpu_freq
freq
=
cpu_freq
...
@@ -74,25 +77,31 @@ for mtu in types_of_mtu:
...
@@ -74,25 +77,31 @@ for mtu in types_of_mtu:
host_class
=
sim
.
QemuHost
host_class
=
sim
.
QemuHost
elif
h
==
'qt'
:
elif
h
==
'qt'
:
freq
=
cpu_freq_qemu
freq
=
cpu_freq_qemu
def
qemu_timing
():
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
=
sim
.
QemuHost
()
h
.
sync
=
True
h
.
sync
=
True
return
h
return
h
host_class
=
qemu_timing
host_class
=
qemu_timing
elif
h
==
'gt'
:
elif
h
==
'gt'
:
def
gem5_timing
():
def
gem5_timing
():
h
=
sim
.
Gem5Host
()
h
=
sim
.
Gem5Host
()
#h.sys_clock = sys_clock
#h.sys_clock = sys_clock
return
h
return
h
host_class
=
gem5_timing
host_class
=
gem5_timing
e
.
checkpoint
=
True
e
.
checkpoint
=
True
elif
h
==
'gO3'
:
elif
h
==
'gO3'
:
def
gem5_o3
():
def
gem5_o3
():
h
=
sim
.
Gem5Host
()
h
=
sim
.
Gem5Host
()
h
.
cpu_type
=
'DerivO3CPU'
h
.
cpu_type
=
'DerivO3CPU'
h
.
sys_clock
=
sys_clock
h
.
sys_clock
=
sys_clock
return
h
return
h
host_class
=
gem5_o3
host_class
=
gem5_o3
e
.
checkpoint
=
True
e
.
checkpoint
=
True
else
:
else
:
raise
NameError
(
h
)
raise
NameError
(
h
)
...
@@ -110,25 +119,43 @@ for mtu in types_of_mtu:
...
@@ -110,25 +119,43 @@ for mtu in types_of_mtu:
else
:
else
:
raise
NameError
(
c
)
raise
NameError
(
c
)
servers
=
create_dctcp_hosts
(
e
,
num_pairs
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
DctcpServer
,
freq
,
mtu
)
clients
=
create_dctcp_hosts
(
e
,
num_pairs
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
DctcpClient
,
freq
,
mtu
,
ip_start
=
num_pairs
+
1
)
servers
=
create_dctcp_hosts
(
e
,
num_pairs
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
DctcpServer
,
freq
,
mtu
)
clients
=
create_dctcp_hosts
(
e
,
num_pairs
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
DctcpClient
,
freq
,
mtu
,
ip_start
=
num_pairs
+
1
)
i
=
0
i
=
0
for
cl
in
clients
:
for
cl
in
clients
:
cl
.
node_config
.
app
.
server_ip
=
servers
[
i
].
node_config
.
ip
cl
.
node_config
.
app
.
server_ip
=
servers
[
i
].
node_config
.
ip
i
+=
1
i
+=
1
# All the clients will not poweroff after finishing iperf test except the last one
# All the clients will not poweroff after finishing iperf test except the last one
# This is to prevent the simulation gets stuck when one of host exits.
# This is to prevent the simulation gets stuck when one of host exits.
# The last client waits for the output printed in other hosts, then cleanup
# The last client waits for the output printed in other hosts, then cleanup
clients
[
num_pairs
-
1
].
node_config
.
app
.
is_last
=
True
clients
[
num_pairs
-
1
].
node_config
.
app
.
is_last
=
True
clients
[
num_pairs
-
1
].
wait
=
True
clients
[
num_pairs
-
1
].
wait
=
True
print
(
e
.
name
)
print
(
e
.
name
)
experiments
.
append
(
e
)
experiments
.
append
(
e
)
experiments/pyexps/dist_memcache.py
View file @
7549fa9e
...
@@ -22,12 +22,14 @@
...
@@ -22,12 +22,14 @@
import
math
import
math
import
random
import
random
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.proxy
as
proxy
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.proxy
as
proxy
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_multinic_hosts
from
simbricks.simulator_utils
import
create_multinic_hosts
import
simbricks.experiments
as
exp
host_types
=
[
'qemu'
,
'gem5'
,
'qt'
]
host_types
=
[
'qemu'
,
'gem5'
,
'qt'
]
n_nets
=
[
1
,
2
,
3
,
4
,
8
,
16
,
32
]
n_nets
=
[
1
,
2
,
3
,
4
,
8
,
16
,
32
]
n_hosts
=
[
2
,
10
,
20
,
30
,
35
,
40
,
50
,
60
,
70
,
80
]
n_hosts
=
[
2
,
10
,
20
,
30
,
35
,
40
,
50
,
60
,
70
,
80
]
...
@@ -36,6 +38,7 @@ separate_net = True
...
@@ -36,6 +38,7 @@ separate_net = True
nets_per_host
=
1
nets_per_host
=
1
def
select_servers
(
i
,
j
,
racks
,
n
,
n_host
):
def
select_servers
(
i
,
j
,
racks
,
n
,
n_host
):
nc
=
int
(
n_host
/
2
)
nc
=
int
(
n_host
/
2
)
...
@@ -56,115 +59,140 @@ def select_servers(i, j, racks, n, n_host):
...
@@ -56,115 +59,140 @@ def select_servers(i, j, racks, n, n_host):
servers_other
=
random
.
sample
(
all_other_servers
,
k
=
n_remote
)
servers_other
=
random
.
sample
(
all_other_servers
,
k
=
n_remote
)
return
servers_local
+
servers_other
return
servers_local
+
servers_other
for
host_type
in
host_types
:
for
host_type
in
host_types
:
for
n
in
n_nets
:
for
n
in
n_nets
:
for
n_host
in
n_hosts
:
for
n_host
in
n_hosts
:
random
.
seed
(
n
+
1000
*
n_host
)
random
.
seed
(
n
+
1000
*
n_host
)
nh
=
math
.
ceil
(
n
/
nets_per_host
)
nh
=
math
.
ceil
(
n
/
nets_per_host
)
if
separate_net
:
nh
+=
1
e
=
exp
.
DistributedExperiment
(
f
'dist_memcache-
{
host_type
}
-
{
n
}
-
{
n_host
}
'
,
nh
)
# host
if
host_type
==
'qemu'
:
host_class
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
.
sync
=
True
return
h
host_class
=
qemu_timing
elif
host_type
==
'gem5'
:
host_class
=
sim
.
Gem5Host
e
.
checkpoint
=
False
else
:
raise
NameError
(
host_type
)
switch_top
=
sim
.
SwitchNet
()
switch_top
.
name
=
'switch_top'
if
host_type
==
'qemu'
:
switch_top
.
sync
=
False
e
.
add_network
(
switch_top
)
e
.
assign_sim_host
(
switch_top
,
0
)
racks
=
[]
for
i
in
range
(
0
,
n
):
h_i
=
int
(
i
/
nets_per_host
)
if
separate_net
:
if
separate_net
:
h_i
+=
1
nh
+=
1
e
=
exp
.
DistributedExperiment
(
f
'dist_memcache-
{
host_type
}
-
{
n
}
-
{
n_host
}
'
,
nh
)
switch
=
sim
.
SwitchNet
()
# host
switch
.
name
=
'switch_%d'
%
(
i
,)
if
host_type
==
'qemu'
:
host_class
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
.
sync
=
True
return
h
host_class
=
qemu_timing
elif
host_type
==
'gem5'
:
host_class
=
sim
.
Gem5Host
e
.
checkpoint
=
False
else
:
raise
NameError
(
host_type
)
switch_top
=
sim
.
SwitchNet
()
switch_top
.
name
=
'switch_top'
if
host_type
==
'qemu'
:
if
host_type
==
'qemu'
:
switch
.
sync
=
False
switch_top
.
sync
=
False
e
.
add_network
(
switch
)
e
.
add_network
(
switch_top
)
e
.
assign_sim_host
(
switch
,
h_i
)
e
.
assign_sim_host
(
switch_top
,
0
)
switch_top
.
connect_network
(
switch
)
racks
=
[]
for
i
in
range
(
0
,
n
):
# create servers and clients
h_i
=
int
(
i
/
nets_per_host
)
m
=
int
(
n_host
/
2
)
if
separate_net
:
servers
=
create_multinic_hosts
(
e
,
m
,
'server_%d'
%
(
i
,),
h_i
+=
1
switch
,
host_class
,
node
.
I40eLinuxNode
,
node
.
MemcachedServer
,
ip_start
=
i
*
n_host
+
1
,
switch
=
sim
.
SwitchNet
()
ip_prefix
=
16
)
switch
.
name
=
'switch_%d'
%
(
i
,)
for
s
in
servers
:
if
host_type
==
'qemu'
:
e
.
assign_sim_host
(
s
,
h_i
)
switch
.
sync
=
False
s_multisubnic
=
next
(
pcidev
for
pcidev
in
s
.
pcidevs
if
isinstance
(
pcidev
,
sim
.
MultiSubNIC
))
e
.
add_network
(
switch
)
e
.
assign_sim_host
(
s_multisubnic
.
multinic
,
h_i
)
e
.
assign_sim_host
(
switch
,
h_i
)
clients
=
create_multinic_hosts
(
e
,
m
,
'client_%d'
%
(
i
,),
switch_top
.
connect_network
(
switch
)
switch
,
host_class
,
node
.
I40eLinuxNode
,
node
.
MemcachedClient
,
ip_start
=
i
*
n_host
+
1
+
m
,
# create servers and clients
ip_prefix
=
16
)
m
=
int
(
n_host
/
2
)
for
c
in
clients
:
servers
=
create_multinic_hosts
(
c
.
wait
=
True
e
,
e
.
assign_sim_host
(
c
,
h_i
)
m
,
c_multisubnic
=
next
(
pcidev
for
pcidev
in
c
.
pcidevs
if
isinstance
(
pcidev
,
sim
.
MultiSubNIC
))
'server_%d'
%
(
i
,),
e
.
assign_sim_host
(
c_multisubnic
.
multinic
,
h_i
)
switch
,
host_class
,
racks
.
append
((
servers
,
clients
))
node
.
I40eLinuxNode
,
node
.
MemcachedServer
,
if
h_i
!=
0
:
ip_start
=
i
*
n_host
+
1
,
lp
=
proxy
.
SocketsNetProxyListener
()
ip_prefix
=
16
lp
.
name
=
'listener-%d'
%
(
i
,)
)
e
.
add_proxy
(
lp
)
for
s
in
servers
:
e
.
assign_sim_host
(
lp
,
h_i
)
e
.
assign_sim_host
(
s
,
h_i
)
s_multisubnic
=
next
(
cp
=
proxy
.
SocketsNetProxyConnecter
(
lp
)
pcidev
for
pcidev
in
s
.
pcidevs
cp
.
name
=
'connecter-%d'
%
(
i
,)
if
isinstance
(
pcidev
,
sim
.
MultiSubNIC
)
e
.
add_proxy
(
cp
)
)
e
.
assign_sim_host
(
cp
,
0
)
e
.
assign_sim_host
(
s_multisubnic
.
multinic
,
h_i
)
lp
.
add_n2n
(
switch_top
,
switch
)
clients
=
create_multinic_hosts
(
e
,
for
c
in
clients
+
servers
:
m
,
if
host_type
==
'qt'
:
'client_%d'
%
(
i
,),
c
.
pcidevs
[
0
].
start_tick
=
580000000000
switch
,
c
.
extra_deps
.
append
(
switch_top
)
host_class
,
node
.
I40eLinuxNode
,
all_servers
=
[]
node
.
MemcachedClient
,
all_clients
=
[]
ip_start
=
i
*
n_host
+
1
+
m
,
for
(
s
,
c
)
in
racks
:
ip_prefix
=
16
all_servers
+=
s
)
all_clients
+=
c
for
c
in
clients
:
c
.
wait
=
True
# set up client -> server connections
e
.
assign_sim_host
(
c
,
h_i
)
for
i
in
range
(
0
,
n
):
c_multisubnic
=
next
(
for
j
in
range
(
0
,
int
(
n_host
/
2
)):
pcidev
for
pcidev
in
c
.
pcidevs
c
=
racks
[
i
][
1
][
j
]
if
isinstance
(
pcidev
,
sim
.
MultiSubNIC
)
servers
=
select_servers
(
i
,
j
,
racks
,
n
,
n_host
)
)
server_ips
=
[
s
.
node_config
.
ip
for
s
in
servers
]
e
.
assign_sim_host
(
c_multisubnic
.
multinic
,
h_i
)
c
.
node_config
.
app
.
server_ips
=
server_ips
racks
.
append
((
servers
,
clients
))
c
.
node_config
.
app
.
threads
=
len
(
server_ips
)
c
.
node_config
.
app
.
concurrency
=
len
(
server_ips
)
if
h_i
!=
0
:
c
.
extra_deps
+=
all_servers
lp
=
proxy
.
SocketsNetProxyListener
()
lp
.
name
=
'listener-%d'
%
(
i
,)
for
h
in
all_servers
+
all_clients
:
e
.
add_proxy
(
lp
)
h
.
node_config
.
disk_image
=
'memcached'
e
.
assign_sim_host
(
lp
,
h_i
)
# add to experiments
cp
=
proxy
.
SocketsNetProxyConnecter
(
lp
)
experiments
.
append
(
e
)
cp
.
name
=
'connecter-%d'
%
(
i
,)
e
.
add_proxy
(
cp
)
e
.
assign_sim_host
(
cp
,
0
)
lp
.
add_n2n
(
switch_top
,
switch
)
for
c
in
clients
+
servers
:
if
host_type
==
'qt'
:
c
.
pcidevs
[
0
].
start_tick
=
580000000000
c
.
extra_deps
.
append
(
switch_top
)
all_servers
=
[]
all_clients
=
[]
for
(
s
,
c
)
in
racks
:
all_servers
+=
s
all_clients
+=
c
# set up client -> server connections
for
i
in
range
(
0
,
n
):
for
j
in
range
(
0
,
int
(
n_host
/
2
)):
c
=
racks
[
i
][
1
][
j
]
servers
=
select_servers
(
i
,
j
,
racks
,
n
,
n_host
)
server_ips
=
[
s
.
node_config
.
ip
for
s
in
servers
]
c
.
node_config
.
app
.
server_ips
=
server_ips
c
.
node_config
.
app
.
threads
=
len
(
server_ips
)
c
.
node_config
.
app
.
concurrency
=
len
(
server_ips
)
c
.
extra_deps
+=
all_servers
for
h
in
all_servers
+
all_clients
:
h
.
node_config
.
disk_image
=
'memcached'
# add to experiments
experiments
.
append
(
e
)
experiments/pyexps/dist_multinet.py
View file @
7549fa9e
...
@@ -20,12 +20,13 @@
...
@@ -20,12 +20,13 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.proxy
as
proxy
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.proxy
as
proxy
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
host_types
=
[
'qemu'
,
'gem5'
,
'qt'
]
host_types
=
[
'qemu'
,
'gem5'
,
'qt'
]
n_nets
=
[
1
,
2
,
3
,
4
]
n_nets
=
[
1
,
2
,
3
,
4
]
n_clients
=
[
1
,
10
,
20
,
30
,
40
,
50
]
n_clients
=
[
1
,
10
,
20
,
30
,
40
,
50
]
...
@@ -34,84 +35,104 @@ separate_net = False
...
@@ -34,84 +35,104 @@ separate_net = False
separate_server
=
True
separate_server
=
True
for
host_type
in
host_types
:
for
host_type
in
host_types
:
for
n
in
n_nets
:
for
n
in
n_nets
:
for
n_client
in
n_clients
:
for
n_client
in
n_clients
:
nh
=
n
if
not
separate_net
else
n
+
1
nh
=
n
if
not
separate_net
else
n
+
1
e
=
exp
.
DistributedExperiment
(
f
'dist_multinet-
{
host_type
}
-
{
n
}
-
{
n_client
}
'
,
nh
)
e
=
exp
.
DistributedExperiment
(
f
'dist_multinet-
{
host_type
}
-
{
n
}
-
{
n_client
}
'
,
nh
# host
)
if
host_type
==
'qemu'
:
host_class
=
sim
.
QemuHost
# host
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
.
sync
=
True
return
h
host_class
=
qemu_timing
elif
host_type
==
'gem5'
:
host_class
=
sim
.
Gem5Host
e
.
checkpoint
=
True
else
:
raise
NameError
(
host_type
)
switch_top
=
sim
.
SwitchNet
()
switch_top
.
name
=
'switch_top'
if
host_type
==
'qemu'
:
switch_top
.
sync
=
False
e
.
add_network
(
switch_top
)
e
.
assign_sim_host
(
switch_top
,
0
)
for
i
in
range
(
0
,
n
):
h_i
=
i
if
not
separate_net
else
i
+
1
switch
=
sim
.
SwitchNet
()
switch
.
name
=
'switch_%d'
%
(
i
,)
if
host_type
==
'qemu'
:
if
host_type
==
'qemu'
:
switch
.
sync
=
False
host_class
=
sim
.
QemuHost
e
.
add_network
(
switch
)
elif
host_type
==
'qt'
:
e
.
assign_sim_host
(
switch
,
h_i
)
def
qemu_timing
():
switch_top
.
connect_network
(
switch
)
h
=
sim
.
QemuHost
()
h
.
sync
=
True
# create servers and clients
return
h
m
=
n_client
if
i
==
0
or
separate_server
:
host_class
=
qemu_timing
servers
=
create_basic_hosts
(
e
,
1
,
'server_%d'
%
(
i
,),
elif
host_type
==
'gem5'
:
switch
,
sim
.
I40eNIC
,
host_class
,
node
.
I40eLinuxNode
,
host_class
=
sim
.
Gem5Host
node
.
NetperfServer
,
ip_start
=
i
*
(
n_client
+
1
)
+
1
)
e
.
checkpoint
=
True
if
not
separate_server
:
else
:
m
=
m
-
1
raise
NameError
(
host_type
)
e
.
assign_sim_host
(
servers
[
0
],
h_i
)
switch_top
=
sim
.
SwitchNet
()
e
.
assign_sim_host
(
servers
[
0
].
pcidevs
[
0
],
h_i
)
switch_top
.
name
=
'switch_top'
if
host_type
==
'qemu'
:
clients
=
create_basic_hosts
(
e
,
m
,
'client_%d'
%
(
i
,),
switch_top
.
sync
=
False
switch
,
sim
.
I40eNIC
,
host_class
,
node
.
I40eLinuxNode
,
e
.
add_network
(
switch_top
)
node
.
NetperfClient
,
ip_start
=
i
*
(
n_client
+
1
)
+
2
)
e
.
assign_sim_host
(
switch_top
,
0
)
for
c
in
clients
:
for
i
in
range
(
0
,
n
):
c
.
wait
=
True
h_i
=
i
if
not
separate_net
else
i
+
1
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
switch
=
sim
.
SwitchNet
()
switch
.
name
=
'switch_%d'
%
(
i
,)
if
host_type
==
'qemu'
:
if
host_type
==
'qemu'
:
c
.
extra_deps
.
append
(
servers
[
0
])
switch
.
sync
=
False
e
.
add_network
(
switch
)
e
.
assign_sim_host
(
c
,
h_i
)
e
.
assign_sim_host
(
switch
,
h_i
)
e
.
assign_sim_host
(
c
.
pcidevs
[
0
],
h_i
)
switch_top
.
connect_network
(
switch
)
if
h_i
!=
0
:
lp
=
proxy
.
SocketsNetProxyListener
()
# create servers and clients
lp
.
name
=
'listener-%d'
%
(
i
,)
m
=
n_client
e
.
add_proxy
(
lp
)
if
i
==
0
or
separate_server
:
e
.
assign_sim_host
(
lp
,
h_i
)
servers
=
create_basic_hosts
(
e
,
cp
=
proxy
.
SocketsNetProxyConnecter
(
lp
)
1
,
cp
.
name
=
'connecter-%d'
%
(
i
,)
'server_%d'
%
(
i
,),
e
.
add_proxy
(
cp
)
switch
,
e
.
assign_sim_host
(
cp
,
0
)
sim
.
I40eNIC
,
host_class
,
lp
.
add_n2n
(
switch_top
,
switch
)
node
.
I40eLinuxNode
,
node
.
NetperfServer
,
for
c
in
clients
+
servers
:
ip_start
=
i
*
(
n_client
+
1
)
+
1
c
.
pcidevs
[
0
].
start_tick
=
580000000000
)
if
not
separate_server
:
# add to experiments
m
=
m
-
1
experiments
.
append
(
e
)
e
.
assign_sim_host
(
servers
[
0
],
h_i
)
e
.
assign_sim_host
(
servers
[
0
].
pcidevs
[
0
],
h_i
)
clients
=
create_basic_hosts
(
e
,
m
,
'client_%d'
%
(
i
,),
switch
,
sim
.
I40eNIC
,
host_class
,
node
.
I40eLinuxNode
,
node
.
NetperfClient
,
ip_start
=
i
*
(
n_client
+
1
)
+
2
)
for
c
in
clients
:
c
.
wait
=
True
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
if
host_type
==
'qemu'
:
c
.
extra_deps
.
append
(
servers
[
0
])
e
.
assign_sim_host
(
c
,
h_i
)
e
.
assign_sim_host
(
c
.
pcidevs
[
0
],
h_i
)
if
h_i
!=
0
:
lp
=
proxy
.
SocketsNetProxyListener
()
lp
.
name
=
'listener-%d'
%
(
i
,)
e
.
add_proxy
(
lp
)
e
.
assign_sim_host
(
lp
,
h_i
)
cp
=
proxy
.
SocketsNetProxyConnecter
(
lp
)
cp
.
name
=
'connecter-%d'
%
(
i
,)
e
.
add_proxy
(
cp
)
e
.
assign_sim_host
(
cp
,
0
)
lp
.
add_n2n
(
switch_top
,
switch
)
for
c
in
clients
+
servers
:
c
.
pcidevs
[
0
].
start_tick
=
580000000000
# add to experiments
experiments
.
append
(
e
)
experiments/pyexps/dist_netperf.py
View file @
7549fa9e
...
@@ -20,12 +20,13 @@
...
@@ -20,12 +20,13 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.proxy
as
proxy
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.proxy
as
proxy
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
host_types
=
[
'qemu'
,
'gem5'
,
'qt'
]
host_types
=
[
'qemu'
,
'gem5'
,
'qt'
]
nic_types
=
[
'i40e'
,
'cd_bm'
,
'cd_verilator'
]
nic_types
=
[
'i40e'
,
'cd_bm'
,
'cd_verilator'
]
n_clients
=
[
1
,
4
,
8
,
16
,
32
]
n_clients
=
[
1
,
4
,
8
,
16
,
32
]
...
@@ -34,7 +35,9 @@ experiments = []
...
@@ -34,7 +35,9 @@ experiments = []
for
host_type
in
host_types
:
for
host_type
in
host_types
:
for
nic_type
in
nic_types
:
for
nic_type
in
nic_types
:
for
n
in
n_clients
:
for
n
in
n_clients
:
e
=
exp
.
DistributedExperiment
(
f
'dist_netperf-
{
host_type
}
-
{
nic_type
}
-
{
n
}
'
,
2
)
e
=
exp
.
DistributedExperiment
(
f
'dist_netperf-
{
host_type
}
-
{
nic_type
}
-
{
n
}
'
,
2
)
net
=
sim
.
SwitchNet
()
net
=
sim
.
SwitchNet
()
e
.
add_network
(
net
)
e
.
add_network
(
net
)
...
@@ -44,10 +47,12 @@ for host_type in host_types:
...
@@ -44,10 +47,12 @@ for host_type in host_types:
host_class
=
sim
.
QemuHost
host_class
=
sim
.
QemuHost
net
.
sync
=
False
net
.
sync
=
False
elif
host_type
==
'qt'
:
elif
host_type
==
'qt'
:
def
qemu_timing
():
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
=
sim
.
QemuHost
()
h
.
sync
=
True
h
.
sync
=
True
return
h
return
h
host_class
=
qemu_timing
host_class
=
qemu_timing
elif
host_type
==
'gem5'
:
elif
host_type
==
'gem5'
:
host_class
=
sim
.
Gem5Host
host_class
=
sim
.
Gem5Host
...
@@ -69,11 +74,28 @@ for host_type in host_types:
...
@@ -69,11 +74,28 @@ for host_type in host_types:
raise
NameError
(
nic_type
)
raise
NameError
(
nic_type
)
# create servers and clients
# create servers and clients
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
servers
=
create_basic_hosts
(
nc_class
,
node
.
NetperfServer
)
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfServer
)
clients
=
create_basic_hosts
(
e
,
n
,
'client'
,
net
,
nic_class
,
host_class
,
clients
=
create_basic_hosts
(
nc_class
,
node
.
NetperfClient
,
ip_start
=
2
)
e
,
n
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfClient
,
ip_start
=
2
)
for
c
in
clients
:
for
c
in
clients
:
c
.
wait
=
True
c
.
wait
=
True
...
...
experiments/pyexps/femutest.py
View file @
7549fa9e
...
@@ -20,9 +20,10 @@
...
@@ -20,9 +20,10 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
import
simbricks.experiments
as
exp
experiments
=
[]
experiments
=
[]
...
@@ -45,11 +46,10 @@ for h in ['qk', 'gk']:
...
@@ -45,11 +46,10 @@ for h in ['qk', 'gk']:
e
.
add_host
(
host
)
e
.
add_host
(
host
)
host
.
wait
=
True
host
.
wait
=
True
femu
=
sim
.
FEMUDev
()
femu
=
sim
.
FEMUDev
()
femu
.
name
=
'femu0'
femu
.
name
=
'femu0'
e
.
add_pcidev
(
femu
)
e
.
add_pcidev
(
femu
)
host
.
add_pcidev
(
femu
)
host
.
add_pcidev
(
femu
)
experiments
.
append
(
e
)
experiments
.
append
(
e
)
\ No newline at end of file
experiments/pyexps/gem5_i40e_pair.py
View file @
7549fa9e
...
@@ -20,22 +20,40 @@
...
@@ -20,22 +20,40 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
e
=
exp
.
Experiment
(
'gem5-i40e-pair'
)
e
=
exp
.
Experiment
(
'gem5-i40e-pair'
)
#e.timeout = 5 * 60
#e.timeout = 5 * 60
e
.
checkpoint
=
True
e
.
checkpoint
=
True
net
=
sim
.
SwitchNet
()
net
=
sim
.
SwitchNet
()
e
.
add_network
(
net
)
e
.
add_network
(
net
)
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
I40eLinuxNode
,
node
.
IperfTCPServer
)
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
node
.
I40eLinuxNode
,
node
.
IperfTCPServer
)
clients
=
create_basic_hosts
(
e
,
2
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
clients
=
create_basic_hosts
(
node
.
I40eLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
e
,
2
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
node
.
I40eLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
for
h
in
servers
+
clients
:
for
h
in
servers
+
clients
:
h
.
cpu_type
=
'TimingSimpleCPU'
h
.
cpu_type
=
'TimingSimpleCPU'
...
...
experiments/pyexps/gt_tcp_multi.py
View file @
7549fa9e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
# iperf TCP_multi_client test
# iperf TCP_multi_client test
# naming convention following host-nic-net-app
# naming convention following host-nic-net-app
...
@@ -34,7 +34,7 @@ from simbricks.simulator_utils import create_basic_hosts
...
@@ -34,7 +34,7 @@ from simbricks.simulator_utils import create_basic_hosts
# app: TCPm
# app: TCPm
kinds_of_host
=
[
'gem5-timing'
]
kinds_of_host
=
[
'gem5-timing'
]
kinds_of_nic
=
[
'cv'
,
'cb'
,
'ib'
]
kinds_of_nic
=
[
'cv'
,
'cb'
,
'ib'
]
kinds_of_net
=
[
'switch'
,
'dumbbell'
,
'bridge'
]
kinds_of_net
=
[
'switch'
,
'dumbbell'
,
'bridge'
]
kinds_of_app
=
[
'TCPm'
]
kinds_of_app
=
[
'TCPm'
]
...
@@ -52,40 +52,85 @@ for n in kinds_of_net:
...
@@ -52,40 +52,85 @@ for n in kinds_of_net:
if
n
==
'bridge'
:
if
n
==
'bridge'
:
net_class
=
sim
.
NS3BridgeNet
net_class
=
sim
.
NS3BridgeNet
# set nic sim
# set nic sim
for
c
in
kinds_of_nic
:
for
c
in
kinds_of_nic
:
net
=
net_class
()
net
=
net_class
()
e
=
exp
.
Experiment
(
'gt-'
+
c
+
'-'
+
n
+
'-'
+
'TCPm'
)
e
=
exp
.
Experiment
(
'gt-'
+
c
+
'-'
+
n
+
'-'
+
'TCPm'
)
e
.
add_network
(
net
)
e
.
add_network
(
net
)
e
.
checkpoint
=
True
e
.
checkpoint
=
True
if
c
==
'cv'
:
if
c
==
'cv'
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
CorundumLinuxNode
,
node
.
IperfTCPServer
)
e
,
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
1
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
'server'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPServer
)
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
if
c
==
'cb'
:
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
CorundumLinuxNode
,
node
.
IperfTCPServer
)
e
,
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
1
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
'server'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPServer
)
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
if
c
==
'ib'
:
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
I40eLinuxNode
,
node
.
IperfTCPServer
)
e
,
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
1
,
node
.
I40eLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
node
.
I40eLinuxNode
,
node
.
IperfTCPServer
)
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
node
.
I40eLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
for
cl
in
clients
:
for
cl
in
clients
:
cl
.
wait
=
True
cl
.
wait
=
True
cl
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
cl
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
print
(
e
.
name
)
print
(
e
.
name
)
experiments
.
append
(
e
)
experiments
.
append
(
e
)
experiments/pyexps/gt_tcp_single.py
View file @
7549fa9e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
# iperf TCP_single test
# iperf TCP_single test
# naming convention following host-nic-net-app
# naming convention following host-nic-net-app
...
@@ -34,7 +34,7 @@ from simbricks.simulator_utils import create_basic_hosts
...
@@ -34,7 +34,7 @@ from simbricks.simulator_utils import create_basic_hosts
# app: TCPs
# app: TCPs
kinds_of_host
=
[
'gem5-timing'
]
kinds_of_host
=
[
'gem5-timing'
]
kinds_of_nic
=
[
'cv'
,
'cb'
,
'ib'
]
kinds_of_nic
=
[
'cv'
,
'cb'
,
'ib'
]
kinds_of_net
=
[
'wire'
,
'switch'
,
'dumbbell'
,
'bridge'
]
kinds_of_net
=
[
'wire'
,
'switch'
,
'dumbbell'
,
'bridge'
]
kinds_of_app
=
[
'TCPs'
]
kinds_of_app
=
[
'TCPs'
]
...
@@ -51,38 +51,84 @@ for n in kinds_of_net:
...
@@ -51,38 +51,84 @@ for n in kinds_of_net:
if
n
==
'bridge'
:
if
n
==
'bridge'
:
net_class
=
sim
.
NS3BridgeNet
net_class
=
sim
.
NS3BridgeNet
# set nic sim
# set nic sim
for
c
in
kinds_of_nic
:
for
c
in
kinds_of_nic
:
net
=
net_class
()
net
=
net_class
()
e
=
exp
.
Experiment
(
'gt-'
+
c
+
'-'
+
n
+
'-'
+
'TCPs'
)
e
=
exp
.
Experiment
(
'gt-'
+
c
+
'-'
+
n
+
'-'
+
'TCPs'
)
e
.
checkpoint
=
True
e
.
checkpoint
=
True
e
.
add_network
(
net
)
e
.
add_network
(
net
)
if
c
==
'cv'
:
if
c
==
'cv'
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
CorundumLinuxNode
,
node
.
IperfTCPServer
)
e
,
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
1
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
'server'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPServer
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
if
c
==
'cb'
:
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
CorundumLinuxNode
,
node
.
IperfTCPServer
)
e
,
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
1
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
'server'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPServer
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
if
c
==
'ib'
:
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
I40eLinuxNode
,
node
.
IperfTCPServer
)
e
,
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
1
,
node
.
I40eLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
node
.
I40eLinuxNode
,
node
.
IperfTCPServer
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
node
.
I40eLinuxNode
,
node
.
IperfTCPClient
,
ip_start
=
2
)
clients
[
0
].
wait
=
True
clients
[
0
].
wait
=
True
clients
[
0
].
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
clients
[
0
].
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
print
(
e
.
name
)
print
(
e
.
name
)
experiments
.
append
(
e
)
experiments
.
append
(
e
)
experiments/pyexps/gt_udp_multi.py
View file @
7549fa9e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
# iperf TCP_multi_client test
# iperf TCP_multi_client test
# naming convention following host-nic-net-app
# naming convention following host-nic-net-app
...
@@ -34,7 +34,7 @@ from simbricks.simulator_utils import create_basic_hosts
...
@@ -34,7 +34,7 @@ from simbricks.simulator_utils import create_basic_hosts
# app: UDPm
# app: UDPm
kinds_of_host
=
[
'gem5-timing'
]
kinds_of_host
=
[
'gem5-timing'
]
kinds_of_nic
=
[
'cv'
,
'cb'
,
'ib'
]
kinds_of_nic
=
[
'cv'
,
'cb'
,
'ib'
]
kinds_of_net
=
[
'switch'
,
'dumbbell'
,
'bridge'
]
kinds_of_net
=
[
'switch'
,
'dumbbell'
,
'bridge'
]
kinds_of_app
=
[
'UDPm'
]
kinds_of_app
=
[
'UDPm'
]
...
@@ -53,36 +53,82 @@ for n in kinds_of_net:
...
@@ -53,36 +53,82 @@ for n in kinds_of_net:
if
n
==
'bridge'
:
if
n
==
'bridge'
:
net_class
=
sim
.
NS3BridgeNet
net_class
=
sim
.
NS3BridgeNet
# set nic sim
# set nic sim
for
c
in
kinds_of_nic
:
for
c
in
kinds_of_nic
:
net
=
net_class
()
net
=
net_class
()
e
=
exp
.
Experiment
(
'gt-'
+
c
+
'-'
+
n
+
'-'
+
'UDPm'
)
e
=
exp
.
Experiment
(
'gt-'
+
c
+
'-'
+
n
+
'-'
+
'UDPm'
)
e
.
checkpoint
=
True
e
.
checkpoint
=
True
e
.
add_network
(
net
)
e
.
add_network
(
net
)
if
c
==
'cv'
:
if
c
==
'cv'
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
CorundumLinuxNode
,
node
.
IperfUDPServer
)
e
,
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
1
,
node
.
CorundumLinuxNode
,
node
.
IperfUDPClient
,
ip_start
=
2
)
'server'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfUDPServer
)
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
CorundumVerilatorNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfUDPClient
,
ip_start
=
2
)
if
c
==
'cb'
:
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
CorundumLinuxNode
,
node
.
IperfUDPServer
)
e
,
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
1
,
node
.
CorundumLinuxNode
,
node
.
IperfUDPClient
,
ip_start
=
2
)
'server'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfUDPServer
)
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
Gem5Host
,
node
.
CorundumLinuxNode
,
node
.
IperfUDPClient
,
ip_start
=
2
)
if
c
==
'ib'
:
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
servers
=
create_basic_hosts
(
node
.
I40eLinuxNode
,
node
.
IperfUDPServer
)
e
,
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
1
,
node
.
I40eLinuxNode
,
node
.
IperfUDPClient
,
ip_start
=
2
)
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
node
.
I40eLinuxNode
,
node
.
IperfUDPServer
)
clients
=
create_basic_hosts
(
e
,
num_client
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
Gem5Host
,
node
.
I40eLinuxNode
,
node
.
IperfUDPClient
,
ip_start
=
2
)
for
cl
in
clients
:
for
cl
in
clients
:
cl
.
wait
=
True
cl
.
wait
=
True
cl
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
cl
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
...
@@ -90,4 +136,3 @@ for n in kinds_of_net:
...
@@ -90,4 +136,3 @@ for n in kinds_of_net:
print
(
e
.
name
)
print
(
e
.
name
)
experiments
.
append
(
e
)
experiments
.
append
(
e
)
experiments/pyexps/log_parser.py
View file @
7549fa9e
...
@@ -20,15 +20,15 @@
...
@@ -20,15 +20,15 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
sys
import
json
import
os
import
os
import
pathlib
import
pathlib
import
shutil
import
json
import
re
import
re
import
shutil
import
sys
# How to use
# How to use
# $ python3 pyexps/parser.py out/qemu-wire-ib-TCPs-1.json
# $ python3 pyexps/parser.py out/qemu-wire-ib-TCPs-1.json
#
#
log_file
=
sys
.
argv
[
1
]
log_file
=
sys
.
argv
[
1
]
...
@@ -44,30 +44,30 @@ tooutdir = f'/{exp_name}/{run_num}'
...
@@ -44,30 +44,30 @@ tooutdir = f'/{exp_name}/{run_num}'
outdir
=
'/'
.
join
(
list
(
p
.
parts
)[
0
:
-
1
])
+
tooutdir
outdir
=
'/'
.
join
(
list
(
p
.
parts
)[
0
:
-
1
])
+
tooutdir
if
not
os
.
path
.
exists
(
outdir
):
if
not
os
.
path
.
exists
(
outdir
):
raise
Exception
(
"
no such directory
"
)
raise
Exception
(
'
no such directory
'
)
start_end_path
=
os
.
path
.
join
(
outdir
,
'start_end.txt'
)
start_end_path
=
os
.
path
.
join
(
outdir
,
'start_end.txt'
)
start_end_file
=
open
(
start_end_path
,
'w'
)
start_end_file
=
open
(
start_end_path
,
'w'
)
start_end_file
.
write
(
'start time: '
+
str
(
exp_log
[
"
start_time
"
])
+
'
\n
'
)
start_end_file
.
write
(
'start time: '
+
str
(
exp_log
[
'
start_time
'
])
+
'
\n
'
)
start_end_file
.
write
(
'end time: '
+
str
(
exp_log
[
"
end_time
"
])
+
'
\n
'
)
start_end_file
.
write
(
'end time: '
+
str
(
exp_log
[
'
end_time
'
])
+
'
\n
'
)
start_end_file
.
write
(
'success: '
+
str
(
exp_log
[
"
success
"
]))
start_end_file
.
write
(
'success: '
+
str
(
exp_log
[
'
success
'
]))
start_end_file
.
close
()
start_end_file
.
close
()
for
i
in
exp_log
[
"
sims
"
]:
for
i
in
exp_log
[
'
sims
'
]:
#print(i)
#print(i)
simdir
=
os
.
path
.
join
(
outdir
,
i
)
simdir
=
os
.
path
.
join
(
outdir
,
i
)
sim_out_file
=
open
(
simdir
,
'w'
)
sim_out_file
=
open
(
simdir
,
'w'
)
for
j
in
exp_log
[
"
sims
"
][
i
]:
for
j
in
exp_log
[
'
sims
'
][
i
]:
#print(j)
#print(j)
sim_out_file
.
write
(
j
+
'
\n
'
)
sim_out_file
.
write
(
j
+
'
\n
'
)
if
(
j
==
'class'
):
sim_out_file
.
write
(
exp_log
[
'sims'
][
i
][
j
]
+
'
\n
'
)
if
(
j
==
'class'
):
sim_out_file
.
write
(
exp_log
[
"sims"
][
i
][
j
]
+
'
\n
'
)
else
:
else
:
for
k
in
exp_log
[
"
sims
"
][
i
][
j
]:
for
k
in
exp_log
[
'
sims
'
][
i
][
j
]:
sim_out_file
.
write
(
k
+
'
\n
'
)
sim_out_file
.
write
(
k
+
'
\n
'
)
sim_out_file
.
close
()
sim_out_file
.
close
()
experiments/pyexps/modetcp.py
View file @
7549fa9e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
# iperf TCP_multi_client test
# iperf TCP_multi_client test
# naming convention following host-nic-net-app
# naming convention following host-nic-net-app
...
@@ -33,20 +33,18 @@ from simbricks.simulator_utils import create_basic_hosts
...
@@ -33,20 +33,18 @@ from simbricks.simulator_utils import create_basic_hosts
# net: switch/dumbbell/bridge
# net: switch/dumbbell/bridge
# app: DCTCPm
# app: DCTCPm
types_of_host
=
[
'qemu'
,
'qt'
,
'gt'
]
types_of_host
=
[
'qemu'
,
'qt'
,
'gt'
]
types_of_nic
=
[
'ib'
,
'cv'
,
'cb'
]
types_of_nic
=
[
'ib'
,
'cv'
,
'cb'
]
types_of_net
=
[
'switch'
]
types_of_net
=
[
'switch'
]
types_of_app
=
[
'TCPm'
]
types_of_app
=
[
'TCPm'
]
types_of_num_pairs
=
[
1
,
4
]
types_of_num_pairs
=
[
1
,
4
]
types_of_mode
=
[
0
,
1
]
types_of_mode
=
[
0
,
1
]
experiments
=
[]
experiments
=
[]
for
mode
in
types_of_mode
:
for
mode
in
types_of_mode
:
for
num_pairs
in
types_of_num_pairs
:
for
num_pairs
in
types_of_num_pairs
:
for
h
in
types_of_host
:
for
h
in
types_of_host
:
for
c
in
types_of_nic
:
for
c
in
types_of_nic
:
...
@@ -54,29 +52,36 @@ for mode in types_of_mode:
...
@@ -54,29 +52,36 @@ for mode in types_of_mode:
net
.
sync_mode
=
mode
net
.
sync_mode
=
mode
#net.opt = link_rate_opt + link_latency_opt
#net.opt = link_rate_opt + link_latency_opt
e
=
exp
.
Experiment
(
f
'mode-
{
mode
}
-'
+
h
+
'-'
+
c
+
'-'
+
'switch'
+
f
'-
{
num_pairs
}
'
)
e
=
exp
.
Experiment
(
f
'mode-
{
mode
}
-'
+
h
+
'-'
+
c
+
'-'
+
'switch'
+
f
'-
{
num_pairs
}
'
)
e
.
add_network
(
net
)
e
.
add_network
(
net
)
# host
# host
if
h
==
'qemu'
:
if
h
==
'qemu'
:
host_class
=
sim
.
QemuHost
host_class
=
sim
.
QemuHost
elif
h
==
'qt'
:
elif
h
==
'qt'
:
def
qemu_timing
():
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
=
sim
.
QemuHost
()
h
.
sync
=
True
h
.
sync
=
True
return
h
return
h
host_class
=
qemu_timing
host_class
=
qemu_timing
elif
h
==
'gt'
:
elif
h
==
'gt'
:
def
gem5_timing
():
def
gem5_timing
():
h
=
sim
.
Gem5Host
()
h
=
sim
.
Gem5Host
()
return
h
return
h
host_class
=
gem5_timing
host_class
=
gem5_timing
e
.
checkpoint
=
True
e
.
checkpoint
=
True
else
:
else
:
raise
NameError
(
h
)
raise
NameError
(
h
)
# nic
# nic
if
c
==
'cb'
:
if
c
==
'cb'
:
nic_class
=
sim
.
CorundumBMNIC
nic_class
=
sim
.
CorundumBMNIC
nc_class
=
node
.
CorundumLinuxNode
nc_class
=
node
.
CorundumLinuxNode
...
@@ -89,19 +94,32 @@ for mode in types_of_mode:
...
@@ -89,19 +94,32 @@ for mode in types_of_mode:
else
:
else
:
raise
NameError
(
c
)
raise
NameError
(
c
)
servers
=
create_basic_hosts
(
servers
=
create_basic_hosts
(
e
,
num_pairs
,
'server'
,
net
,
nic_class
,
host_class
,
e
,
nc_class
,
node
.
IperfTCPServer
)
num_pairs
,
clients
=
create_basic_hosts
(
e
,
num_pairs
,
'client'
,
net
,
nic_class
,
host_class
,
'server'
,
nc_class
,
node
.
IperfTCPClient
,
ip_start
=
num_pairs
+
1
)
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfTCPServer
)
clients
=
create_basic_hosts
(
e
,
num_pairs
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfTCPClient
,
ip_start
=
num_pairs
+
1
)
for
se
in
servers
:
for
se
in
servers
:
se
.
sync_mode
=
mode
se
.
sync_mode
=
mode
se
.
pcidevs
[
0
].
sync_mode
=
mode
se
.
pcidevs
[
0
].
sync_mode
=
mode
i
=
0
i
=
0
for
cl
in
clients
:
for
cl
in
clients
:
cl
.
sync_mode
=
mode
cl
.
sync_mode
=
mode
...
@@ -110,14 +128,13 @@ for mode in types_of_mode:
...
@@ -110,14 +128,13 @@ for mode in types_of_mode:
cl
.
node_config
.
app
.
procs
=
2
cl
.
node_config
.
app
.
procs
=
2
i
+=
1
i
+=
1
#cl.wait = True
#cl.wait = True
# All the clients will not poweroff after finishing iperf test except the last one
# All the clients will not poweroff after finishing iperf test except the last one
# This is to prevent the simulation gets stuck when one of host exits.
# This is to prevent the simulation gets stuck when one of host exits.
# The last client waits for the output printed in other hosts, then cleanup
# The last client waits for the output printed in other hosts, then cleanup
clients
[
num_pairs
-
1
].
node_config
.
app
.
is_last
=
True
clients
[
num_pairs
-
1
].
node_config
.
app
.
is_last
=
True
clients
[
num_pairs
-
1
].
wait
=
True
clients
[
num_pairs
-
1
].
wait
=
True
print
(
e
.
name
)
print
(
e
.
name
)
experiments
.
append
(
e
)
experiments
.
append
(
e
)
experiments/pyexps/mtcp_cores.py
View file @
7549fa9e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
server_cores_configs
=
[
1
,
2
,
4
,
8
]
server_cores_configs
=
[
1
,
2
,
4
,
8
]
stacks
=
[
'linux'
,
'mtcp'
]
stacks
=
[
'linux'
,
'mtcp'
]
...
@@ -35,54 +35,63 @@ msg_size = 64
...
@@ -35,54 +35,63 @@ msg_size = 64
experiments
=
[]
experiments
=
[]
for
server_cores
in
server_cores_configs
:
for
server_cores
in
server_cores_configs
:
for
stack
in
stacks
:
for
stack
in
stacks
:
e
=
exp
.
Experiment
(
'qemu-ib-switch-mtcp_cores-%s-%d'
%
(
stack
,
server_cores
))
e
=
exp
.
Experiment
(
e
.
timeout
=
5
*
60
'qemu-ib-switch-mtcp_cores-%s-%d'
%
(
stack
,
server_cores
)
# add meta data for output file
)
e
.
metadata
[
'msg_size'
]
=
msg_size
e
.
timeout
=
5
*
60
e
.
metadata
[
'stack'
]
=
stack
# add meta data for output file
e
.
metadata
[
'msg_size'
]
=
msg_size
net
=
sim
.
SwitchNet
()
e
.
metadata
[
'stack'
]
=
stack
e
.
add_network
(
net
)
net
=
sim
.
SwitchNet
()
if
stack
==
'tas'
:
e
.
add_network
(
net
)
n
=
node
.
TASNode
elif
stack
==
'mtcp'
:
if
stack
==
'tas'
:
n
=
node
.
MtcpNode
n
=
node
.
TASNode
else
:
elif
stack
==
'mtcp'
:
n
=
node
.
I40eLinuxNode
n
=
node
.
MtcpNode
else
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
n
=
node
.
I40eLinuxNode
n
,
node
.
RPCServer
)
servers
=
create_basic_hosts
(
clients
=
create_basic_hosts
(
e
,
num_clients
,
'client'
,
net
,
sim
.
I40eNIC
,
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
n
,
node
.
RPCServer
sim
.
QemuHost
,
n
,
node
.
RPCClient
,
ip_start
=
2
)
)
for
h
in
servers
:
clients
=
create_basic_hosts
(
h
.
node_config
.
cores
=
server_cores
e
,
h
.
node_config
.
app
.
threads
=
server_cores
num_clients
,
h
.
node_config
.
app
.
max_flows
=
connections
*
4
'client'
,
h
.
sleep
=
5
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
n
,
for
c
in
clients
:
node
.
RPCClient
,
c
.
wait
=
True
ip_start
=
2
c
.
node_config
.
cores
=
client_cores
)
c
.
node_config
.
app
.
threads
=
client_cores
for
h
in
servers
:
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
h
.
node_config
.
cores
=
server_cores
c
.
node_config
.
app
.
max_msgs_conn
=
1
h
.
node_config
.
app
.
threads
=
server_cores
c
.
node_config
.
app
.
max_flows
=
\
h
.
node_config
.
app
.
max_flows
=
connections
*
4
int
(
connections
/
num_clients
/
client_cores
)
h
.
sleep
=
5
for
h
in
servers
+
clients
:
for
c
in
clients
:
h
.
node_config
.
app
.
max_bytes
=
msg_size
c
.
wait
=
True
c
.
node_config
.
cores
=
client_cores
if
stack
==
'linux'
:
c
.
node_config
.
app
.
threads
=
client_cores
h
.
node_config
.
disk_image
=
'tas'
elif
stack
==
'tas'
:
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
c
.
node_config
.
cores
+=
2
c
.
node_config
.
app
.
max_msgs_conn
=
1
c
.
node_config
.
fp_cores
=
1
c
.
node_config
.
app
.
max_flows
=
\
experiments
.
append
(
e
)
int
(
connections
/
num_clients
/
client_cores
)
for
h
in
servers
+
clients
:
h
.
node_config
.
app
.
max_bytes
=
msg_size
if
stack
==
'linux'
:
h
.
node_config
.
disk_image
=
'tas'
elif
stack
==
'tas'
:
c
.
node_config
.
cores
+=
2
c
.
node_config
.
fp_cores
=
1
experiments
.
append
(
e
)
experiments/pyexps/mtcp_httpd.py
View file @
7549fa9e
...
@@ -20,16 +20,17 @@
...
@@ -20,16 +20,17 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
configs
=
[
configs
=
[
(
node
.
I40eLinuxNode
,
node
.
HTTPDLinux
,
node
.
HTTPCLinux
,
'linux'
),
(
node
.
I40eLinuxNode
,
node
.
HTTPDLinux
,
node
.
HTTPCLinux
,
'linux'
),
(
node
.
I40eLinuxNode
,
node
.
HTTPDLinuxRPO
,
node
.
HTTPCLinux
,
'linuxrpo'
),
(
node
.
I40eLinuxNode
,
node
.
HTTPDLinuxRPO
,
node
.
HTTPCLinux
,
'linuxrpo'
),
(
node
.
MtcpNode
,
node
.
HTTPDMtcp
,
node
.
HTTPCMtcp
,
'mtcp'
)
(
node
.
MtcpNode
,
node
.
HTTPDMtcp
,
node
.
HTTPCMtcp
,
'mtcp'
)
]
]
server_cores
=
1
server_cores
=
1
client_cores
=
1
client_cores
=
1
...
@@ -41,16 +42,26 @@ experiments = []
...
@@ -41,16 +42,26 @@ experiments = []
for
(
nodec
,
appc
,
clientc
,
label
)
in
configs
:
for
(
nodec
,
appc
,
clientc
,
label
)
in
configs
:
e
=
exp
.
Experiment
(
'qemu-ib-switch-mtcp_httpd-%s'
%
(
label
))
e
=
exp
.
Experiment
(
'qemu-ib-switch-mtcp_httpd-%s'
%
(
label
))
e
.
timeout
=
5
*
60
e
.
timeout
=
5
*
60
net
=
sim
.
SwitchNet
()
net
=
sim
.
SwitchNet
()
e
.
add_network
(
net
)
e
.
add_network
(
net
)
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
servers
=
create_basic_hosts
(
sim
.
QemuHost
,
nodec
,
appc
)
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
nodec
,
appc
)
clients
=
create_basic_hosts
(
e
,
num_clients
,
'client'
,
net
,
sim
.
I40eNIC
,
clients
=
create_basic_hosts
(
sim
.
QemuHost
,
nodec
,
clientc
,
ip_start
=
2
)
e
,
num_clients
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
nodec
,
clientc
,
ip_start
=
2
)
for
h
in
servers
:
for
h
in
servers
:
h
.
node_config
.
cores
=
server_cores
h
.
node_config
.
cores
=
server_cores
...
@@ -70,4 +81,3 @@ for (nodec, appc, clientc, label) in configs:
...
@@ -70,4 +81,3 @@ for (nodec, appc, clientc, label) in configs:
for
h
in
servers
+
clients
:
for
h
in
servers
+
clients
:
h
.
node_config
.
disk_image
=
'mtcp'
h
.
node_config
.
disk_image
=
'mtcp'
experiments
.
append
(
e
)
experiments
.
append
(
e
)
experiments/pyexps/mtcp_mpcs.py
View file @
7549fa9e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
mpcs
=
[
1
,
8
,
128
]
mpcs
=
[
1
,
8
,
128
]
stacks
=
[
'linux'
,
'mtcp'
]
stacks
=
[
'linux'
,
'mtcp'
]
...
@@ -36,54 +36,61 @@ msg_size = 64
...
@@ -36,54 +36,61 @@ msg_size = 64
experiments
=
[]
experiments
=
[]
for
mpc
in
mpcs
:
for
mpc
in
mpcs
:
for
stack
in
stacks
:
for
stack
in
stacks
:
e
=
exp
.
Experiment
(
'qemu-ib-switch-mtcp_mpc-%s-%d'
%
(
stack
,
mpc
))
e
=
exp
.
Experiment
(
'qemu-ib-switch-mtcp_mpc-%s-%d'
%
(
stack
,
mpc
))
e
.
timeout
=
5
*
60
e
.
timeout
=
5
*
60
# add meta data for output file
# add meta data for output file
e
.
metadata
[
'mpc'
]
=
mpc
e
.
metadata
[
'mpc'
]
=
mpc
e
.
metadata
[
'stack'
]
=
stack
e
.
metadata
[
'stack'
]
=
stack
net
=
sim
.
SwitchNet
()
net
=
sim
.
SwitchNet
()
e
.
add_network
(
net
)
e
.
add_network
(
net
)
if
stack
==
'tas'
:
if
stack
==
'tas'
:
n
=
node
.
TASNode
n
=
node
.
TASNode
elif
stack
==
'mtcp'
:
elif
stack
==
'mtcp'
:
n
=
node
.
MtcpNode
n
=
node
.
MtcpNode
else
:
else
:
n
=
node
.
I40eLinuxNode
n
=
node
.
I40eLinuxNode
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
servers
=
create_basic_hosts
(
n
,
node
.
RPCServer
)
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
n
,
node
.
RPCServer
)
clients
=
create_basic_hosts
(
e
,
num_clients
,
'client'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
n
,
node
.
RPCClient
,
ip_start
=
2
)
clients
=
create_basic_hosts
(
e
,
for
h
in
servers
:
num_clients
,
h
.
node_config
.
cores
=
server_cores
'client'
,
h
.
node_config
.
app
.
threads
=
server_cores
net
,
h
.
node_config
.
app
.
max_flows
=
connections
*
4
sim
.
I40eNIC
,
h
.
sleep
=
5
sim
.
QemuHost
,
n
,
node
.
RPCClient
,
ip_start
=
2
for
c
in
clients
:
)
c
.
wait
=
True
c
.
node_config
.
cores
=
client_cores
for
h
in
servers
:
c
.
node_config
.
app
.
threads
=
client_cores
h
.
node_config
.
cores
=
server_cores
h
.
node_config
.
app
.
threads
=
server_cores
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
h
.
node_config
.
app
.
max_flows
=
connections
*
4
c
.
node_config
.
app
.
max_msgs_conn
=
mpc
h
.
sleep
=
5
c
.
node_config
.
app
.
max_flows
=
\
int
(
connections
/
num_clients
/
client_cores
)
for
c
in
clients
:
c
.
wait
=
True
for
h
in
servers
+
clients
:
c
.
node_config
.
cores
=
client_cores
h
.
node_config
.
app
.
max_bytes
=
msg_size
c
.
node_config
.
app
.
threads
=
client_cores
if
stack
==
'linux'
:
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
h
.
node_config
.
disk_image
=
'tas'
c
.
node_config
.
app
.
max_msgs_conn
=
mpc
elif
stack
==
'tas'
:
c
.
node_config
.
app
.
max_flows
=
\
c
.
node_config
.
cores
+=
2
int
(
connections
/
num_clients
/
client_cores
)
c
.
node_config
.
fp_cores
=
1
experiments
.
append
(
e
)
for
h
in
servers
+
clients
:
h
.
node_config
.
app
.
max_bytes
=
msg_size
if
stack
==
'linux'
:
h
.
node_config
.
disk_image
=
'tas'
elif
stack
==
'tas'
:
c
.
node_config
.
cores
+=
2
c
.
node_config
.
fp_cores
=
1
experiments
.
append
(
e
)
experiments/pyexps/mtcp_msgsz.py
View file @
7549fa9e
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
msg_sizes
=
[
64
,
1024
,
8092
]
msg_sizes
=
[
64
,
1024
,
8092
]
stacks
=
[
'linux'
,
'mtcp'
]
stacks
=
[
'linux'
,
'mtcp'
]
...
@@ -35,54 +35,63 @@ connections = 512
...
@@ -35,54 +35,63 @@ connections = 512
experiments
=
[]
experiments
=
[]
for
msg_size
in
msg_sizes
:
for
msg_size
in
msg_sizes
:
for
stack
in
stacks
:
for
stack
in
stacks
:
e
=
exp
.
Experiment
(
'qemu-ib-switch-mtcp_msgsz-%s-%d'
%
(
stack
,
msg_size
))
e
=
exp
.
Experiment
(
e
.
timeout
=
5
*
60
'qemu-ib-switch-mtcp_msgsz-%s-%d'
%
(
stack
,
msg_size
)
# add meta data for output file
)
e
.
metadata
[
'msg_size'
]
=
msg_size
e
.
timeout
=
5
*
60
e
.
metadata
[
'stack'
]
=
stack
# add meta data for output file
e
.
metadata
[
'msg_size'
]
=
msg_size
net
=
sim
.
SwitchNet
()
e
.
metadata
[
'stack'
]
=
stack
e
.
add_network
(
net
)
net
=
sim
.
SwitchNet
()
if
stack
==
'tas'
:
e
.
add_network
(
net
)
n
=
node
.
TASNode
elif
stack
==
'mtcp'
:
if
stack
==
'tas'
:
n
=
node
.
MtcpNode
n
=
node
.
TASNode
else
:
elif
stack
==
'mtcp'
:
n
=
node
.
I40eLinuxNode
n
=
node
.
MtcpNode
else
:
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
n
=
node
.
I40eLinuxNode
n
,
node
.
RPCServer
)
servers
=
create_basic_hosts
(
clients
=
create_basic_hosts
(
e
,
num_clients
,
'client'
,
net
,
sim
.
I40eNIC
,
e
,
1
,
'server'
,
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
n
,
node
.
RPCServer
sim
.
QemuHost
,
n
,
node
.
RPCClient
,
ip_start
=
2
)
)
for
h
in
servers
:
clients
=
create_basic_hosts
(
h
.
node_config
.
cores
=
server_cores
e
,
h
.
node_config
.
app
.
threads
=
server_cores
num_clients
,
h
.
node_config
.
app
.
max_flows
=
connections
*
4
'client'
,
h
.
sleep
=
5
net
,
sim
.
I40eNIC
,
sim
.
QemuHost
,
n
,
for
c
in
clients
:
node
.
RPCClient
,
c
.
wait
=
True
ip_start
=
2
c
.
node_config
.
cores
=
client_cores
)
c
.
node_config
.
app
.
threads
=
client_cores
for
h
in
servers
:
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
h
.
node_config
.
cores
=
server_cores
c
.
node_config
.
app
.
max_msgs_conn
=
1
h
.
node_config
.
app
.
threads
=
server_cores
c
.
node_config
.
app
.
max_flows
=
\
h
.
node_config
.
app
.
max_flows
=
connections
*
4
int
(
connections
/
num_clients
/
client_cores
)
h
.
sleep
=
5
for
h
in
servers
+
clients
:
for
c
in
clients
:
h
.
node_config
.
app
.
max_bytes
=
msg_size
c
.
wait
=
True
c
.
node_config
.
cores
=
client_cores
if
stack
==
'linux'
:
c
.
node_config
.
app
.
threads
=
client_cores
h
.
node_config
.
disk_image
=
'tas'
elif
stack
==
'tas'
:
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
c
.
node_config
.
cores
+=
2
c
.
node_config
.
app
.
max_msgs_conn
=
1
c
.
node_config
.
fp_cores
=
1
c
.
node_config
.
app
.
max_flows
=
\
experiments
.
append
(
e
)
int
(
connections
/
num_clients
/
client_cores
)
for
h
in
servers
+
clients
:
h
.
node_config
.
app
.
max_bytes
=
msg_size
if
stack
==
'linux'
:
h
.
node_config
.
disk_image
=
'tas'
elif
stack
==
'tas'
:
c
.
node_config
.
cores
+=
2
c
.
node_config
.
fp_cores
=
1
experiments
.
append
(
e
)
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment