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
c694754d
Commit
c694754d
authored
Nov 12, 2020
by
Jialin Li
Browse files
experiments: add nopaxos endhost sequencer experiment
parent
46c9dac8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
experiments/modes/nodeconfig.py
experiments/modes/nodeconfig.py
+4
-0
experiments/pyexps/qemu_nopaxos_ehseq.py
experiments/pyexps/qemu_nopaxos_ehseq.py
+29
-0
No files found.
experiments/modes/nodeconfig.py
View file @
c694754d
...
...
@@ -217,3 +217,7 @@ class NOPaxosClient(AppConfig):
cmds
.
append
(
'/root/nopaxos/bench/client -c /root/nopaxos.config '
+
'-m nopaxos -n 2000'
)
return
cmds
class
NOPaxosSequencer
(
AppConfig
):
def
run_cmds
(
self
,
node
):
return
[
'/root/nopaxos/sequencer/sequencer -c /root/sequencer.config'
]
experiments/pyexps/qemu_nopaxos_ehseq.py
0 → 100644
View file @
c694754d
import
modes.experiments
as
exp
import
modes.simulators
as
sim
import
modes.nodeconfig
as
node
e
=
exp
.
Experiment
(
'qemu-nopaxos-ehseq'
)
net
=
sim
.
NS3SequencerNet
()
e
.
add_network
(
net
)
class
NOPaxosHost
(
sim
.
QemuHost
):
disk_image
=
'nopaxos'
sequencer
=
sim
.
create_basic_hosts
(
e
,
1
,
'sequencer'
,
net
,
sim
.
CorundumBMNIC
,
NOPaxosHost
,
node
.
CorundumLinuxNode
,
node
.
NOPaxosSequencer
,
ip_start
=
100
)
replicas
=
sim
.
create_basic_hosts
(
e
,
3
,
'replica'
,
net
,
sim
.
CorundumBMNIC
,
NOPaxosHost
,
node
.
CorundumLinuxNode
,
node
.
NOPaxosReplica
)
clients
=
sim
.
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
sim
.
CorundumBMNIC
,
NOPaxosHost
,
node
.
CorundumLinuxNode
,
node
.
NOPaxosClient
,
ip_start
=
4
)
sequencer
[
0
].
sleep
=
1
for
i
in
range
(
len
(
replicas
)):
replicas
[
i
].
node_config
.
app
.
index
=
i
replicas
[
i
].
sleep
=
1
for
c
in
clients
:
c
.
node_config
.
app
.
server_ips
=
[
'10.0.0.1'
,
'10.0.0.2'
,
'10.0.0.3'
]
c
.
wait
=
True
experiments
=
[
e
]
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