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
cbd825e1
Commit
cbd825e1
authored
Jul 24, 2022
by
Jonas Kaufmann
Committed by
Antoine Kaufmann
Jul 29, 2022
Browse files
HostSim: pass node_config in __init__
parent
74a9f167
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
72 additions
and
74 deletions
+72
-74
experiments/pyexps/ae/f1_dctcp.py
experiments/pyexps/ae/f1_dctcp.py
+6
-6
experiments/pyexps/ae/f7_scale.py
experiments/pyexps/ae/f7_scale.py
+2
-2
experiments/pyexps/ae/no_simbricks.py
experiments/pyexps/ae/no_simbricks.py
+4
-4
experiments/pyexps/ae/no_traffic.py
experiments/pyexps/ae/no_traffic.py
+2
-2
experiments/pyexps/ae/nopaxos.py
experiments/pyexps/ae/nopaxos.py
+2
-2
experiments/pyexps/ae/t1_netperf.py
experiments/pyexps/ae/t1_netperf.py
+2
-2
experiments/pyexps/dctcp.py
experiments/pyexps/dctcp.py
+6
-6
experiments/pyexps/dist_memcache.py
experiments/pyexps/dist_memcache.py
+2
-2
experiments/pyexps/dist_multinet.py
experiments/pyexps/dist_multinet.py
+2
-2
experiments/pyexps/dist_netperf.py
experiments/pyexps/dist_netperf.py
+2
-2
experiments/pyexps/femutest.py
experiments/pyexps/femutest.py
+7
-8
experiments/pyexps/modetcp.py
experiments/pyexps/modetcp.py
+4
-4
experiments/pyexps/netperf.py
experiments/pyexps/netperf.py
+2
-2
experiments/pyexps/no_simbricks.py
experiments/pyexps/no_simbricks.py
+3
-3
experiments/pyexps/no_traffic.py
experiments/pyexps/no_traffic.py
+2
-2
experiments/pyexps/nopaxos.py
experiments/pyexps/nopaxos.py
+2
-2
experiments/pyexps/pci_validation.py
experiments/pyexps/pci_validation.py
+8
-6
experiments/pyexps/scale_host.py
experiments/pyexps/scale_host.py
+2
-2
experiments/pyexps/scale_load.py
experiments/pyexps/scale_load.py
+2
-2
experiments/simbricks/simulator_utils.py
experiments/simbricks/simulator_utils.py
+10
-13
No files found.
experiments/pyexps/ae/f1_dctcp.py
View file @
cbd825e1
...
...
@@ -89,16 +89,16 @@ for mtu in types_of_mtu:
elif
host
==
'qt'
:
freq
=
cpu_freq_qemu
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
HostClass
=
qemu_timing
elif
host
==
'gt'
:
def
gem5_timing
():
h
=
sim
.
Gem5Host
()
def
gem5_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
Gem5Host
(
node_config
)
#h.sys_clock = sys_clock
return
h
...
...
@@ -106,8 +106,8 @@ for mtu in types_of_mtu:
e
.
checkpoint
=
True
elif
host
==
'gO3'
:
def
gem5_o3
():
h
=
sim
.
Gem5Host
()
def
gem5_o3
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
Gem5Host
(
node_config
)
h
.
cpu_type
=
'DerivO3CPU'
h
.
sys_clock
=
sys_clock
return
h
...
...
experiments/pyexps/ae/f7_scale.py
View file @
cbd825e1
...
...
@@ -86,8 +86,8 @@ for n_client in num_client_types:
HostClass
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/ae/no_simbricks.py
View file @
cbd825e1
...
...
@@ -39,9 +39,6 @@ for app_type in app_types:
NcClass
=
node
.
I40eLinuxNode
# create servers and clients
host
=
HostClass
()
host
.
name
=
'host.0'
host
.
cpu_freq
=
'3GHz'
node_config
=
NcClass
()
node_config
.
ip
=
'10.0.0.1'
node_config
.
app
=
node
.
NoTraffic
()
...
...
@@ -53,7 +50,10 @@ for app_type in app_types:
else
:
node_config
.
app
.
is_sleep
=
0
host
.
set_config
(
node_config
)
host
=
HostClass
(
node_config
)
host
.
name
=
'host.0'
host
.
cpu_freq
=
'3GHz'
e
.
add_host
(
host
)
host
.
wait
=
True
...
...
experiments/pyexps/ae/no_traffic.py
View file @
cbd825e1
...
...
@@ -59,8 +59,8 @@ for host_type in host_types:
HostClass
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/ae/nopaxos.py
View file @
cbd825e1
...
...
@@ -62,8 +62,8 @@ for proto_config in proto_configs:
e
.
checkpoint
=
True
elif
host_config
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/ae/t1_netperf.py
View file @
cbd825e1
...
...
@@ -73,8 +73,8 @@ for host_type in host_types:
HostClass
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/dctcp.py
View file @
cbd825e1
...
...
@@ -77,16 +77,16 @@ for mtu in types_of_mtu:
elif
host
==
'qt'
:
freq
=
cpu_freq_qemu
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
HostClass
=
qemu_timing
elif
host
==
'gt'
:
def
gem5_timing
():
h
=
sim
.
Gem5Host
()
def
gem5_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
Gem5Host
(
node_config
)
#h.sys_clock = sys_clock
return
h
...
...
@@ -94,8 +94,8 @@ for mtu in types_of_mtu:
e
.
checkpoint
=
True
elif
host
==
'gO3'
:
def
gem5_o3
():
h
=
sim
.
Gem5Host
()
def
gem5_o3
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
Gem5Host
(
node_config
)
h
.
cpu_type
=
'DerivO3CPU'
h
.
sys_clock
=
sys_clock
return
h
...
...
experiments/pyexps/dist_memcache.py
View file @
cbd825e1
...
...
@@ -78,8 +78,8 @@ for host_type in host_types:
HostClass
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/dist_multinet.py
View file @
cbd825e1
...
...
@@ -46,8 +46,8 @@ for host_type in host_types:
HostClass
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/dist_netperf.py
View file @
cbd825e1
...
...
@@ -47,8 +47,8 @@ for host_type in host_types:
net
.
sync
=
False
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/femutest.py
View file @
cbd825e1
...
...
@@ -30,18 +30,17 @@ for h in ['qk', 'gk']:
e
=
exp
.
Experiment
(
'femutest-'
+
h
)
e
.
checkpoint
=
False
if
h
==
'gk'
:
host
=
sim
.
Gem5Host
()
host
.
cpu_type
=
'X86KvmCPU'
elif
h
==
'qk'
:
host
=
sim
.
QemuHost
()
host
.
name
=
'host.0'
node_config
=
node
.
LinuxFEMUNode
()
node_config
.
app
=
node
.
NVMEFsTest
()
node_config
.
cores
=
1
node_config
.
app
.
is_sleep
=
1
host
.
set_config
(
node_config
)
if
h
==
'gk'
:
host
=
sim
.
Gem5Host
(
node_config
)
host
.
cpu_type
=
'X86KvmCPU'
elif
h
==
'qk'
:
host
=
sim
.
QemuHost
(
node_config
)
host
.
name
=
'host.0'
e
.
add_host
(
host
)
host
.
wait
=
True
...
...
experiments/pyexps/modetcp.py
View file @
cbd825e1
...
...
@@ -62,16 +62,16 @@ for mode in types_of_mode:
HostClass
=
sim
.
QemuHost
elif
host
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
HostClass
=
qemu_timing
elif
host
==
'gt'
:
def
gem5_timing
():
h
=
sim
.
Gem5Host
()
def
gem5_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
Gem5Host
(
node_config
)
return
h
HostClass
=
gem5_timing
...
...
experiments/pyexps/netperf.py
View file @
cbd825e1
...
...
@@ -60,8 +60,8 @@ for host_type in host_types:
HostClass
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/no_simbricks.py
View file @
cbd825e1
...
...
@@ -39,8 +39,6 @@ for app_type in app_types:
NcClass
=
node
.
I40eLinuxNode
# create servers and clients
host
=
HostClass
()
host
.
name
=
'host.0'
node_config
=
NcClass
()
node_config
.
ip
=
'10.0.0.1'
node_config
.
app
=
node
.
NoTraffic
()
...
...
@@ -52,7 +50,9 @@ for app_type in app_types:
else
:
node_config
.
app
.
is_sleep
=
0
host
.
set_config
(
node_config
)
host
=
HostClass
(
node_config
)
host
.
name
=
'host.0'
e
.
add_host
(
host
)
host
.
wait
=
True
...
...
experiments/pyexps/no_traffic.py
View file @
cbd825e1
...
...
@@ -66,8 +66,8 @@ for host_type in host_types:
HostClass
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/nopaxos.py
View file @
cbd825e1
...
...
@@ -62,8 +62,8 @@ for proto_config in proto_configs:
e
.
checkpoint
=
True
elif
host_config
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/pci_validation.py
View file @
cbd825e1
...
...
@@ -39,18 +39,18 @@ for internal in [True, False]:
net
=
sim
.
SwitchNet
()
e
.
add_network
(
net
)
server
=
sim
.
Gem5Host
()
server
.
name
=
'server'
# server
nc_server
=
node
.
E1000LinuxNode
()
nc_server
.
prefix
=
24
nc_server
.
ip
=
'10.0.0.1'
nc_server
.
force_mac_addr
=
'00:90:00:00:00:01'
nc_server
.
app
=
node
.
NetperfServer
()
server
.
set_config
(
nc_server
)
server
=
sim
.
Gem5Host
(
nc_server
)
server
.
name
=
'server'
e
.
add_host
(
server
)
client
=
sim
.
Gem5Host
()
client
.
name
=
'client'
# client
nc_client
=
node
.
E1000LinuxNode
()
nc_client
.
prefix
=
24
nc_client
.
ip
=
'10.0.0.2'
...
...
@@ -59,7 +59,9 @@ for internal in [True, False]:
nc_client
.
app
.
server_ip
=
'10.0.0.1'
nc_client
.
app
.
duration_tp
=
-
1000000
nc_client
.
app
.
duration_lat
=
-
1000
client
.
set_config
(
nc_client
)
client
=
sim
.
Gem5Host
(
nc_client
)
client
.
name
=
'client'
client
.
wait
=
True
e
.
add_host
(
client
)
...
...
experiments/pyexps/scale_host.py
View file @
cbd825e1
...
...
@@ -74,8 +74,8 @@ for n_client in num_client_types:
HostClass
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/pyexps/scale_load.py
View file @
cbd825e1
...
...
@@ -72,8 +72,8 @@ for rate in rate_types:
HostClass
=
sim
.
QemuHost
elif
host_type
==
'qt'
:
def
qemu_timing
():
h
=
sim
.
QemuHost
()
def
qemu_timing
(
node_config
:
node
.
NodeConfig
):
h
=
sim
.
QemuHost
(
node_config
)
h
.
sync
=
True
return
h
...
...
experiments/simbricks/simulator_utils.py
View file @
cbd825e1
...
...
@@ -54,15 +54,14 @@ def create_basic_hosts(
#nic.name = '%s.%d' % (name_prefix, i)
nic
.
set_network
(
net
)
host
=
host_class
()
host
.
name
=
f
'
{
name_prefix
}
.
{
i
}
'
node_config
=
nc_class
()
node_config
.
prefix
=
ip_prefix
ip
=
ip_start
+
i
node_config
.
ip
=
f
'10.0.
{
int
(
ip
/
256
)
}
.
{
ip
%
256
}
'
node_config
.
app
=
app_class
()
host
.
set_config
(
node_config
)
host
=
host_class
(
node_config
)
host
.
name
=
f
'
{
name_prefix
}
.
{
i
}
'
host
.
add_nic
(
nic
)
e
.
add_nic
(
nic
)
...
...
@@ -103,15 +102,14 @@ def create_multinic_hosts(
#nic.name = '%s.%d' % (name_prefix, i)
nic
.
set_network
(
net
)
host
=
host_class
()
host
.
name
=
f
'
{
name_prefix
}
.
{
i
}
'
node_config
=
nc_class
()
node_config
.
prefix
=
ip_prefix
ip
=
ip_start
+
i
node_config
.
ip
=
f
'10.0.
{
int
(
ip
/
256
)
}
.
{
ip
%
256
}
'
node_config
.
app
=
app_class
()
host
.
set_config
(
node_config
)
host
=
host_class
(
node_config
)
host
.
name
=
f
'
{
name_prefix
}
.
{
i
}
'
host
.
add_nic
(
nic
)
e
.
add_host
(
host
)
...
...
@@ -148,15 +146,14 @@ def create_dctcp_hosts(
#nic.name = '%s.%d' % (name_prefix, i)
nic
.
set_network
(
net
)
host
=
host_class
()
host
.
name
=
f
'
{
name_prefix
}
.
{
i
}
'
host
.
cpu_freq
=
cpu_freq
node_config
=
nc_class
()
node_config
.
mtu
=
mtu
node_config
.
ip
=
f
'192.168.64.
{
ip_start
+
i
}
'
node_config
.
app
=
app_class
()
host
.
set_config
(
node_config
)
host
=
host_class
(
node_config
)
host
.
name
=
f
'
{
name_prefix
}
.
{
i
}
'
host
.
cpu_freq
=
cpu_freq
host
.
add_nic
(
nic
)
e
.
add_nic
(
nic
)
...
...
Prev
1
2
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