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
"git@developer.sourcefind.cn:cnjsdfcy/simbricks.git" did not exist on "8134c8c2195062330e6973b7ad3d59d054c84080"
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
336 additions
and
196 deletions
+336
-196
experiments/cc/generate_json.py
experiments/cc/generate_json.py
+4
-4
experiments/pyexps/ScaleHost.py
experiments/pyexps/ScaleHost.py
+36
-23
experiments/pyexps/ScaleLoad.py
experiments/pyexps/ScaleLoad.py
+41
-15
experiments/pyexps/ae/corundum_pcilat.py
experiments/pyexps/ae/corundum_pcilat.py
+28
-11
experiments/pyexps/ae/data_cbpcilat.py
experiments/pyexps/ae/data_cbpcilat.py
+4
-4
experiments/pyexps/ae/data_decmp.py
experiments/pyexps/ae/data_decmp.py
+4
-7
experiments/pyexps/ae/data_dist.py
experiments/pyexps/ae/data_dist.py
+9
-7
experiments/pyexps/ae/data_host_scale.py
experiments/pyexps/ae/data_host_scale.py
+8
-6
experiments/pyexps/ae/data_netperf.py
experiments/pyexps/ae/data_netperf.py
+4
-4
experiments/pyexps/ae/data_nopaxos.py
experiments/pyexps/ae/data_nopaxos.py
+1
-0
experiments/pyexps/ae/data_ns3_dctcp.py
experiments/pyexps/ae/data_ns3_dctcp.py
+9
-8
experiments/pyexps/ae/data_pci_latency.py
experiments/pyexps/ae/data_pci_latency.py
+8
-6
experiments/pyexps/ae/data_sb_dctcp.py
experiments/pyexps/ae/data_sb_dctcp.py
+1
-1
experiments/pyexps/ae/data_sync_overhead.py
experiments/pyexps/ae/data_sync_overhead.py
+8
-6
experiments/pyexps/ae/determ.py
experiments/pyexps/ae/determ.py
+30
-15
experiments/pyexps/ae/f1_dctcp.py
experiments/pyexps/ae/f1_dctcp.py
+47
-20
experiments/pyexps/ae/f7_scale.py
experiments/pyexps/ae/f7_scale.py
+39
-23
experiments/pyexps/ae/f9_latency.py
experiments/pyexps/ae/f9_latency.py
+28
-11
experiments/pyexps/ae/no-simbricks.py
experiments/pyexps/ae/no-simbricks.py
+5
-12
experiments/pyexps/ae/no_traffic.py
experiments/pyexps/ae/no_traffic.py
+22
-13
No files found.
experiments/cc/generate_json.py
View file @
7549fa9e
import
sys
import
os
import
re
import
glob
import
json
import
os
import
re
import
sys
if
len
(
sys
.
argv
)
!=
2
:
print
(
'Usage: generate_json.py OUTDIR'
)
...
...
@@ -23,7 +23,7 @@ for f in glob.glob('testbed-results/*_*pktgap/*.txt'):
mtu
=
int
(
m
.
group
(
1
))
k
=
int
(
m
.
group
(
2
))
*
cellsz
runk
=
(
mtu
,
k
)
runk
=
(
mtu
,
k
)
clients
=
runmap
.
get
(
runk
,
{})
with
open
(
f
,
'r'
)
as
f
:
...
...
experiments/pyexps/ScaleHost.py
View file @
7549fa9e
...
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# 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.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
# iperf UDP test
# naming convention following host-nic-net-app
...
...
@@ -34,11 +34,11 @@ from simbricks.simulator_utils import create_basic_hosts
# app: UDPs
host_types
=
[
'gt'
,
'qt'
,
'qemu'
]
nic_types
=
[
'cv'
,
'cb'
,
'ib'
]
nic_types
=
[
'cv'
,
'cb'
,
'ib'
]
net_types
=
[
'sw'
,
'br'
]
app
=
[
'Host'
]
total_rate
=
1000
# Mbps
total_rate
=
1000
# Mbps
num_client_max
=
8
num_client_step
=
2
num_client_types
=
[
1
,
4
,
9
,
14
,
20
]
...
...
@@ -46,21 +46,21 @@ num_client_types = [1, 4, 9, 14, 20]
# num_client_types.append(n)
# print(n)
experiments
=
[]
for
n_client
in
num_client_types
:
per_client_rate
=
int
(
total_rate
/
n_client
)
per_client_rate
=
int
(
total_rate
/
n_client
)
rate
=
f
'
{
per_client_rate
}
m'
for
host_type
in
host_types
:
for
nic_type
in
nic_types
:
for
net_type
in
net_types
:
e
=
exp
.
Experiment
(
host_type
+
'-'
+
nic_type
+
'-'
+
net_type
+
'-Host-'
+
f
'
{
total_rate
}
m'
+
f
'-
{
n_client
}
'
)
e
=
exp
.
Experiment
(
host_type
+
'-'
+
nic_type
+
'-'
+
net_type
+
'-Host-'
+
f
'
{
total_rate
}
m'
+
f
'-
{
n_client
}
'
)
# network
if
net_type
==
'sw'
:
net
=
sim
.
SwitchNet
()
...
...
@@ -74,10 +74,12 @@ for n_client in num_client_types:
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
==
'gt'
:
host_class
=
sim
.
Gem5Host
...
...
@@ -99,27 +101,38 @@ for n_client in num_client_types:
raise
NameError
(
nic_type
)
# create servers and clients
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPServer
)
clients
=
create_basic_hosts
(
e
,
n_client
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPClient
,
ip_start
=
2
)
clients
[
n_client
-
1
].
node_config
.
app
.
is_last
=
True
clients
[
n_client
-
1
].
wait
=
True
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPServer
)
clients
=
create_basic_hosts
(
e
,
n_client
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPClient
,
ip_start
=
2
)
clients
[
n_client
-
1
].
node_config
.
app
.
is_last
=
True
clients
[
n_client
-
1
].
wait
=
True
for
c
in
clients
:
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
c
.
node_config
.
app
.
rate
=
rate
#c.wait = True
print
(
e
.
name
)
# add to experiments
experiments
.
append
(
e
)
experiments/pyexps/ScaleLoad.py
View file @
7549fa9e
...
...
@@ -20,11 +20,11 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# 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.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
# iperf UDP Load Scalability test
# naming convention following host-nic-net
...
...
@@ -34,7 +34,7 @@ from simbricks.simulator_utils import create_basic_hosts
# app: UDPs
host_types
=
[
'gt'
,
'qt'
,
'qemu'
]
nic_types
=
[
'cv'
,
'cb'
,
'ib'
]
nic_types
=
[
'cv'
,
'cb'
,
'ib'
]
net_types
=
[
'wire'
,
'sw'
,
'br'
]
app
=
[
'UDPs'
]
...
...
@@ -45,7 +45,6 @@ rate_step = 100
for
r
in
range
(
rate_start
,
rate_end
+
1
,
rate_step
):
rate
=
f
'
{
r
}
m'
rate_types
.
append
(
rate
)
experiments
=
[]
...
...
@@ -54,7 +53,10 @@ for rate in rate_types:
for
nic_type
in
nic_types
:
for
net_type
in
net_types
:
e
=
exp
.
Experiment
(
host_type
+
'-'
+
nic_type
+
'-'
+
net_type
+
'-Load-'
+
rate
)
e
=
exp
.
Experiment
(
host_type
+
'-'
+
nic_type
+
'-'
+
net_type
+
'-Load-'
+
rate
)
# network
if
net_type
==
'sw'
:
net
=
sim
.
SwitchNet
()
...
...
@@ -70,10 +72,12 @@ for rate in rate_types:
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
==
'gt'
:
host_class
=
sim
.
Gem5Host
...
...
@@ -95,15 +99,41 @@ for rate in rate_types:
raise
NameError
(
nic_type
)
# create servers and clients
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPServer
)
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPServer
)
if
rate
==
'0m'
:
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPClientSleep
,
ip_start
=
2
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPClientSleep
,
ip_start
=
2
)
else
:
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPClient
,
ip_start
=
2
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPClient
,
ip_start
=
2
)
clients
[
0
].
wait
=
True
clients
[
0
].
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
...
...
@@ -112,9 +142,5 @@ for rate in rate_types:
print
(
e
.
name
)
# add to experiments
experiments
.
append
(
e
)
experiments/pyexps/ae/corundum_pcilat.py
View file @
7549fa9e
...
...
@@ -23,23 +23,23 @@
########################################################################
# This script is for generating the result in 8.1 in the paper.
#
# 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]
# server client
#
#
# The server host runs netperf server and client host runs TCP_RR and
# TCP_STREAM test
#
#
# The command to run all the experiments is:
# $: python3 run.py pyexps/ae/corundum_pcilat.py --filter cblat-gt-sw --verbose --force
########################################################################
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
pci_latency
=
[
1000
]
experiments
=
[]
...
...
@@ -60,16 +60,33 @@ for pci_type in pci_latency:
n
.
sync_period
=
pci_type
n
.
pci_latency
=
pci_type
return
n
nic_class
=
nic_pci
nc_class
=
node
.
CorundumLinuxNode
# create servers and clients
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfServer
)
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfServer
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfClient
,
ip_start
=
2
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfClient
,
ip_start
=
2
)
for
s
in
servers
:
s
.
pci_latency
=
pci_type
...
...
experiments/pyexps/ae/data_cbpcilat.py
View file @
7549fa9e
...
...
@@ -20,10 +20,10 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from
utils.netperf
import
*
import
sys
from
time
import
strftime
from
time
import
gmtime
from
time
import
gmtime
,
strftime
from
utils.netperf
import
*
def
fmt_lat
(
lat
):
...
...
@@ -60,7 +60,7 @@ for (h, h_l) in hosts:
path
=
'%s/cblat-%s-%s-1.json'
%
(
outdir
,
h
,
net
)
data
=
parse_netperf_run
(
path
)
if
'simtime'
in
data
:
t
=
strftime
(
"
%H:%M:%S
"
,
gmtime
(
data
[
'simtime'
]))
t
=
strftime
(
'
%H:%M:%S
'
,
gmtime
(
data
[
'simtime'
]))
else
:
t
=
''
...
...
experiments/pyexps/ae/data_decmp.py
View file @
7549fa9e
...
...
@@ -21,9 +21,9 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
glob
import
itertools
import
json
import
os
import
itertools
import
sys
if
len
(
sys
.
argv
)
!=
2
:
...
...
@@ -33,23 +33,20 @@ if len(sys.argv) != 2:
out_file
=
sys
.
argv
[
1
]
if
not
os
.
path
.
isfile
(
out_file
):
print
(
"
no result file at:
"
+
out_file
)
print
(
'
no result file at:
'
+
out_file
)
exit
(
0
)
f
=
open
(
out_file
,
'r'
)
lines
=
f
.
readlines
()
for
line
in
lines
:
if
"
start:
"
in
line
:
if
'
start:
'
in
line
:
start_time
=
float
(
line
.
split
()[
1
])
if
"
end:
"
in
line
:
if
'
end:
'
in
line
:
end_time
=
float
(
line
.
split
()[
1
])
time_diff
=
end_time
-
start_time
print
(
'SimTime: %d (s)'
%
(
time_diff
))
f
.
close
()
experiments/pyexps/ae/data_dist.py
View file @
7549fa9e
...
...
@@ -21,9 +21,9 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
glob
import
itertools
import
json
import
os
import
itertools
import
sys
if
len
(
sys
.
argv
)
!=
2
:
...
...
@@ -34,20 +34,22 @@ basedir = sys.argv[1]
types_of_host
=
[
2
,
8
,
16
,
32
]
def
time_diff_min
(
data
):
def
time_diff_min
(
data
):
start_time
=
data
[
'start_time'
]
end_time
=
data
[
'end_time'
]
time_diff_in_min
=
(
end_time
-
start_time
)
/
60
return
time_diff_in_min
print
(
'# Number of hosts'
+
'
\t
'
+
'Sim.Time'
)
for
workload
in
types_of_host
:
line
=
[
str
(
workload
)]
path_pat
=
'%srun-%d.out'
%
(
basedir
,
workload
)
if
not
os
.
path
.
isfile
(
path_pat
):
#print("no result file at: " + path_pat)
line
.
append
(
' '
)
...
...
@@ -56,15 +58,15 @@ for workload in types_of_host:
read_lines
=
f
.
readlines
()
for
l
in
read_lines
:
if
"
START
"
in
l
:
if
'
START
'
in
l
:
start_time
=
float
(
l
.
split
()[
1
])
#print("start_time: %d" % start_time)
if
"
EXIT
"
in
l
or
"
KILLED
"
in
l
:
if
'
EXIT
'
in
l
or
'
KILLED
'
in
l
:
end_time
=
float
(
l
.
split
()[
1
])
#print("end_time: %d" % end_time)
sim_time
=
(
end_time
-
start_time
)
/
60
line
.
append
(
'%d'
%
sim_time
)
line
.
append
(
'%d'
%
sim_time
)
print
(
'
\t
'
.
join
(
line
))
experiments/pyexps/ae/data_host_scale.py
View file @
7549fa9e
...
...
@@ -21,9 +21,9 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
glob
import
itertools
import
json
import
os
import
itertools
import
sys
if
len
(
sys
.
argv
)
!=
2
:
...
...
@@ -34,20 +34,22 @@ basedir = sys.argv[1]
types_of_client
=
[
1
,
4
,
9
,
14
,
20
]
def
time_diff_min
(
data
):
def
time_diff_min
(
data
):
start_time
=
data
[
'start_time'
]
end_time
=
data
[
'end_time'
]
time_diff_in_min
=
(
end_time
-
start_time
)
/
60
return
time_diff_in_min
print
(
'# Number of hosts'
+
'
\t
'
+
'Sim.Time'
)
for
workload
in
types_of_client
:
line
=
[
str
(
workload
)]
path_pat
=
'%shost-gt-ib-sw-1000m-%s'
%
(
basedir
,
workload
)
runs
=
[]
for
path
in
glob
.
glob
(
path_pat
+
'-*.json'
):
if
path
==
path_pat
+
'-0.json'
:
...
...
@@ -56,11 +58,11 @@ for workload in types_of_client:
with
open
(
path
,
'r'
)
as
f
:
data
=
json
.
load
(
f
)
res
=
time_diff_min
(
data
)
if
res
is
not
None
:
runs
.
append
(
res
)
if
not
runs
:
line
.
append
(
' '
)
else
:
...
...
experiments/pyexps/ae/data_netperf.py
View file @
7549fa9e
...
...
@@ -20,10 +20,10 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from
utils.netperf
import
*
import
sys
from
time
import
strftime
from
time
import
gmtime
from
time
import
gmtime
,
strftime
from
utils.netperf
import
*
def
fmt_lat
(
lat
):
...
...
@@ -60,7 +60,7 @@ for (h, h_l) in hosts:
path
=
'%s/nf-%s-%s-%s-1.json'
%
(
outdir
,
h
,
net
,
nic
)
data
=
parse_netperf_run
(
path
)
if
'simtime'
in
data
:
t
=
strftime
(
"
%H:%M:%S
"
,
gmtime
(
data
[
'simtime'
]))
t
=
strftime
(
'
%H:%M:%S
'
,
gmtime
(
data
[
'simtime'
]))
else
:
t
=
''
...
...
experiments/pyexps/ae/data_nopaxos.py
View file @
7549fa9e
...
...
@@ -21,6 +21,7 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
sys
import
utils.parse_nopaxos
as
pn
if
len
(
sys
.
argv
)
!=
2
:
...
...
experiments/pyexps/ae/data_ns3_dctcp.py
View file @
7549fa9e
...
...
@@ -23,6 +23,7 @@
import
itertools
import
os
import
sys
import
utils.iperf
if
len
(
sys
.
argv
)
!=
2
:
...
...
@@ -35,7 +36,7 @@ max_k = 199680
k_step
=
16640
mtu
=
4000
confignames
=
[
"
ns3-4000
"
]
confignames
=
[
'
ns3-4000
'
]
print
(
'
\t
'
.
join
([
'threshold'
]
+
confignames
))
for
k_val
in
range
(
0
,
max_k
+
1
,
k_step
):
...
...
@@ -45,22 +46,22 @@ for k_val in range(0, max_k + 1, k_step):
tps
=
[]
if
not
os
.
path
.
isfile
(
path_pat
):
print
(
"
no result file at:
"
+
path_pat
)
print
(
'
no result file at:
'
+
path_pat
)
exit
(
0
)
f
=
open
(
path_pat
,
'r'
)
lines
=
f
.
readlines
()
tp
=
float
(
lines
[
1
].
split
()[
2
])
/
1000
tps
.
append
(
tp
)
tps
.
append
(
tp
)
tp
=
float
(
lines
[
2
].
split
()[
2
])
/
1000
tps
.
append
(
tp
)
tps
.
append
(
tp
)
f
.
close
()
total_tp
=
sum
(
tps
)
# TP * (MTU + PPP(2)) / (MTU - IP (20) - TCP w/option (24))
tp_calib
=
total_tp
*
(
mtu
+
2
)
/
(
mtu
-
20
-
24
)
line
.
append
(
'%.2f'
%
(
tp_calib
))
print
(
'
\t
'
.
join
(
line
))
\ No newline at end of file
print
(
'
\t
'
.
join
(
line
))
experiments/pyexps/ae/data_pci_latency.py
View file @
7549fa9e
...
...
@@ -21,9 +21,9 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
glob
import
itertools
import
json
import
os
import
itertools
import
sys
if
len
(
sys
.
argv
)
!=
2
:
...
...
@@ -34,20 +34,22 @@ basedir = sys.argv[1]
types_of_pci
=
[
10
,
50
,
100
,
500
,
1000
]
def
time_diff_min
(
data
):
def
time_diff_min
(
data
):
start_time
=
data
[
'start_time'
]
end_time
=
data
[
'end_time'
]
time_diff_in_min
=
(
end_time
-
start_time
)
/
60
return
time_diff_in_min
print
(
'# PCI latency (ns)'
+
'
\t
'
+
'Sim.Time'
)
for
workload
in
types_of_pci
:
line
=
[
str
(
workload
)]
path_pat
=
'%spci-gt-ib-sw-%s'
%
(
basedir
,
workload
)
runs
=
[]
for
path
in
glob
.
glob
(
path_pat
+
'-*.json'
):
if
path
==
path_pat
+
'-0.json'
:
...
...
@@ -56,11 +58,11 @@ for workload in types_of_pci:
with
open
(
path
,
'r'
)
as
f
:
data
=
json
.
load
(
f
)
res
=
time_diff_min
(
data
)
if
res
is
not
None
:
runs
.
append
(
res
)
if
not
runs
:
line
.
append
(
' '
)
else
:
...
...
experiments/pyexps/ae/data_sb_dctcp.py
View file @
7549fa9e
...
...
@@ -22,6 +22,7 @@
import
itertools
import
sys
import
utils.iperf
if
len
(
sys
.
argv
)
!=
2
:
...
...
@@ -39,7 +40,6 @@ configs = list(itertools.product(types_of_host, mtus))
confignames
=
[
h
+
'-'
+
str
(
mtu
)
for
h
,
mtu
in
configs
]
print
(
'
\t
'
.
join
([
'threshold'
]
+
confignames
))
for
k_val
in
range
(
0
,
max_k
+
1
,
k_step
):
line
=
[
str
(
k_val
)]
for
h
,
mtu
in
configs
:
...
...
experiments/pyexps/ae/data_sync_overhead.py
View file @
7549fa9e
...
...
@@ -21,9 +21,9 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
glob
import
itertools
import
json
import
os
import
itertools
import
sys
if
len
(
sys
.
argv
)
!=
2
:
...
...
@@ -33,15 +33,17 @@ if len(sys.argv) != 2:
basedir
=
sys
.
argv
[
1
]
types_of_workload
=
[
'sleep'
,
'busy'
]
types_of_sync
=
[
'with'
,
'without'
]
# with or without simbricks
types_of_sync
=
[
'with'
,
'without'
]
# with or without simbricks
def
time_diff_min
(
data
):
def
time_diff_min
(
data
):
start_time
=
data
[
'start_time'
]
end_time
=
data
[
'end_time'
]
time_diff_in_min
=
(
end_time
-
start_time
)
/
60
return
time_diff_in_min
print
(
'# Workload'
+
'
\t
'
+
'w/ simbricks'
+
'
\t
'
+
'w/o simbricks'
)
for
workload
in
types_of_workload
:
...
...
@@ -51,7 +53,7 @@ for workload in types_of_workload:
path_pat
=
'%snoTraf-gt-ib-sw-%s'
%
(
basedir
,
workload
)
else
:
path_pat
=
'%sno_simb-gt-%s'
%
(
basedir
,
workload
)
runs
=
[]
for
path
in
glob
.
glob
(
path_pat
+
'-*.json'
):
if
path
==
path_pat
+
'-0.json'
:
...
...
@@ -60,11 +62,11 @@ for workload in types_of_workload:
with
open
(
path
,
'r'
)
as
f
:
data
=
json
.
load
(
f
)
res
=
time_diff_min
(
data
)
if
res
is
not
None
:
runs
.
append
(
res
)
if
not
runs
:
line
.
append
(
' '
)
else
:
...
...
experiments/pyexps/ae/determ.py
View file @
7549fa9e
...
...
@@ -20,17 +20,16 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# 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.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
host_types
=
[
'gt'
]
nic_types
=
[
'ib'
]
net_types
=
[
'sw'
]
num_cores
=
1
n_client
=
1
...
...
@@ -42,22 +41,40 @@ e.add_network(net)
host_class
=
sim
.
Gem5Host
e
.
checkpoint
=
False
nic_class
=
sim
.
I40eNIC
nc_class
=
node
.
I40eLinuxNode
# create a host
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPServer
,
ip_start
=
2
)
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPServer
,
ip_start
=
2
)
servers
[
0
].
node_config
.
nockp
=
1
servers
[
0
].
variant
=
'opt'
servers
[
0
].
cpu_freq
=
'3GHz'
servers
[
0
].
extra_main_args
=
[
'--debug-flags=SimBricksSync,SimBricksPci,SimBricksEthernet'
]
servers
[
0
].
extra_main_args
=
[
'--debug-flags=SimBricksSync,SimBricksPci,SimBricksEthernet'
]
# create a host
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPShortClient
,
ip_start
=
2
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPShortClient
,
ip_start
=
2
)
clients
[
0
].
cpu_freq
=
'3GHz'
clients
[
0
].
variant
=
'opt'
...
...
@@ -65,14 +82,12 @@ clients[0].node_config.cores = num_cores
clients
[
0
].
node_config
.
app
.
is_sleep
=
1
clients
[
0
].
node_config
.
nockp
=
1
clients
[
0
].
node_config
.
app
.
is_last
=
True
clients
[
0
].
extra_main_args
=
[
'--debug-flags=SimBricksSync,SimBricksPci,SimBricksEthernet'
]
clients
[
0
].
extra_main_args
=
[
'--debug-flags=SimBricksSync,SimBricksPci,SimBricksEthernet'
]
clients
[
0
].
wait
=
True
print
(
e
.
name
)
# add to experiments
experiments
.
append
(
e
)
experiments/pyexps/ae/f1_dctcp.py
View file @
7549fa9e
...
...
@@ -19,16 +19,15 @@
# 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.
"""
This script is for reproducing Simbricks line in [Figure 1] DCTCP result.
We used following combination of simulators.
HOST: Gem5 timing CPU
NIC: Intel i40e behavioral model
NET: ns-3 dumbbell model
The simulation composed of two pairs of iperf server and client, connected
The simulation composed of two pairs of iperf server and client, connected
in a dumbbell topology.
The link between two switches is the bottleneck link.
...
...
@@ -42,11 +41,12 @@ The command to run all the experiments is:
$: python3 run.py pyexps/ae/f1_dctcp.py --filter gt-ib-* --force --verbose
"""
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_dctcp_hosts
import
simbricks.experiments
as
exp
types_of_host
=
[
'gt'
]
types_of_nic
=
[
'ib'
]
types_of_net
=
[
'dumbbell'
]
...
...
@@ -56,11 +56,11 @@ types_of_mtu = [4000]
num_pairs
=
2
max_k
=
199680
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 '
cpu_freq
=
'5GHz'
cpu_freq_qemu
=
'2GHz'
sys_clock
=
'1GHz'
# if not set, default 1GHz
sys_clock
=
'1GHz'
# if not set, default 1GHz
ip_start
=
'192.168.64.1'
...
...
@@ -77,7 +77,10 @@ for mtu in types_of_mtu:
net
=
net_class
()
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
)
freq
=
cpu_freq
...
...
@@ -86,25 +89,31 @@ for mtu in types_of_mtu:
host_class
=
sim
.
QemuHost
elif
h
==
'qt'
:
freq
=
cpu_freq_qemu
def
qemu_timing
():
h
=
sim
.
QemuHost
()
h
.
sync
=
True
return
h
host_class
=
qemu_timing
elif
h
==
'gt'
:
def
gem5_timing
():
h
=
sim
.
Gem5Host
()
#h.sys_clock = sys_clock
return
h
host_class
=
gem5_timing
e
.
checkpoint
=
True
elif
h
==
'gO3'
:
def
gem5_o3
():
h
=
sim
.
Gem5Host
()
h
.
cpu_type
=
'DerivO3CPU'
h
.
cpu_type
=
'DerivO3CPU'
h
.
sys_clock
=
sys_clock
return
h
host_class
=
gem5_o3
host_class
=
gem5_o3
e
.
checkpoint
=
True
else
:
raise
NameError
(
h
)
...
...
@@ -122,25 +131,43 @@ for mtu in types_of_mtu:
else
:
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
for
cl
in
clients
:
cl
.
node_config
.
app
.
server_ip
=
servers
[
i
].
node_config
.
ip
i
+=
1
# 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.
# 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
].
wait
=
True
clients
[
num_pairs
-
1
].
node_config
.
app
.
is_last
=
True
clients
[
num_pairs
-
1
].
wait
=
True
print
(
e
.
name
)
experiments
.
append
(
e
)
experiments/pyexps/ae/f7_scale.py
View file @
7549fa9e
...
...
@@ -29,30 +29,30 @@
# NIC: Intel i40e behavioral model
# NET: Switch behavioral model
#
# In each simulation, one server host and several clients are connected by a switch
# In each simulation, one server host and several clients are connected by a switch
# [HOST_0] - [NIC_0] ---- [SWITCH] ---- [NIC_1] - [HOST_1]
# server | .....| client_0
# Client_1 Clinet_n
#
# The server host runs iperf UDP server and client host runs UDP test
# The total aggregated bandwidth sent to the server are fixed to 1000 Mbps
#
#
# The command to run all the experiments is:
# $: python3 run.py pyexps/ae/f7_scale.py --filter host-gt-ib-sw-* --verbose
########################################################################
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
import
simbricks.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
host_types
=
[
'gt'
]
nic_types
=
[
'ib'
]
net_types
=
[
'sw'
]
app
=
[
'Host'
]
total_rate
=
1000
# Mbps
total_rate
=
1000
# Mbps
num_client_max
=
8
num_client_step
=
2
num_client_types
=
[
1
,
4
,
9
,
14
,
20
]
...
...
@@ -61,14 +61,17 @@ experiments = []
for
n_client
in
num_client_types
:
per_client_rate
=
int
(
total_rate
/
n_client
)
per_client_rate
=
int
(
total_rate
/
n_client
)
rate
=
f
'
{
per_client_rate
}
m'
for
host_type
in
host_types
:
for
nic_type
in
nic_types
:
for
net_type
in
net_types
:
e
=
exp
.
Experiment
(
'host-'
+
host_type
+
'-'
+
nic_type
+
'-'
+
net_type
+
'-'
+
f
'
{
total_rate
}
m'
+
f
'-
{
n_client
}
'
)
e
=
exp
.
Experiment
(
'host-'
+
host_type
+
'-'
+
nic_type
+
'-'
+
net_type
+
'-'
+
f
'
{
total_rate
}
m'
+
f
'-
{
n_client
}
'
)
# network
if
net_type
==
'sw'
:
net
=
sim
.
SwitchNet
()
...
...
@@ -82,10 +85,12 @@ for n_client in num_client_types:
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
==
'gt'
:
host_class
=
sim
.
Gem5Host
...
...
@@ -107,30 +112,41 @@ for n_client in num_client_types:
raise
NameError
(
nic_type
)
# create servers and clients
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPServer
)
clients
=
create_basic_hosts
(
e
,
n_client
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPClient
,
ip_start
=
2
)
clients
[
n_client
-
1
].
node_config
.
app
.
is_last
=
True
clients
[
n_client
-
1
].
wait
=
True
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPServer
)
clients
=
create_basic_hosts
(
e
,
n_client
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
IperfUDPClient
,
ip_start
=
2
)
clients
[
n_client
-
1
].
node_config
.
app
.
is_last
=
True
clients
[
n_client
-
1
].
wait
=
True
for
c
in
clients
:
c
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
c
.
node_config
.
app
.
rate
=
rate
c
.
cpu_freq
=
'3GHz'
#c.wait = True
servers
[
0
].
cpu_freq
=
'3GHz'
servers
[
0
].
cpu_freq
=
'3GHz'
print
(
e
.
name
)
# add to experiments
experiments
.
append
(
e
)
experiments/pyexps/ae/f9_latency.py
View file @
7549fa9e
...
...
@@ -23,23 +23,23 @@
########################################################################
# This script is for reproducing [Figure 9] in the paper.
#
# 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]
# server client
#
#
# The server host runs netperf server and client host runs TCP_RR and
# TCP_STREAM test
#
#
# The command to run all the experiments is:
# $: 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.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
pci_latency
=
[
10
,
50
,
100
,
500
,
1000
]
experiments
=
[]
...
...
@@ -60,16 +60,33 @@ for pci_type in pci_latency:
n
.
sync_period
=
pci_type
n
.
pci_latency
=
pci_type
return
n
nic_class
=
nic_pci
nc_class
=
node
.
I40eLinuxNode
# create servers and clients
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfServer
)
servers
=
create_basic_hosts
(
e
,
1
,
'server'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfServer
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfClient
,
ip_start
=
2
)
clients
=
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NetperfClient
,
ip_start
=
2
)
for
s
in
servers
:
s
.
pci_latency
=
pci_type
...
...
experiments/pyexps/ae/no-simbricks.py
View file @
7549fa9e
...
...
@@ -20,16 +20,15 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# 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.simulators
as
sim
import
simbricks.experiments
as
exp
app_types
=
[
'sleep'
,
'busy'
]
experiments
=
[]
for
app_type
in
app_types
:
e
=
exp
.
Experiment
(
'no_simb-gt-'
+
app_type
)
...
...
@@ -37,11 +36,10 @@ for app_type in app_types:
host_class
=
sim
.
Gem5Host
e
.
checkpoint
=
True
e
.
no_simbricks
=
True
nc_class
=
node
.
I40eLinuxNode
# create servers and clients
host
=
host_class
()
host
.
name
=
'host.0'
host
.
cpu_freq
=
'3GHz'
...
...
@@ -50,22 +48,17 @@ for app_type in app_types:
node_config
.
app
=
node
.
NoTraffic
()
node_config
.
cores
=
1
# is busy
# is busy
if
app_type
==
'sleep'
:
node_config
.
app
.
is_sleep
=
1
else
:
node_config
.
app
.
is_sleep
=
0
host
.
set_config
(
node_config
)
e
.
add_host
(
host
)
host
.
wait
=
True
print
(
e
.
name
)
# add to experiments
experiments
.
append
(
e
)
experiments/pyexps/ae/no_traffic.py
View file @
7549fa9e
...
...
@@ -20,18 +20,17 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# 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.simulators
as
sim
from
simbricks.simulator_utils
import
create_basic_hosts
import
simbricks.experiments
as
exp
host_types
=
[
'gt'
]
nic_types
=
[
'ib'
]
net_types
=
[
'sw'
]
app_types
=
[
'sleep'
,
'busy'
]
num_cores
=
1
n_client
=
1
...
...
@@ -42,7 +41,10 @@ for host_type in host_types:
for
net_type
in
net_types
:
for
app_type
in
app_types
:
e
=
exp
.
Experiment
(
'noTraf-'
+
host_type
+
'-'
+
nic_type
+
'-'
+
net_type
+
'-'
+
app_type
)
e
=
exp
.
Experiment
(
'noTraf-'
+
host_type
+
'-'
+
nic_type
+
'-'
+
net_type
+
'-'
+
app_type
)
# network
if
net_type
==
'sw'
:
...
...
@@ -57,10 +59,12 @@ for host_type in host_types:
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
==
'gt'
:
host_class
=
sim
.
Gem5Host
...
...
@@ -82,15 +86,24 @@ for host_type in host_types:
raise
NameError
(
nic_type
)
# create a host
clients
=
create_basic_hosts
(
e
,
n_client
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NoTraffic
,
ip_start
=
2
)
clients
[
n_client
-
1
].
wait
=
True
clients
=
create_basic_hosts
(
e
,
n_client
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NoTraffic
,
ip_start
=
2
)
clients
[
n_client
-
1
].
wait
=
True
for
c
in
clients
:
c
.
cpu_freq
=
'3GHz'
c
.
node_config
.
cores
=
num_cores
# is busy
# is busy
if
app_type
==
'sleep'
:
c
.
node_config
.
app
.
is_sleep
=
1
else
:
...
...
@@ -98,9 +111,5 @@ for host_type in host_types:
print
(
e
.
name
)
# add to experiments
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