Commit 40ee1501 authored by Jialin Li's avatar Jialin Li
Browse files

nopaxos: use new nopaxos repo

parent 30575677
...@@ -103,6 +103,9 @@ for proto_config in proto_configs: ...@@ -103,6 +103,9 @@ for proto_config in proto_configs:
for c in clients: for c in clients:
c.sleep = 5 c.sleep = 5
c.node_config.app.server_ips = ['10.0.0.1', '10.0.0.2', '10.0.0.3'] c.node_config.app.server_ips = ['10.0.0.1', '10.0.0.2', '10.0.0.3']
if seq_config == 'ehseq':
c.node_config.app.server_ips.append('10.0.0.100')
c.node_config.app.use_ehseq = True
c.node_config.disk_image = 'nopaxos' c.node_config.disk_image = 'nopaxos'
c.nics[0].sync_period = sync_period c.nics[0].sync_period = sync_period
c.sync_period = sync_period c.sync_period = sync_period
......
...@@ -320,7 +320,7 @@ class IperfTCPClient(AppConfig): ...@@ -320,7 +320,7 @@ class IperfTCPClient(AppConfig):
is_last = False is_last = False
def run_cmds(self, node): def run_cmds(self, node):
cmds = ['sleep 1', cmds = ['sleep 1',
'iperf -l 32M -w 32M -c ' + self.server_ip + ' -i 1 -P ' + 'iperf -l 32M -w 32M -c ' + self.server_ip + ' -i 1 -P ' +
str(self.procs)] str(self.procs)]
...@@ -338,15 +338,15 @@ class IperfUDPClient(AppConfig): ...@@ -338,15 +338,15 @@ class IperfUDPClient(AppConfig):
def run_cmds(self, node): def run_cmds(self, node):
cmds = ['sleep 1', cmds = ['sleep 1',
'iperf -c ' + self.server_ip + ' -i 1 -u -b ' + self.rate] 'iperf -c ' + self.server_ip + ' -i 1 -u -b ' + self.rate]
if self.is_last: if self.is_last:
cmds.append('sleep 0.5') cmds.append('sleep 0.5')
else: else:
cmds.append('sleep 10') cmds.append('sleep 10')
return cmds return cmds
class IperfUDPClientSleep(AppConfig): class IperfUDPClientSleep(AppConfig):
server_ip = '10.0.0.1' server_ip = '10.0.0.1'
...@@ -367,9 +367,9 @@ class NoTraffic(AppConfig): ...@@ -367,9 +367,9 @@ class NoTraffic(AppConfig):
else: else:
if (self.is_sleep): if (self.is_sleep):
cmds.append('sleep 10') cmds.append('sleep 10')
else: else:
cmds.append('dd if=/dev/urandom of=/dev/null count=500000') cmds.append('dd if=/dev/urandom of=/dev/null count=500000')
return cmds return cmds
...@@ -398,7 +398,7 @@ class VRClient(AppConfig): ...@@ -398,7 +398,7 @@ class VRClient(AppConfig):
for ip in self.server_ips: for ip in self.server_ips:
cmds.append('ping -c 1 ' + ip) cmds.append('ping -c 1 ' + ip)
cmds.append('/root/nopaxos/bench/client -c /root/nopaxos.config ' + cmds.append('/root/nopaxos/bench/client -c /root/nopaxos.config ' +
'-m vr -n 2000') '-m vr -u 2 -h ' + node.ip)
return cmds return cmds
class NOPaxosReplica(AppConfig): class NOPaxosReplica(AppConfig):
...@@ -410,13 +410,17 @@ class NOPaxosReplica(AppConfig): ...@@ -410,13 +410,17 @@ class NOPaxosReplica(AppConfig):
class NOPaxosClient(AppConfig): class NOPaxosClient(AppConfig):
server_ips = [] server_ips = []
is_last = False is_last = False
use_ehseq = False
def run_cmds(self, node): def run_cmds(self, node):
cmds = [] cmds = []
for ip in self.server_ips: for ip in self.server_ips:
cmds.append('ping -c 1 ' + ip) cmds.append('ping -c 1 ' + ip)
cmds.append('/root/nopaxos/bench/client -c /root/nopaxos.config ' + cmd = '/root/nopaxos/bench/client -c /root/nopaxos.config ' + \
'-m nopaxos -n 40000') '-m nopaxos -u 2 -h ' + node.ip
if self.use_ehseq:
cmd += ' -e'
cmds.append(cmd)
if self.is_last: if self.is_last:
cmds.append('sleep 1') cmds.append('sleep 1')
else: else:
...@@ -425,7 +429,7 @@ class NOPaxosClient(AppConfig): ...@@ -425,7 +429,7 @@ class NOPaxosClient(AppConfig):
class NOPaxosSequencer(AppConfig): class NOPaxosSequencer(AppConfig):
def run_cmds(self, node): def run_cmds(self, node):
return ['/root/nopaxos/sequencer/sequencer -c /root/sequencer.config'] return ['/root/nopaxos/sequencer/sequencer -c /root/nopaxos.config -m nopaxos']
class RPCServer(AppConfig): class RPCServer(AppConfig):
......
...@@ -312,7 +312,7 @@ class NS3SequencerNet(NetSim): ...@@ -312,7 +312,7 @@ class NS3SequencerNet(NetSim):
elif 'replica' in n.name: elif 'replica' in n.name:
ports += '--ServerPort=' + env.nic_eth_path(n) + ' ' ports += '--ServerPort=' + env.nic_eth_path(n) + ' '
elif 'sequencer' in n.name: elif 'sequencer' in n.name:
ports += '--EndhostSequencerPort=' + env.nic_eth_path(n) + ' ' ports += '--ClientPort=' + env.nic_eth_path(n) + ' '
else: else:
raise Exception('Wrong NIC type') raise Exception('Wrong NIC type')
cmd = env.repodir + '/sims/external/ns-3' + '/cosim-run.sh sequencer sequencer-single-switch-example ' + ports + ' ' + self.opt cmd = env.repodir + '/sims/external/ns-3' + '/cosim-run.sh sequencer sequencer-single-switch-example ' + ports + ' ' + self.opt
......
...@@ -2,4 +2,5 @@ f 1 ...@@ -2,4 +2,5 @@ f 1
replica 10.0.0.1:12345 replica 10.0.0.1:12345
replica 10.0.0.2:12345 replica 10.0.0.2:12345
replica 10.0.0.3:12345 replica 10.0.0.3:12345
multicast 10.0.0.255:12345 multicast 10.0.0.255:22222
sequencer 10.0.0.100:12345
...@@ -53,15 +53,9 @@ ...@@ -53,15 +53,9 @@
"destination": "/tmp/nopaxos.config", "destination": "/tmp/nopaxos.config",
"direction": "upload" "direction": "upload"
}, },
{
"type": "file",
"source": "sequencer.config",
"destination": "/tmp/sequencer.config",
"direction": "upload"
},
{ {
"type": "shell", "type": "shell",
"inline": ["sudo mv /tmp/nopaxos.config /root/nopaxos.config; sudo mv /tmp/sequencer.config /root/sequencer.config"] "inline": ["sudo mv /tmp/nopaxos.config /root/nopaxos.config"]
} }
], ],
"variables": { "variables": {
......
...@@ -9,6 +9,6 @@ make install ...@@ -9,6 +9,6 @@ make install
ldconfig ldconfig
mkdir -p /root mkdir -p /root
git clone https://github.com/UWSysLab/NOPaxos.git /root/nopaxos git clone https://github.com/nicklijl/simbricks-nopaxos.git /root/nopaxos
cd /root/nopaxos cd /root/nopaxos
make -j4 make -j4
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