"...composable_kernel_rocm.git" did not exist on "14c52befdaadc392e93450df6b5501f70c43f34d"
Commit 3e8e34aa authored by Hejing Li's avatar Hejing Li
Browse files

homa large scale

parent b33c5a01
...@@ -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)
...@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment