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
d6edba2f
Commit
d6edba2f
authored
Aug 27, 2021
by
Antoine Kaufmann
Browse files
experiments: vary number of clients in dist_multinet
parent
207b0abd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
experiments/pyexps/dist_multinet.py
experiments/pyexps/dist_multinet.py
+7
-6
No files found.
experiments/pyexps/dist_multinet.py
View file @
d6edba2f
...
@@ -27,15 +27,16 @@ import simbricks.nodeconfig as node
...
@@ -27,15 +27,16 @@ import simbricks.nodeconfig as node
host_types
=
[
'qemu'
,
'gem5'
,
'qt'
]
host_types
=
[
'qemu'
,
'gem5'
,
'qt'
]
n_nets
=
[
1
,
2
,
3
,
4
]
n_nets
=
[
1
,
2
,
3
,
4
]
n_clients
=
10
n_clients
=
[
1
,
10
,
20
,
30
,
40
,
50
]
experiments
=
[]
experiments
=
[]
separate_net
=
False
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
:
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
}
'
,
nh
)
e
=
exp
.
DistributedExperiment
(
f
'dist_multinet-
{
host_type
}
-
{
n
}
-
{
n_client
}
'
,
nh
)
# host
# host
if
host_type
==
'qemu'
:
if
host_type
==
'qemu'
:
...
@@ -71,11 +72,11 @@ for host_type in host_types:
...
@@ -71,11 +72,11 @@ for host_type in host_types:
switch_top
.
connect_network
(
switch
)
switch_top
.
connect_network
(
switch
)
# create servers and clients
# create servers and clients
m
=
n_client
s
m
=
n_client
if
i
==
0
or
separate_server
:
if
i
==
0
or
separate_server
:
servers
=
sim
.
create_basic_hosts
(
e
,
1
,
'server_%d'
%
(
i
,),
servers
=
sim
.
create_basic_hosts
(
e
,
1
,
'server_%d'
%
(
i
,),
switch
,
sim
.
I40eNIC
,
host_class
,
node
.
I40eLinuxNode
,
switch
,
sim
.
I40eNIC
,
host_class
,
node
.
I40eLinuxNode
,
node
.
NetperfServer
,
ip_start
=
i
*
(
n_client
s
+
1
)
+
1
)
node
.
NetperfServer
,
ip_start
=
i
*
(
n_client
+
1
)
+
1
)
if
not
separate_server
:
if
not
separate_server
:
m
=
m
-
1
m
=
m
-
1
...
@@ -84,7 +85,7 @@ for host_type in host_types:
...
@@ -84,7 +85,7 @@ for host_type in host_types:
clients
=
sim
.
create_basic_hosts
(
e
,
m
,
'client_%d'
%
(
i
,),
clients
=
sim
.
create_basic_hosts
(
e
,
m
,
'client_%d'
%
(
i
,),
switch
,
sim
.
I40eNIC
,
host_class
,
node
.
I40eLinuxNode
,
switch
,
sim
.
I40eNIC
,
host_class
,
node
.
I40eLinuxNode
,
node
.
NetperfClient
,
ip_start
=
i
*
(
n_client
s
+
1
)
+
2
)
node
.
NetperfClient
,
ip_start
=
i
*
(
n_client
+
1
)
+
2
)
for
c
in
clients
:
for
c
in
clients
:
c
.
wait
=
True
c
.
wait
=
True
...
...
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