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
3092557c
Commit
3092557c
authored
Feb 02, 2024
by
Hejing Li
Browse files
random remote hosts
parent
3d734508
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
experiments/simbricks/orchestration/e2e_components.py
experiments/simbricks/orchestration/e2e_components.py
+2
-2
experiments/simbricks/orchestration/e2e_topologies.py
experiments/simbricks/orchestration/e2e_topologies.py
+9
-3
No files found.
experiments/simbricks/orchestration/e2e_components.py
View file @
3092557c
...
@@ -367,7 +367,7 @@ class E2EMsgGenApplication(E2EApplication):
...
@@ -367,7 +367,7 @@ class E2EMsgGenApplication(E2EApplication):
self
.
remotes
=
[]
self
.
remotes
=
[]
self
.
cdf
=
{
0.5
:
1
,
1.0
:
2
}
self
.
cdf
=
{
0.5
:
1
,
1.0
:
2
}
self
.
max_msg
=
0
self
.
max_msg
=
0
self
.
load
=
0.
5
self
.
load
=
0.
8
self
.
avg_msg_size_pkts
=
1.0
self
.
avg_msg_size_pkts
=
1.0
def
ns3_config
(
self
)
->
str
:
def
ns3_config
(
self
)
->
str
:
...
@@ -394,7 +394,7 @@ class E2EMsgGenApplicationTCP(E2EApplication):
...
@@ -394,7 +394,7 @@ class E2EMsgGenApplicationTCP(E2EApplication):
self
.
remotes
=
[]
self
.
remotes
=
[]
self
.
cdf
=
{
0.5
:
1
,
1.0
:
2
}
self
.
cdf
=
{
0.5
:
1
,
1.0
:
2
}
self
.
max_msg
=
0
self
.
max_msg
=
0
self
.
load
=
0.
5
self
.
load
=
0.
8
self
.
avg_msg_size_pkts
=
1.0
self
.
avg_msg_size_pkts
=
1.0
def
ns3_config
(
self
)
->
str
:
def
ns3_config
(
self
)
->
str
:
...
...
experiments/simbricks/orchestration/e2e_topologies.py
View file @
3092557c
...
@@ -322,7 +322,7 @@ def add_contig_bg(topo, subnet='10.42.0.0/16', **kwargs):
...
@@ -322,7 +322,7 @@ def add_contig_bg(topo, subnet='10.42.0.0/16', **kwargs):
def
add_homa_bg
(
topo
,
subnet
=
'10.2.0.0/16'
,
**
kwargs
):
def
add_homa_bg
(
topo
,
subnet
=
'10.2.0.0/16'
,
**
kwargs
):
params
=
{
params
=
{
'link_rate'
:
'
1
0Gbps'
,
'link_rate'
:
'
2
0Gbps'
,
'link_delay'
:
'500ns'
,
'link_delay'
:
'500ns'
,
'link_queue_size'
:
'512KB'
,
'link_queue_size'
:
'512KB'
,
'app_stop_time'
:
'60s'
,
'app_stop_time'
:
'60s'
,
...
@@ -346,10 +346,15 @@ def add_homa_bg(topo, subnet='10.2.0.0/16', **kwargs):
...
@@ -346,10 +346,15 @@ def add_homa_bg(topo, subnet='10.2.0.0/16', **kwargs):
s_host
.
data_rate
=
params
[
'link_rate'
]
s_host
.
data_rate
=
params
[
'link_rate'
]
s_host
.
ip
=
ip
+
prefix
s_host
.
ip
=
ip
+
prefix
s_host
.
queue_size
=
params
[
'link_queue_size'
]
s_host
.
queue_size
=
params
[
'link_queue_size'
]
remotes_to_connect
=
random
.
choices
(
remotes
,
k
=
10
)
# print(remotes_to_connect)
if
(
params
[
'app_proto'
]
==
'tcp'
):
if
(
params
[
'app_proto'
]
==
'tcp'
):
s_app
=
e2e
.
E2EMsgGenApplicationTCP
(
'msggen'
)
s_app
=
e2e
.
E2EMsgGenApplicationTCP
(
'msggen'
)
s_app
.
stop_time
=
params
[
'app_stop_time'
]
s_app
.
stop_time
=
params
[
'app_stop_time'
]
s_app
.
remotes
=
remotes
s_app
.
remotes
=
remotes_to_connect
# s_app.max_msg = 1
s_host
.
add_component
(
s_app
)
s_host
.
add_component
(
s_app
)
s_probe
=
e2e
.
E2EPeriodicSampleProbe
(
'probe'
,
'Rx'
)
s_probe
=
e2e
.
E2EPeriodicSampleProbe
(
'probe'
,
'Rx'
)
s_probe
.
interval
=
'500ms'
s_probe
.
interval
=
'500ms'
...
@@ -359,7 +364,8 @@ def add_homa_bg(topo, subnet='10.2.0.0/16', **kwargs):
...
@@ -359,7 +364,8 @@ def add_homa_bg(topo, subnet='10.2.0.0/16', **kwargs):
elif
(
params
[
'app_proto'
]
==
'homa'
):
elif
(
params
[
'app_proto'
]
==
'homa'
):
s_app
=
e2e
.
E2EMsgGenApplication
(
'msggen'
)
s_app
=
e2e
.
E2EMsgGenApplication
(
'msggen'
)
s_app
.
stop_time
=
params
[
'app_stop_time'
]
s_app
.
stop_time
=
params
[
'app_stop_time'
]
s_app
.
remotes
=
remotes
s_app
.
remotes
=
remotes_to_connect
# s_app.max_msg = 1
s_host
.
add_component
(
s_app
)
s_host
.
add_component
(
s_app
)
s_probe
=
e2e
.
E2EPeriodicSampleProbe
(
'probe'
,
'Rx'
)
s_probe
=
e2e
.
E2EPeriodicSampleProbe
(
'probe'
,
'Rx'
)
s_probe
.
interval
=
'500ms'
s_probe
.
interval
=
'500ms'
...
...
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