This repository contains the source code for our upcoming RTSS 2022 paper titled In-ConcReTeS: Interactive Consistency meets Distributed Real-Time Systems, Again!.
The internal codename for our system is Achal, which means immovable or invariable in Hindi, and stands for the predictable performance we seek to achieve in fault-tolerant distributed real-time systems.
We proivde a Docker environment to simplfy artifact evaluation. We also explain how to run the system natively on our testbed (in case reviewers have access to our testbed or similar hardware).
Disclaimer: Since our evaluation is performance-oriented and results depend on the platform used, the results obtained using Docker may not mirror that in the paper and may also depend on the host machine configurations.
When cloning this repository, also recursively clone the submodules!
For questions, contact Arpan Gujarati (arpanbg@cs.ubc.ca).
Achal is a distributed system. In our experiment setup, we deployed Achal on a cluster of 4 raspberry pis, and control it from a client machine. Note that the client machine is not part of the distributed system, but merely used to orchestrate experiments.
┌───────────────────────────────┐
│ │
│ │
│ Client machine │
│ │
│ │
└──────────────┬────────────────┘
│Run experiments!
┌───────────────┬──────┴─────────┬───────────────┐
│ │ │ │
▼ ▼ ▼ ▼
┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐
│ │ │ │ │ │ │ │
│ Pi 1 │ ◄─────► │ Pi 2 │ ◄────► │ Pi 3 │ ◄─────►│ Pi 4 │
│ │ │ │ │ │ │ │
└──────┘ └──────┘ └──────┘ └──────┘
To make it convenient for new users and artifact evaluators, we have provided a docker-compose.yml file which simulates the aforementioned 4 Raspberry Pis with 4 containers, and also deploys a client container to control these Pis, as we did while we evaluated the performance of the prototype.
Our code and scripts expect the Raspberry Pis to have fixed hostnames and DNS (achal0*), and fixed IPs (198.162.55.14*). (Yeah, it is bad coding practice...) In addition, they assume that the client machine can execute command ssh achal0* to connect to any of the Pis. These configurations are all set in docker-compose.yml, and you do not need to worry about them.
To use docker-compose.yml, make sure you have
docker and docker-compose installed, and that you can use docker without sudo. We recommend that you use Ubuntu and your are using an x86 machine with a CPU that has at least 4 cores, preferably 8. Then, run
docker-compose up --build
This will bring up 5 containers as described above. Note that the first run of the command will be slow, whereas subsequent commands will be much faster.
docker-composewill useDockerfileto build environments for the Raspberry Pi containers, andDockerfile.clientfor theclientcontainer.docker-composewill set the DNS, hostnames, and IPs as configured and expected by our code and scripts.- The
picontainers will launch and start theiropenssh-serverslistening forsshconnections. Theclientcontainer will attempt to connect to each of thepicontainers once, to test the connectivity. - After you start
docker-composeyou can look straight into yourlogging/directory for the execution logs, as by default,docker-composewill launch experimentA2in the paper (see the relevant section below for details). - Wait for the
clientcontainer to establish its first connetions with thepicontainers and finish experimentA2. When it is done, you should findet_profile.pdfunderpaper/a2. Note that thelogging/andpaper/is shared between your computer (the host of the docker engine) and theclientcontainer. So, there is no need to explicitly copy files out of the container. - Now, to run other experiments, you can modify
docker-compose.yml, quit the runningdocker-composeprogram, and re-rundocker-compose up --build. So, for instance, change this:
...
CONTAINER_MODE=true bash run_ivp_2.sh;
bash plot_ivp_2.sh;
...
to this
...
CONTAINER_MODE=true bash run_ivp_1.sh;
bash plot_ivp_1.sh;
...
or this
...
CONTAINER_MODE=true bash run_bosch_1.sh;
bash plot_bosch_1.sh;
...
Like before, we will assume
- a client workstation and four target nodes
achal01-achal04 - that target nodes can be accessed from
clientvia SSH without passwords - and that this repository is cloned at
path/to/achal
We also assume for now that redis, etcd, and PTP are installed (see paper for version details)
- TODO: Add details about installing
redis,etcd, and PTP on a vanilla system
- Run
ifconfig, expected output:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 198.162.55.144 netmask 255.255.254.0 broadcast 198.162.55.255
inet6 fe80::3a6:5deb:2c59:cd7f prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:cd:ce:77 txqueuelen 1000 (Ethernet)
RX packets 130046388 bytes 273546776 (260.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 131685298 bytes 406542628 (387.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 76902811 bytes 8946060175 (8.3 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 76902811 bytes 8946060175 (8.3 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
-
Run the following commands:
sudo ip link add link eth0 name eth0.11 type vlan id 1 egress 0:2 1:2 2:2 3:2 4:2 5:2 6:2 7:2sudo ip link add link eth0 name eth0.12 type vlan id 2 egress 0:4 1:4 2:4 3:4 4:4 5:4 6:4 7:4
-
Again run
ifconfig, expected output:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 198.162.55.144 netmask 255.255.254.0 broadcast 198.162.55.255
inet6 fe80::3a6:5deb:2c59:cd7f prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:cd:ce:77 txqueuelen 1000 (Ethernet)
RX packets 130046461 bytes 273556620 (260.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 131685371 bytes 406551468 (387.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0.11: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::6584:daac:a387:87c4 prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:cd:ce:77 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 686 (686.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0.12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::824d:a435:2f9b:ca3a prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:cd:ce:77 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7 bytes 976 (976.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 76902811 bytes 8946060175 (8.3 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 76902811 bytes 8946060175 (8.3 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
-
Check the PTP status using
systemctl status ptp4land find the path of the ptp4l service -
For example, the output will contain a line
Loaded: loaded ( ; enabled; vendor preset: enabled) -
Open file using
sudo vim /lib/systemd/system/ptp4l.serviceand check the ethernet interface used by PTP -
By default, it is
eth0, replace it witheth0.11 -
Run the following
systemctlcommands:sudo systemctl daemon-reloadsudo systemctl restart ptp4l
This applies mainly to native runs. Comments regarding Docker runs are added at the end of each experiment description.
This relates to Figure 3 in the paper.
-
First, go to the project working directory
cd path/to/achal -
Empty the logging directory
rm -rf logging/* -
From the workstation, execute the bash script
bash run_ivp_1.sh- This initiates the python script
run.pyfor 20 different configurations (sequentially) - The experiment may take about 8 to 9 hours in total
- All logs are stored inside the
loggingdirectory - For each run, a new folder with a unique timestamp
2022-09-08 04:22:01.107544is created - This folder contains the logs and data files for that run collected from each node
- We care about the latest folder since the data files contain cumulative history
- This initiates the python script
-
Afterwards, execute the plotting script
bash plot_ivp_1.sh- This picks the latest folder folder inside
logging, say,2022-09-08 04:22:01.107544 - All data files of the form
achal03_20220907192353.dataare then moved to the plotting directory/paper/a1 - The plotting script
plot_a1.pyis then executed - Resulting plots
s.pdfandet.pdfare stored inpaper/a1as well
- This picks the latest folder folder inside
-
The plots are intepreted as follows.
s.pdfcorresponds to Fig 3(a) in the paper that measures the number of successful iterations for each configurationet.pdfcorresponds to Fig 3(b) in the paper that measures the execution times for each configuration
-
Shortening the experiment
- We currently do not support producing a graph for a shorter version of the experiment.
- However, feel free to simplify the configuration space in
run_ivp_1.sh(i.e., the big nestedforloop inside) - You continue with the above steps now, but the plotting script may fail
- However, the plotting script copies the relevant node-specific raw data to the
/paper/a1, which you can peruse for a quick overview of results
-
Docker
- As mentioned above, the
docker-compose.ymlfile can be modified to run therun_ivp_1.shandplot_ivp_1.shscripts instead, and the results can be found in the/paper/a1folder
- As mentioned above, the
This relates to Figure 4 in the paper.
-
Again, go to the project working directory
cd path/to/achal -
Empty the logging directory
rm -rf logging/* -
From the workstation, execute the bash script
bash run_ivp_2.sh- This initiates the python script
run.pyfor 6 different configurations (sequentially) - The experiment may take about 1 hour in total
- All logs are stored inside the
loggingdirectory - For each run, a new folder with a unique timestamp
2022-09-08 04:22:01.107544is created - This folder contains the logs and data files for that run collected from each node
- We care about the latest folder since the data files contain cumulative history
- This initiates the python script
-
Afterwards, execute the plotting script
bash plot_ivp_2.sh- This picks the latest folder folder inside
logging, say,2022-09-08 04:22:01.107544 - All data files containing the execution times of the form
achal03_20220907192353.data.etare then moved to the plotting directory/paper/a2 - The plotting script
plot_a2.pyis then executed - Resulting plots
et_profile.pdfis stored inpaper/a2as well
- This picks the latest folder folder inside
-
The plot is intepreted as follows.
et_profile.pdfcorresponds to Fig 4 in the paper that measures the execution times for different faulty scenarios
-
Docker
- As mentioned above, the
docker-compose.ymlfile can be modified to run therun_ivp_2.shandplot_ivp_2.shscripts instead, and the results can be found in the/paper/a2folder
- As mentioned above, the
This relates to Table I in the paper.
-
First, go to the project working directory
cd path/to/achal -
Empty the logging directory
rm -rf logging/* -
From the workstation, execute the bash script
bash run_bosch_1.sh- This initiates the python script
run.pyfor 8 different configurations (sequentially) - The experiment may take about 2 hours in total
- All logs are stored inside the
loggingdirectory - For each run, a new folder with a unique timestamp
2022-09-08 04:22:01.107544is created - This folder contains the logs and data files for that run collected from each node
- We care about the latest folder since the data files contain cumulative history
- This initiates the python script
-
Afterwards, execute the plotting script
bash plot_bosch_1.sh- This picks the latest folder folder inside
logging, say,2022-09-08 04:22:01.107544 - All data files of the form
achal03_20220907192353.dataare then moved to the plotting directory/paper/b1 - The plotting script
plot_b1.pyis then executed - The script does not plot anything but output a file
table.txtcontaining a table that we show in the paper as Table I
- This picks the latest folder folder inside
-
Shortening the experiment
- In the
run_bosch_1.shfile, you can remove some of the entries from theconfig_files0array to shorten the runtime
- In the
-
Docker
- As mentioned above, the
docker-compose.ymlfile can be modified to run therun_bosch_1.shandplot_bosch_1.shscripts instead, and the results can be found in the/paper/b1folder
- As mentioned above, the
These relate to Table II (upper and lower halves) in the paper (respectively).
- These steps are identical to the previous experiment B1, only the workload configurations used in each
run_bosch_*.shscript are different - The plotting scripts are actually identical, we have separated them just for naming convenience
- Hence, follow the same steps as B1, but replace
b1withb2orb3everywhere - B2 generates data for the first 9 rows of table II in the paper and B3 for the remaining rows