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
3e8e34aa
Commit
3e8e34aa
authored
Jan 24, 2024
by
Hejing Li
Browse files
homa large scale
parent
b33c5a01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
16 deletions
+39
-16
experiments/pyexps/homa.py
experiments/pyexps/homa.py
+5
-0
experiments/simbricks/orchestration/nodeconfig.py
experiments/simbricks/orchestration/nodeconfig.py
+34
-16
No files found.
experiments/pyexps/homa.py
View file @
3e8e34aa
...
@@ -86,9 +86,14 @@ for host_type in host_types:
...
@@ -86,9 +86,14 @@ for host_type in host_types:
)
)
nodes
[
0
].
node_config
.
app
.
is_node_zero
=
True
nodes
[
0
].
node_config
.
app
.
is_node_zero
=
True
i
=
0
for
c
in
nodes
:
for
c
in
nodes
:
c
.
node_config
.
disk_image
=
'homa'
c
.
node_config
.
disk_image
=
'homa'
c
.
node_config
.
app
.
id
=
i
c
.
node_config
.
app
.
cluster_size
=
n
c
.
wait
=
True
c
.
wait
=
True
i
+=
1
# add to experiments
# add to experiments
experiments
.
append
(
e
)
experiments
.
append
(
e
)
experiments/simbricks/orchestration/nodeconfig.py
View file @
3e8e34aa
...
@@ -398,8 +398,8 @@ class LinuxFEMUNode(NodeConfig):
...
@@ -398,8 +398,8 @@ class LinuxFEMUNode(NodeConfig):
class
HomaCluster
(
AppConfig
):
class
HomaCluster
(
AppConfig
):
def
__init__
(
self
)
->
None
:
def
__init__
(
self
)
->
None
:
super
().
__init__
()
super
().
__init__
()
self
.
is_node_zero
=
False
self
.
cluster_size
=
2
self
.
cluster_size
=
2
self
.
id
=
0
def
prepare_post_cp
(
self
)
->
tp
.
List
[
str
]:
def
prepare_post_cp
(
self
)
->
tp
.
List
[
str
]:
return
super
().
prepare_post_cp
()
+
[
return
super
().
prepare_post_cp
()
+
[
...
@@ -411,18 +411,45 @@ class HomaCluster(AppConfig):
...
@@ -411,18 +411,45 @@ class HomaCluster(AppConfig):
return
{
**
m
,
**
super
().
config_files
()}
return
{
**
m
,
**
super
().
config_files
()}
def
run_cmds
(
self
,
node
:
NodeConfig
)
->
tp
.
List
[
str
]:
def
run_cmds
(
self
,
node
:
NodeConfig
)
->
tp
.
List
[
str
]:
cmd
=
[
'mount -t sysfs sysfs /sys'
]
cmd
=
[
'mount -t sysfs sysfs /sys'
,
'mount -t proc proc /proc'
]
if
(
self
.
is_node_zero
):
cmd
.
append
(
f
'/root/homa/util/cp_node server --protocol homa & '
)
cmd
.
append
(
f
'/root/homa/util/cp_vs_tcp -n
{
self
.
cluster_size
}
-w w4 -b 10 --protocol homa'
)
cmd
.
append
(
'sleep 5'
)
else
:
cmd
.
append
(
f
'/root/homa/util/cp_node client --protocol homa --workload w4 --first-server 0 --server-nodes
{
self
.
cluster_size
}
--id
{
self
.
id
}
&'
)
cmd
.
append
(
'service ssh restart'
)
cmd
.
append
(
'sleep 10'
)
cmd
.
append
(
'sleep infinity'
)
cmd
.
append
(
'pkill cp_node'
)
# if (self.is_node_zero):
# cmd.append('service ssh restart')
# cmd.append('cp authorized_keys ~/.ssh/authorized_keys')
# cmd.append('cp id_rsa ~/.ssh/id_rsa')
# cmd.append('chmod 0700 ~/.ssh/id_rsa')
# cmd.append('echo "$!"')
# cmd.append('pid=$!')
# cmd.append('echo "client --protocol homa" > /proc/$pid/fd/0')
# cmd.append('ping 10.0.0.1')
# cmd.append('ssh -vvv -o StrictHostKeyChecking=no 10.0.0.1 echo hello')
# cmd.append(f'/root/homa/util/cp_vs_tcp -v --no-homa-prio -n {self.cluster_size} -w w4 -b 10 --protocol homa')
# else:
# cmd.append('service ssh restart')
# cmd.append('cp authorized_keys ~/.ssh/authorized_keys')
# cmd.append('cp id_rsa ~/.ssh/id_rsa')
# cmd.append('chmod 0700 ~/.ssh/id_rsa')
# cmd.append('sleep infinity')
return
cmd
return
cmd
class
HomaClientNode
(
AppConfig
):
class
HomaClientNode
(
AppConfig
):
def
__init__
(
self
)
->
None
:
super
().
__init__
()
self
.
id
=
0
self
.
cluster_size
=
2
def
prepare_post_cp
(
self
)
->
tp
.
List
[
str
]:
def
prepare_post_cp
(
self
)
->
tp
.
List
[
str
]:
return
super
().
prepare_post_cp
()
+
[
return
super
().
prepare_post_cp
()
+
[
'insmod homa.ko'
'insmod homa.ko'
...
@@ -434,22 +461,13 @@ class HomaClientNode(AppConfig):
...
@@ -434,22 +461,13 @@ class HomaClientNode(AppConfig):
def
run_cmds
(
self
,
node
:
NodeConfig
)
->
tp
.
List
[
str
]:
def
run_cmds
(
self
,
node
:
NodeConfig
)
->
tp
.
List
[
str
]:
return
[
return
[
'echo "10.0.0.2 node1" >> /etc/hosts'
,
'mount -t sysfs sysfs /sys'
,
'mount -t sysfs sysfs /sys'
,
'mount -t proc proc /proc'
,
'mount -t proc proc /proc'
,
#'cat /etc/hosts',
#'ping 10.0.0.2 -c 3',
#'ping node1',
#'sysctl -w .net.homa.poll_usecs=300000',
'/root/homa/util/cp_node client --protocol homa'
,
'/root/homa/util/cp_node client --protocol homa'
,
# '/root/homa/util/cp_vs_tcp --help',
# 'sleep 1',
# 'touch /root/homa/util/client.tt',
# 'touch /root/homa/util/client.tt',
# 'sleep 1',
# 'sleep 1',
# '/root/homa/util/ttprint.py > /root/homa/util/client.tt',
# '/root/homa/util/ttprint.py > /root/homa/util/client.tt',
# 'pkill cp_node',
# 'pkill cp_node',
# 'cat /root/homa/util/client.tt'
# 'cat /proc/net/homa_metrics'
]
]
class
HomaServerNode
(
AppConfig
):
class
HomaServerNode
(
AppConfig
):
...
...
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