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
b4de29b0
Commit
b4de29b0
authored
Dec 07, 2020
by
Jialin Li
Browse files
experiments: add VR experiments
parent
664f47ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
57 deletions
+61
-57
experiments/modes/nodeconfig.py
experiments/modes/nodeconfig.py
+11
-7
experiments/pyexps/nopaxos.py
experiments/pyexps/nopaxos.py
+50
-50
No files found.
experiments/modes/nodeconfig.py
View file @
b4de29b0
...
@@ -328,24 +328,29 @@ class NetperfClient(AppConfig):
...
@@ -328,24 +328,29 @@ class NetperfClient(AppConfig):
'netperf -H '
+
self
.
server_ip
,
'netperf -H '
+
self
.
server_ip
,
'netperf -H '
+
self
.
server_ip
+
' -t TCP_RR -- -o mean_latency,p50_latency,p90_latency,p99_latency'
]
'netperf -H '
+
self
.
server_ip
+
' -t TCP_RR -- -o mean_latency,p50_latency,p90_latency,p99_latency'
]
class
NOPaxos
Replica
(
AppConfig
):
class
VR
Replica
(
AppConfig
):
index
=
0
index
=
0
def
run_cmds
(
self
,
node
):
def
run_cmds
(
self
,
node
):
return
[
'/root/nopaxos/bench/replica -c /root/nopaxos.config -i '
+
return
[
'/root/nopaxos/bench/replica -c /root/nopaxos.config -i '
+
str
(
self
.
index
)
+
' -m
nopaxos
'
]
str
(
self
.
index
)
+
' -m
vr
'
]
class
NOPaxos
Client
(
AppConfig
):
class
VR
Client
(
AppConfig
):
server_ips
=
[]
server_ips
=
[]
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 '
+
cmds
.
append
(
'/root/nopaxos/bench/client -c /root/nopaxos.config '
+
'-m nopaxos -n 2000'
)
'-m vr -n 2000'
)
cmds
.
append
(
'sleep 20'
)
return
cmds
return
cmds
class
NOPaxosClientLast
(
AppConfig
):
class
NOPaxosReplica
(
AppConfig
):
index
=
0
def
run_cmds
(
self
,
node
):
return
[
'/root/nopaxos/bench/replica -c /root/nopaxos.config -i '
+
str
(
self
.
index
)
+
' -m nopaxos'
]
class
NOPaxosClient
(
AppConfig
):
server_ips
=
[]
server_ips
=
[]
def
run_cmds
(
self
,
node
):
def
run_cmds
(
self
,
node
):
cmds
=
[]
cmds
=
[]
...
@@ -353,7 +358,6 @@ class NOPaxosClientLast(AppConfig):
...
@@ -353,7 +358,6 @@ class NOPaxosClientLast(AppConfig):
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 nopaxos -n 2000'
)
'-m nopaxos -n 2000'
)
cmds
.
append
(
'sleep 0.5'
)
return
cmds
return
cmds
class
NOPaxosSequencer
(
AppConfig
):
class
NOPaxosSequencer
(
AppConfig
):
...
...
experiments/pyexps/nopaxos.py
View file @
b4de29b0
...
@@ -5,40 +5,32 @@ import modes.nodeconfig as node
...
@@ -5,40 +5,32 @@ import modes.nodeconfig as node
host_configs
=
[
'qemu'
,
'gt'
]
host_configs
=
[
'qemu'
,
'gt'
]
seq_configs
=
[
'swseq'
,
'ehseq'
]
seq_configs
=
[
'swseq'
,
'ehseq'
]
nic_configs
=
[
'ib'
,
'cb'
,
'cv'
]
nic_configs
=
[
'ib'
,
'cb'
,
'cv'
]
proto_configs
=
[
'vr'
,
'nopaxos'
]
num_client_configs
=
[
1
,
2
,
3
,
4
]
num_client_configs
=
[
1
,
2
,
3
,
4
]
experiments
=
[]
experiments
=
[]
link_rate_opt
=
'--LinkRate=100Gb/s '
# don't forget space at the end
link_rate_opt
=
'--LinkRate=100Gb/s '
# don't forget space at the end
link_latency_opt
=
'--LinkLatency=500ns '
link_latency_opt
=
'--LinkLatency=500ns '
for
num_c
in
num_client_configs
:
for
proto_config
in
proto_configs
:
for
host_config
in
host_configs
:
for
num_c
in
num_client_configs
:
for
seq_config
in
seq_configs
:
for
host_config
in
host_configs
:
for
nic_config
in
nic_configs
:
for
seq_config
in
seq_configs
:
e
=
exp
.
Experiment
(
'nopaxos-'
+
host_config
+
'-'
+
nic_config
+
'-'
+
seq_config
+
f
'-
{
num_c
}
'
)
for
nic_config
in
nic_configs
:
net
=
sim
.
NS3SequencerNet
()
e
=
exp
.
Experiment
(
proto_config
+
'-'
+
host_config
+
'-'
+
nic_config
+
'-'
+
seq_config
+
f
'-
{
num_c
}
'
)
net
.
opt
=
link_rate_opt
+
link_latency_opt
net
=
sim
.
NS3SequencerNet
()
e
.
add_network
(
net
)
net
.
opt
=
link_rate_opt
+
link_latency_opt
e
.
add_network
(
net
)
# host
if
host_config
==
'qemu'
:
host_class
=
sim
.
QemuHost
elif
host_config
==
'gt'
:
host_class
=
sim
.
Gem5Host
e
.
checkpoint
=
False
else
:
raise
NameError
(
host_config
)
# host
if
host_config
==
'qemu'
:
host_class
=
sim
.
QemuHost
# nic
if
nic_config
==
'ib'
:
nic_class
=
sim
.
I40eNIC
nc_class
=
node
.
I40eLinuxNode
elif
nic_config
==
'cb'
:
nic_class
=
sim
.
CorundumBMNIC
nc_class
=
node
.
CorundumLinuxNode
elif
nic_config
==
'cv'
:
nic_class
=
sim
.
CorundumVerilatorNIC
nc_class
=
node
.
CorundumLinuxNode
else
:
raise
NameError
(
nic_config
)
elif
host_config
==
'gt'
:
host_class
=
sim
.
Gem5Host
e
.
checkpoint
=
False
# nic
# nic
if
nic_config
==
'ib'
:
if
nic_config
==
'ib'
:
nic_class
=
sim
.
I40eNIC
nic_class
=
sim
.
I40eNIC
...
@@ -51,34 +43,42 @@ for num_c in num_client_configs:
...
@@ -51,34 +43,42 @@ for num_c in num_client_configs:
nc_class
=
node
.
CorundumLinuxNode
nc_class
=
node
.
CorundumLinuxNode
else
:
else
:
raise
NameError
(
nic_config
)
raise
NameError
(
nic_config
)
else
:
raise
NameError
(
host_config
)
nc_class
.
disk_image
=
'nopaxos'
# app
if
proto_config
==
'vr'
:
replica_class
=
node
.
VRReplica
client_class
=
node
.
VRClient
elif
proto_config
==
'nopaxos'
:
replica_class
=
node
.
NOPaxosReplica
client_class
=
node
.
NOPaxosClient
else
:
raise
NameError
(
proto_config
)
# endhost sequencer
if
seq_config
==
'ehseq'
and
proto_config
==
'nopaxos'
:
sequencer
=
sim
.
create_basic_hosts
(
e
,
1
,
'sequencer'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NOPaxosSequencer
,
ip_start
=
100
)
sequencer
[
0
].
sleep
=
1
nc_class
.
disk_image
=
'nopaxos'
replicas
=
sim
.
create_basic_hosts
(
e
,
3
,
'replica'
,
net
,
nic_class
,
host_class
,
nc_class
,
replica_class
)
for
i
in
range
(
len
(
replicas
)):
replicas
[
i
].
node_config
.
app
.
index
=
i
replicas
[
i
].
sleep
=
1
if
seq_config
==
'ehseq'
:
clients
=
sim
.
create_basic_hosts
(
e
,
num_c
,
'client'
,
net
,
nic_class
,
sequencer
=
sim
.
create_basic_hosts
(
e
,
1
,
'sequencer'
,
net
,
nic_class
,
host_class
,
nc_class
,
client_class
,
ip_start
=
4
)
host_class
,
nc_class
,
node
.
NOPaxosSequencer
,
ip_start
=
100
)
sequencer
[
0
].
sleep
=
1
replicas
=
sim
.
create_basic_hosts
(
e
,
3
,
'replica'
,
net
,
nic_class
,
for
c
in
clients
:
host_class
,
nc_class
,
node
.
NOPaxosReplica
)
c
.
node_config
.
app
.
server_ips
=
[
'10.0.0.1'
,
'10.0.0.2'
,
'10.0.0.3'
]
for
i
in
range
(
len
(
replicas
)):
replicas
[
i
].
node_config
.
app
.
index
=
i
replicas
[
i
].
sleep
=
1
clients
=
sim
.
create_basic_hosts
(
e
,
num_c
,
'client'
,
net
,
nic_class
,
clients
[
num_c
-
1
].
wait
=
True
host_class
,
nc_class
,
node
.
NOPaxosClient
,
ip_start
=
4
)
clients
[
num_c
-
1
].
sleep
=
5
for
c
in
clients
:
print
(
e
.
name
)
c
.
node_config
.
app
.
server_ips
=
[
'10.0.0.1'
,
'10.0.0.2'
,
'10.0.0.3'
]
#print (len(experiments))
clients
[
num_c
-
1
].
wait
=
True
clients
[
num_c
-
1
].
node_config
.
app
=
node
.
NOPaxosClientLast
()
print
(
e
.
name
)
experiments
.
append
(
e
)
#print (len(experiments))
experiments
.
append
(
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