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
d6e42ff5
Commit
d6e42ff5
authored
Jan 25, 2024
by
Antoine Kaufmann
Committed by
Hejing Li
Feb 01, 2024
Browse files
experiments rework e2e_bgsplit experiment with new partitioner
parent
d9369dac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
27 deletions
+24
-27
experiments/pyexps/e2e_bgsplit.py
experiments/pyexps/e2e_bgsplit.py
+24
-27
No files found.
experiments/pyexps/e2e_bgsplit.py
View file @
d6e42ff5
...
...
@@ -33,41 +33,38 @@ from simbricks.orchestration.e2e_topologies import (
splits
=
[
1
,
2
,
4
]
sync_factors
=
[
1.0
,
0.5
,
0.25
,
0.1
]
options
=
{
'ns3::TcpSocket::SegmentSize'
:
'1448'
,
'ns3::TcpSocket::SndBufSize'
:
'524288'
,
'ns3::TcpSocket::RcvBufSize'
:
'524288'
,
}
kinds_of_parts
=
e2e_part
.
hier_partitions
(
DCFatTree
()).
keys
()
experiments
=
[]
for
N
in
splits
:
e
=
exp
.
Experiment
(
f
'e2e_bgsplit-
{
N
}
'
)
# Make sure background hosts are placed the same way
random
.
seed
(
42
)
for
p
in
kinds_of_parts
:
for
sf
in
sync_factors
:
e
=
exp
.
Experiment
(
f
'e2e_bgsplit-
{
p
}
-
{
sf
}
'
)
# Make sure background hosts are placed the same way
random
.
seed
(
42
)
# Create empty topology first
topology
=
DCFatTree
(
n_spine_sw
=
1
,
n_agg_bl
=
2
,
n_agg_sw
=
1
,
n_agg_racks
=
2
,
h_per_rack
=
10
,
)
# fill up with background traffic hosts
add_contig_bg
(
topology
)
# Create empty topology first
topology
=
DCFatTree
()
# fill up with background traffic hosts
add_contig_bg
(
topology
)
# Partition into N ns-3 processes
nets
,
dot
=
e2e_part
.
partition
(
topology
,
N
)
for
net
in
nets
:
net
.
e2e_global
.
stop_time
=
'1s'
net
.
opt
=
' '
.
join
([
f
'--
{
o
[
0
]
}
=
{
o
[
1
]
}
'
for
o
in
options
.
items
()])
net
.
wait
=
True
e
.
add_network
(
net
)
net
.
init_network
()
partition
=
e2e_part
.
hier_partitions
(
topology
)[
p
]
nets
=
e2e_part
.
instantiate_partition
(
topology
,
partition
,
sf
)
dot
=
e2e_part
.
dot_topology
(
topology
,
partition
)
for
net
in
nets
:
net
.
e2e_global
.
stop_time
=
'50ms'
net
.
opt
=
' '
.
join
([
f
'--
{
o
[
0
]
}
=
{
o
[
1
]
}
'
for
o
in
options
.
items
()])
net
.
wait
=
True
e
.
add_network
(
net
)
net
.
init_network
()
with
open
(
f
'out/
{
e
.
name
}
.dot'
,
'w'
)
as
f
:
f
.
write
(
dot
)
with
open
(
f
'out/
{
e
.
name
}
.dot'
,
'w'
)
as
f
:
f
.
write
(
dot
)
experiments
.
append
(
e
)
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