Commit 62ee1d5a authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

experiments: add parameter for proxy shm size

parent 7ec0b8a0
...@@ -36,6 +36,9 @@ class NetProxy(SimProxy): ...@@ -36,6 +36,9 @@ class NetProxy(SimProxy):
# List of tuples (nic, with_listener) # List of tuples (nic, with_listener)
nics = None nics = None
# Shared memory size in GB
shm_size = 2048
class NetProxyListener(NetProxy): class NetProxyListener(NetProxy):
def __init__(self): def __init__(self):
self.listen = True self.listen = True
...@@ -65,7 +68,8 @@ class RDMANetProxyListener(NetProxyListener): ...@@ -65,7 +68,8 @@ class RDMANetProxyListener(NetProxyListener):
def run_cmd(self, env): def run_cmd(self, env):
cmd = (f'{env.repodir}/dist/net_rdma -l ' cmd = (f'{env.repodir}/dist/net_rdma -l '
f'-s {env.proxy_shm_path(self)} ') f'-s {env.proxy_shm_path(self)} '
f'-S {self.shm_size} ')
for (nic, local) in self.nics: for (nic, local) in self.nics:
cmd += '-d ' if local else '-n ' cmd += '-d ' if local else '-n '
cmd += env.nic_eth_path(nic) + ' ' cmd += env.nic_eth_path(nic) + ' '
...@@ -78,7 +82,8 @@ class RDMANetProxyConnecter(NetProxyConnecter): ...@@ -78,7 +82,8 @@ class RDMANetProxyConnecter(NetProxyConnecter):
def run_cmd(self, env): def run_cmd(self, env):
cmd = (f'{env.repodir}/dist/net_rdma ' cmd = (f'{env.repodir}/dist/net_rdma '
f'-s {env.proxy_shm_path(self)} ') f'-s {env.proxy_shm_path(self)} '
f'-S {self.shm_size} ')
for (nic, local) in self.nics: for (nic, local) in self.nics:
cmd += '-n ' if local else '-d ' cmd += '-n ' if local else '-d '
cmd += env.nic_eth_path(nic) + ' ' cmd += env.nic_eth_path(nic) + ' '
......
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