Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
shenweihai1 committed Mar 5, 2022
1 parent cf80b8a commit e4b1fa4
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 110 deletions.
31 changes: 4 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ In this section, you can set up Rolis locally for testing and verification, whic
We run all our codes on `ubuntu 18.04` which mainly depends on several Linux libraries (i.e., boost, gcc and libyaml-cpp-dev). We provide a docker image with all required dependencies and source code for ease **so you can run on any local machine supporting Docker**. You can directly build a runnable Rolis instance with all required dependencies and source code via
```bash
cd ~
git clone https://github.com/shenweihai1/rolis-eurosys2022.git
cd ~/rolis-eurosys2022
git clone https://github.com/stonysystems/rolis.git
cd ~/rolis
cd ./docker
bash docker.sh
```
Expand Down Expand Up @@ -52,29 +52,6 @@ Before moving on, please make distributed environment ready in [environment](./e
We provide one-click runnable to generate all results under folder `./results`. It would take up to 2 ~ 3 hours to run all experiments.
```bash
# on the leader replica
cd ~/rolis-eurosys2022
cd ~/rolis
bash one-click.sh
```
### case 1: run chosen experiments
The one-click script usually can complete all experiments till the end, but everything can happen. In this case, you don't have to re-run completed experiments. You can comment the completed experiments and run the incompleted ones in the `one-click.sh`. For example, you can choose to run `experiment-8` as below
![alt](./documents/one-click.png)

### case 2: run the experiment with chosen worker threads
For example, in the following experiment-4, numbers for worker threads 13-15 are missing. You can re-run the experiment with chosen worker threads by configuration in the `one-click.sh`.
![alt](./documents/case2.png)

![alt](./documents/rerun-exp.png)



You can find a more detailed experiment instructions in [experiments](./instructions.md).

The results should be as below
![alt](./documents/results-all.png)
1. `batch-latency.log`: the 50th, 90th and 95th latency results of Rolis with different batch-sizes
2. `batch-throughput.log`: the throughput results of Rolis with different batch-sizes
3. `failover-16-throughput.log`: the throughput over time in the failover scenario
4. `scalability-tpcc.log`: the throughput of Rolis with different worker threads under tpcc workload
5. `scalability-ycsb.log`: the throughput of Rolis with different worker threaders under ycsb++ workload
6. `silo-only-tpcc.log`: the throughput of Silo under tpcc workload
7. `silo-only-ycsb.log`: the throughput of Silo under ycsb++ workload
```
7 changes: 2 additions & 5 deletions batch_silo.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
repos="rolis-eurosys2022" # repos name, default
repos="rolis" # repos name, default
workdir="~" # we default put our repos under the root
leadrIP=$( cat ./scripts/ip_leader_replica )
p1=$( cat ./scripts/ip_p1_follower_replica )
p2=$( cat ./scripts/ip_p2_follower_replica )
clients=(
$p1 # p1 follower replica IP
$p2 # p2 follower replica IP
"10.1.0.74" # it is only required for networked clients
#"10.1.0.74" # it is only required for networked clients
)

repos="silo-sto"
workdir="~/weihai-projects"

cmd1=""
cmd2="sudo skill dbtest;sudo pkill dbtest; sudo pkill nc_main; sleep 1"
cmd3="sudo rm -rf $workdir/$repos/xxxx15/*; sudo rm -rf $workdir/$repos/xxxx15_micro/*" # sudo rm -rf ~/meerkat/logs/* && sudo rm -rf /tmp/* && sudo rm -rf ~/boost_1_70_0 ~/boost_1_70_0.tar.bz2 ~/dpdk-19.11.5.tar.gz ~/dpdk-stable-19.11.5 ~/eRPC"
Expand Down
6 changes: 3 additions & 3 deletions batch_size_exp.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
repos="rolis-eurosys2022" # repos name, default
repos="rolis" # repos name, default
workdir="~" # we default put our repos under the root
leadrIP=$( cat ./scripts/ip_leader_replica )
p1=$( cat ./scripts/ip_p1_follower_replica )
p2=$( cat ./scripts/ip_p2_follower_replica )
ulimit -n 10000

repos="silo-sto"
workdir="~/weihai-projects"
# repos="silo-sto"
# workdir="~/weihai-projects"

# cleanup logs
eval "cd $workdir/$repos/ && sudo rm -rf xxxx15/*"
Expand Down
14 changes: 0 additions & 14 deletions commands.sh

This file was deleted.

4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ COPY gitconfig /root/.gitconfig
# deploy Rolis environment
WORKDIR "/root"
# using branch "master" for the Rolis
RUN git clone https://github.com/shenweihai1/rolis-eurosys2022.git
RUN git clone https://github.com/stonysystems/rolis.git

RUN apt-get install -y wget
WORKDIR "/root/rolis-eurosys2022"
WORKDIR "/root/rolis"
# install dependencies
RUN bash install.sh
8 changes: 4 additions & 4 deletions env.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Let's assume here, `10.1.0.7` is the leader replica, `10.1.0.8` serves as the p1
```bash
# on the leader replica
cd ~
git clone https://github.com/shenweihai1/rolis-eurosys2022.git
cd rolis-eurosys2022
git clone https://github.com/stonysystems/rolis.git
cd rolis
# install dependencies
bash ./install.sh

Expand All @@ -22,13 +22,13 @@ cd ./third-party/paxos/config/1silo_1paxos_2follower
./run.sh "10.1.0.7" "10.1.0.8" "10.1.0.9"

# compile Paxos
cd ~/rolis-eurosys2022
cd ~/rolis
make paxos
```

### Sync modifications to two other replicas via ssh (still run this command the leader replica)
```bash
cd ~/rolis-eurosys2022
cd ~/rolis
bash ./batch_silo.sh scp
```
At this moment, the running environment on 3 replicas is ready.
Empty file modified multi-failover.sh
100644 → 100755
Empty file.
72 changes: 38 additions & 34 deletions one-click.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
repos="rolis-eurosys2022" # repos name, default
repos="rolis" # repos name, default
workdir="~" # we default put our repos under the root
leadrIP=$( cat ./scripts/ip_leader_replica )
p1=$( cat ./scripts/ip_p1_follower_replica )
Expand All @@ -10,8 +10,8 @@ start=1
# maximum of the number of worker threads
end=31

repos="silo-sto"
workdir="~/weihai-projects"
# repos="silo-sto"
# workdir="~/weihai-projects"

setup () {
bash ./batch_silo.sh kill
Expand Down Expand Up @@ -344,13 +344,13 @@ experiment13_collect() {

experiment14_s() {
# a machine with 32-core as the client is required, here I use 10.1.0.74
eval "ulimit -n 10000; cd $workdir/$repos/ && python3 scripts/leader_b.py $1 $1 1" &
eval "ulimit -n 10000; cd $workdir/$repos/ && python3 scripts/leader_b_m.py $1 $1 1" &
sleep 1

ssh $p2 "ulimit -n 10000; cd $workdir/$repos/ && python3 scripts/follower_b2.py $1 $1 1" &
ssh $p2 "ulimit -n 10000; cd $workdir/$repos/ && python3 scripts/follower_b2_m.py $1 $1 1" &
sleep 1

ssh $p1 "ulimit -n 10000; cd $workdir/$repos/ && python3 scripts/follower_b1.py $1 $1 1" &
ssh $p1 "ulimit -n 10000; cd $workdir/$repos/ && python3 scripts/follower_b1_m.py $1 $1 1" &
sleep 1

ssh "10.1.0.74" "ulimit -n 10000; cd $workdir/$repos/ && ./third-party/paxos/build/nc_main 0 $1 '$leadrIP'" &
Expand All @@ -360,18 +360,22 @@ experiment14_s() {
./batch_silo.sh kill
}

experiment14() {
experiment14() {
# 1. prepare a 32-core cpu client, let's assume is 10.1.0.74
# 2. modify the nc_setup_server to the server_ip (10.1.0.7)
# 3. open the comment "10.1.0.74" in the batch_silo.sh
echo "experiment14: networked clients\n"
make paxos
sudo ./multi_client.sh
# ./multi_client.sh is for tpc
sudo ./multi_client_ycsb.sh
./batch_silo.sh kill
./batch_silo.sh scp

for (( trd=$start; trd<=$end; trd++ ))
do
./batch_silo.sh kill
experiment14_s $trd
done
do
./batch_silo.sh kill
experiment14_s $trd
done
}

experiment14_local() {
Expand Down Expand Up @@ -412,29 +416,29 @@ experiment14_ycsb_local() {
sudo pkill -f nc_main
}

#setup
## reproduce results reported in the paper
#experiment1
#experiment2
#experiment3
#experiment4
#experiment5
#experiment6 4
#experiment6 8
#experiment6 16
#experiment7
#experiment8
#experiment9
#experiment10
#experiment11
#experiment12
#experiment13_1
#experiment13_2
#experiment13_3
#experiment13_4
#experiment13_collect
setup
# reproduce results reported in the paper
experiment1
experiment2
experiment3
experiment4
experiment5
experiment6 4
experiment6 8
experiment6 16
experiment7
experiment8
experiment9
experiment10
experiment11
experiment12
experiment13_1
experiment13_2
experiment13_3
experiment13_4
experiment13_collect

# for testing experiments
#experiment14
#experiment14_local
experiment14_ycsb_local
#experiment14_ycsb_local
42 changes: 21 additions & 21 deletions test/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,29 @@ function test_silo_only
}

# test failure
# function test_failure
# {
# sudo pkill -f dbtest
# ./multi.sh
# ./multi_recover_b0.sh 2
# sleep 1
# ./multi_recover_b1.sh 2
# sleep 1
# ./multi_recover_b2.sh 2
# sleep 10
# kill $(ps aux | grep 'paxos-leader-config' | awk '{print $2}')
# sleep 50
function test_failure
{
sudo pkill -f dbtest
./multi-failover.sh
./multi_recover_b0.sh 2
sleep 1
./multi_recover_b1.sh 2
sleep 1
./multi_recover_b2.sh 2
sleep 10
kill $(ps aux | grep 'paxos-leader-config' | awk '{print $2}')
sleep 50

# sudo pkill -f dbtest
# run "grep commits: $base/xxxx_recover/leader-2.log"
# assert_success
sudo pkill -f dbtest
run "grep commits: $base/xxxx_recover/leader-2.log"
assert_success

# cat "$base/xxxx_recover/follower-p1-2.log" "$base/xxxx_recover/follower-p2-2.log" > "$base/xxxx_recover/follower-2.log"
# run "grep agg_throughput: $base/xxxx_recover/follower-2.log"
# assert_success
cat "$base/xxxx_recover/follower-p1-2.log" "$base/xxxx_recover/follower-p2-2.log" > "$base/xxxx_recover/follower-2.log"
run "grep agg_throughput: $base/xxxx_recover/follower-2.log"
assert_success

# run "grep process. $base/xxxx_recover/follower-2.log"
# assert_success
# }
run "grep process. $base/xxxx_recover/follower-2.log"
assert_success
}

testrunner

0 comments on commit e4b1fa4

Please sign in to comment.