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
5e768165
Commit
5e768165
authored
Jun 05, 2022
by
Hejing Li
Browse files
ae: add sync_overhead scripts
parent
4cc4ed77
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
273 additions
and
0 deletions
+273
-0
experiments/ae/sync-overhead.sh
experiments/ae/sync-overhead.sh
+23
-0
experiments/pyexps/ae/data_sync_overhead.py
experiments/pyexps/ae/data_sync_overhead.py
+73
-0
experiments/pyexps/ae/no-simbricks.py
experiments/pyexps/ae/no-simbricks.py
+71
-0
experiments/pyexps/ae/no_traffic.py
experiments/pyexps/ae/no_traffic.py
+106
-0
No files found.
experiments/ae/sync-overhead.sh
0 → 100755
View file @
5e768165
#!/bin/bash
# Runs low event workload (sleep 10) with Simbricks
# It will generate raw simulation json file result in out/
python3 run.py pyexps/ae/no_traffic.py
--filter
noTraf-gt-ib-sw-sleep
--force
--verbose
# Runs high event workload (dd) with Simbricks
# It will generate raw simulation json file result in out/
python3 run.py pyexps/ae/no_traffic.py
--filter
noTraf-gt-ib-sw-busy
--force
--verbose
# Runs high event workload (dd) without Simbricks (standalone gem5)
# It will generate raw simulation json file result in out/
python3 run.py pyexps/ae/no-simbricks.py
--filter
no_simb-gt-sleep
--force
--verbose
# Runs high event workload (dd) without Simbricks (standalone gem5)
# It will generate raw simulation json file result in out/
python3 run.py pyexps/ae/no-simbricks.py
--filter
no_simb-gt-busy
--force
--verbose
# Process the results and prints
python3 pyexps/ae/data_sync_overhead.py out/
>
ae/sync_overhead.data
experiments/pyexps/ae/data_sync_overhead.py
0 → 100644
View file @
5e768165
# Copyright 2021 Max Planck Institute for Software Systems, and
# National University of Singapore
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
glob
import
json
import
os
import
itertools
import
sys
if
len
(
sys
.
argv
)
!=
2
:
print
(
'Usage: data_sync_overhead.py OUTDIR'
)
sys
.
exit
(
1
)
basedir
=
sys
.
argv
[
1
]
types_of_workload
=
[
'sleep'
,
'busy'
]
types_of_sync
=
[
'with'
,
'without'
]
# with or without simbricks
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
:
line
=
[
workload
]
for
sync
in
types_of_sync
:
if
sync
==
'with'
:
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'
:
# skip checkpoints
continue
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
:
line
.
append
(
'%d'
%
(
sum
(
runs
)
/
len
(
runs
)))
print
(
'
\t
'
.
join
(
line
))
experiments/pyexps/ae/no-simbricks.py
0 → 100644
View file @
5e768165
# Copyright 2021 Max Planck Institute for Software Systems, and
# National University of Singapore
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
app_types
=
[
'sleep'
,
'busy'
]
experiments
=
[]
for
app_type
in
app_types
:
e
=
exp
.
Experiment
(
'no_simb-gt-'
+
app_type
)
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'
node_config
=
nc_class
()
node_config
.
ip
=
'10.0.0.1'
node_config
.
app
=
node
.
NoTraffic
()
node_config
.
cores
=
1
# 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
0 → 100644
View file @
5e768165
# Copyright 2021 Max Planck Institute for Software Systems, and
# National University of Singapore
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import
simbricks.experiments
as
exp
import
simbricks.simulators
as
sim
import
simbricks.nodeconfig
as
node
from
simbricks.simulator_utils
import
create_basic_hosts
host_types
=
[
'gt'
]
nic_types
=
[
'ib'
]
net_types
=
[
'sw'
]
app_types
=
[
'sleep'
,
'busy'
]
num_cores
=
1
n_client
=
1
experiments
=
[]
for
host_type
in
host_types
:
for
nic_type
in
nic_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
)
# network
if
net_type
==
'sw'
:
net
=
sim
.
SwitchNet
()
elif
net_type
==
'br'
:
net
=
sim
.
NS3BridgeNet
()
else
:
raise
NameError
(
net_type
)
e
.
add_network
(
net
)
# 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
==
'gt'
:
host_class
=
sim
.
Gem5Host
e
.
checkpoint
=
True
else
:
raise
NameError
(
host_type
)
# nic
if
nic_type
==
'ib'
:
nic_class
=
sim
.
I40eNIC
nc_class
=
node
.
I40eLinuxNode
elif
nic_type
==
'cb'
:
nic_class
=
sim
.
CorundumBMNIC
nc_class
=
node
.
CorundumLinuxNode
elif
nic_type
==
'cv'
:
nic_class
=
sim
.
CorundumVerilatorNIC
nc_class
=
node
.
CorundumLinuxNode
else
:
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
for
c
in
clients
:
c
.
cpu_freq
=
'3GHz'
c
.
node_config
.
cores
=
num_cores
# is busy
if
app_type
==
'sleep'
:
c
.
node_config
.
app
.
is_sleep
=
1
else
:
c
.
node_config
.
app
.
is_sleep
=
0
print
(
e
.
name
)
# add to experiments
experiments
.
append
(
e
)
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