-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add LOT implementation and benchmarks
- Loading branch information
Costin Iordache
committed
Jul 16, 2021
1 parent
62ad030
commit 0224eb6
Showing
55 changed files
with
193 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# FiveSHM | ||
# LOT - Low Overhead Transport | ||
|
||
## General description | ||
|
||
|
@@ -10,7 +10,7 @@ The code can be built either directly on the host machine _or_ within a Docker c | |
|
||
The benchmarks - either the entire suite or individual tests - can be executed following the procedure described below. Currently, four protocols are supported: TCP, UDP, SHM and TZC. | ||
|
||
When executed from within the Docker containers, the benchmarks results are generated under `${HOME}/fiveshm` folder. Otherwise, environment variable `FIVESHM_HOME` dictates the results folder. | ||
When executed from within the Docker containers, the benchmarks results are generated under `${HOME}/lot` folder. Otherwise, environment variable `lot_HOME` dictates the results folder. | ||
|
||
### Notes on provided code | ||
|
||
|
@@ -22,9 +22,9 @@ We apply the following bug fixes on top of ROS 1.12.14 in addition to our own co | |
|
||
### Third party code | ||
|
||
[Boost.Process 1_65_0](https://www.boost.org/doc/libs/1_65_0/doc/html/process.html) has been imported into the source tree to support [unit tests](./test/test_roscpp/test/test_shm.cpp). We note that Boost is released under the [Boost Software License](http://www.boost.org/LICENSE_1_0.txt). | ||
[Boost.Process 1_65_0](https://www.boost.org/doc/libs/1_65_0/doc/html/process.html) has been imported into the source tree to support [unit tests](./test/test_roscpp/test/test_shm.cpp). We note that [Boost 1.65.0](https://github.com/boostorg/boost/tree/boost-1.65.0) is released under the [Boost Software License](http://www.boost.org/LICENSE_1_0.txt). | ||
|
||
For convenience of running the benchmarks, we have also included TZC in this repository. TZC was developed by a group researchers afilliated to Tsinghua University, China and University of Maryland, USA and is described more fully in the _TZC: Efficient Inter-Process Communication for Robotics Middleware with Partial Serialization_. Its authors have released it under the [BSD](https://github.com/qboticslabs/tzc_transport/blob/master/package.xml) license. | ||
For convenience of running the benchmarks, we have also included [TZC](https://github.com/qboticslabs/tzc_transport) in this repository. TZC was developed by a group researchers afilliated to Tsinghua University, China and University of Maryland, USA and is described more fully in the _TZC: Efficient Inter-Process Communication for Robotics Middleware with Partial Serialization_. Its authors have released it under the [BSD](https://github.com/qboticslabs/tzc_transport/blob/master/package.xml) license. | ||
|
||
## Cloning the repository and switching to the target branch | ||
|
||
|
@@ -33,7 +33,7 @@ Note that we clone the repository into `$HOME/ros_comm/src/ros_comm` in this ste | |
``` | ||
git clone [email protected]:fiveai/ros_comm.git $HOME/ros_comm/src/ros_comm | ||
cd $HOME/ros_comm/src/ros_comm | ||
git checkout fiveshm | ||
git checkout lot | ||
``` | ||
|
||
## Building and running the benchmarks natively | ||
|
@@ -71,12 +71,12 @@ roslaunch --screen -v benchmark launch.xml \ | |
``` | ||
cd ~/ros_comm/src/ros_comm/clients/benchmark/docker | ||
export DOCKER_BUILDKIT=1 | ||
docker build --ssh default --tag fiveshm . | ||
docker build --ssh default --tag lot . | ||
``` | ||
|
||
### Executing the benchmark suite, deploying the ROS nodes in separate docker images | ||
|
||
Assuming the Docker container built as above, with a tag of `fiveshm`: | ||
Assuming the Docker container built as above, with a tag of `lot`: | ||
|
||
``` | ||
cd ~/ros_comm/src/ros_comm/clients/benchmark/docker | ||
|
@@ -97,6 +97,7 @@ The next sections provides examples of such commands. | |
### Benchmark execution command examples | ||
|
||
1. Execute the benchmarks suite for 1p5s using TZC protocol, in separate Docker containers, enforcing the subscribers start up order, allocating 16GB of shared memory to be used by the publishers, and telling the subscriber to wait 15 seconds before starting publishing messages, `TCP_NODELAY` enabled. | ||
|
||
``` | ||
python2 /ros_comm/src/ros_comm/clients/benchmark/execute.py \ | ||
--tcp=no --shm=no --tzc=yes --udp=no \ | ||
|
@@ -106,17 +107,18 @@ python2 /ros_comm/src/ros_comm/clients/benchmark/execute.py \ | |
shm_size_mega_bytes:=16000 | ||
``` | ||
|
||
|
||
2. Execute the benchmarks suite for 5p1s using TZC protocol, in separate Docker containers, with each publisher waiting for the subscriber to establish connection and with the subscriber start up delayed by 15secs, `TCP_NODELAY` enabled. | ||
|
||
``` | ||
python2 /ros_comm/src/ros_comm/clients/benchmark/execute.py \ | ||
--tcp=no --shm=no --tzc=yes --udp=no \ | ||
--use_case=5p1s_separate_docker --no_pool=yes --pool=no \ | ||
--extra_params pub_wait_for_subscribers:=true \ | ||
sub_extra_delay_ms:=15000 | ||
sub_extra_delay_ms:=15000 | ||
``` | ||
|
||
3. Execute the benchmarks suite for 5p1s using TZC protocol, in separate Docker containers, with each publisher waiting for the subscriber to establish connection and with the publishers start up order enforced, `TCP_NODELAY` enabled, overriding the default results path.. | ||
3. Execute the benchmarks suite for 5p1s using TZC protocol, in separate Docker containers, with each publisher waiting for the subscriber to establish connection and with the publishers start up order enforced, `TCP_NODELAY` enabled, overriding the default results path. | ||
|
||
``` | ||
python2 /ros_comm/src/ros_comm/clients/benchmark/execute.py \ | ||
--tcp=no --shm=no --tzc=yes --udp=no \ | ||
|
@@ -126,17 +128,18 @@ python2 /ros_comm/src/ros_comm/clients/benchmark/execute.py \ | |
sub_stats_file_path:=/path/to/results | ||
``` | ||
|
||
|
||
3. Execute the benchmarks suite for 5p1s using SHM protocol, in separate Docker containers, with each publisher waiting for the subscriber to establish connection and with the publishers start up order enforced, and image pools disabled. | ||
|
||
``` | ||
python2 /ros_comm/src/ros_comm/clients/benchmark/execute.py \ | ||
--tcp=no --shm=yes --tzc=no --udp=no \ | ||
--use_case=5p1s_separate_docker --no_pool=yes --pool=no \ | ||
--extra_params pub_wait_for_subscribers:=true \ | ||
pub_enable_synch_startup:=true | ||
pub_enable_synch_startup:=true | ||
``` | ||
|
||
4. Execute _one single test_ using TCP protocol, in same docker container, with image pool disabled. | ||
|
||
``` | ||
roslaunch --screen -v benchmark launch.xml \ | ||
pub_image_count:=200 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ RUN echo "export VISIBLE=now" >> /etc/profile | |
RUN echo "/usr/sbin/sshd" >> ~/.bashrc | ||
RUN echo "export ROSLAUNCH_SSH_UNKNOWN=1" >> ~/.bashrc | ||
RUN echo "source /ros_comm/devel-release/setup.sh" >> ~/.bashrc | ||
RUN echo "mkdir -p \${FIVESHM_HOME}" >> ~/.bashrc | ||
RUN echo "mkdir -p \${LOT_HOME}" >> ~/.bashrc | ||
# This line is need to workaround a roslaunch bug where multiple instances of roscore are launched | ||
RUN echo "export ROS_MASTER_URI=http://\$(uname -n):11311" >> ~/.bashrc | ||
RUN echo "nano /ros_comm/src/ros_comm/clients/benchmark/launch/launch.xml" >> ~/.bash_history | ||
|
@@ -54,7 +54,7 @@ RUN echo "python2 /ros_comm/src/ros_comm/clients/benchmark/execute.py --use_case | |
RUN --mount=type=ssh git clone [email protected]:fiveai/ros_comm.git /ros_comm/src/ros_comm && \ | ||
cd /ros_comm/src/ros_comm && \ | ||
git pull && \ | ||
git checkout fiveshm && \ | ||
git checkout lot && \ | ||
cd /ros_comm | ||
|
||
RUN /bin/bash -c "source /opt/ros/kinetic/setup.sh && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.