You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Follow the official [Install Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/) guide.
234
-
- To run Docker commands as a non-root user, add your user to the `docker` group:
235
-
```bash
236
-
sudo usermod -aG docker $USER
237
-
```
238
-
Then log out and log back in, or run `newgrp docker` to update the group membership.
239
-
240
-
Pull the published GitHub Packages image [`ghcr.io/hal-lab-u-tokyo/ros2-perf-multihost:latest`](https://github.com/hal-lab-u-tokyo/ros2-perf-multihost/pkgs/container/ros2-perf-multihost).
For details on the Docker image, see [docker/README.md](./docker/README.md).
247
-
248
-
#### [Optional] Native ROS 2 Environment
249
-
250
-
If you want to evaluate native execution mode as well, install ROS 2 and build the package.
251
-
252
-
Follow the official [ROS 2 Jazzy Installation steps](https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html).
253
-
Other ROS 2 distributions may also work, but they are not officially tested yet.
254
-
255
-
To benchmark with non-default RMW implementations, install the corresponding packages:
256
-
257
-
```bash
258
-
# For CycloneDDS (rmw_cyclonedds_cpp)
259
-
sudo apt install -y ros-jazzy-rmw-cyclonedds-cpp
260
-
261
-
# For Zenoh (rmw_zenoh_cpp)
262
-
sudo apt install -y ros-jazzy-rmw-zenoh-cpp
263
-
```
264
-
265
-
Then, build the ROS 2 package used by this framework in `ros2_node_impl_ws/` (see [ros2_node_impl_ws/README.md](./ros2_node_impl_ws/README.md) for details on ROS 2 node features).
Install the following packages on each target Host:
282
-
283
-
```bash
284
-
sudo apt update
285
-
sudo apt install -y python3-flask python3-psutil
286
-
```
176
+
One-time setup steps are maintained in a dedicated document.
177
+
For Manager/Host requirements, SSH setup, Docker and ROS 2 preparation, and chrony configuration, see:
287
178
288
-
Note that the `python3-requests` package is required on the Manager machine.
289
-
Therefore, install the following package on the Manager (not on each Host):
179
+
-[SETUP.md](./SETUP.md)
290
180
291
-
```bash
292
-
sudo apt update
293
-
sudo apt install -y python3-requests
294
-
```
295
-
296
-
#### Clock synchronization for REST benchmark (chrony)
297
-
298
-
For remote benchmark reproducibility, the REST server uses [chrony](https://chrony-project.org/) to synchronize the clock between Hosts.
299
-
300
-
Install and enable chrony as follows:
301
-
302
-
```bash
303
-
sudo apt install -y chrony
304
-
sudo systemctl enable --now chrony
305
-
```
306
-
307
-
Because the REST server invokes `sudo -n chronyc` (non-interactive), the `ubuntu` user must be allowed to run `chronyc` via `sudo` without a password.
308
-
The sudoers entry below grants passwordless `sudo` only for `/usr/bin/chronyc`, so no other commands are affected.
309
-
310
-
Check the permission, and if needed, configure the sudoers entry on each Host as follows:
311
-
312
-
```bash
313
-
# Check the permission required by rest_server.py (makestep)
314
-
sudo -k
315
-
sudo -n chronyc -a makestep
316
-
317
-
# If this command fails because a password is required, configure the sudoers entry as follows.
318
-
cat <<'EOF' | sudo tee /etc/sudoers.d/ros2-perf-chrony
319
-
ubuntu ALL=(root) NOPASSWD:/usr/bin/chronyc
320
-
EOF
321
-
sudo chmod 440 /etc/sudoers.d/ros2-perf-chrony
322
-
```
323
-
324
-
If startup sync fails because `sudo` for `chronyc` requires a password, `rest_server.py` exits and prints guidance with the setup URL.
325
-
For other startup sync failures (for example, temporary NTP reachability issues), the server continues startup by default and reports the error in logs. To fail fast on any startup sync failure, set `ROS2_PERF_CHRONY_FAIL_FAST_ON_STARTUP=1`.
326
-
327
-
For details on synchronization behavior and environment variables, see [remote_hosts_scripts/README.md](./remote_hosts_scripts/README.md#clock-synchronization-chrony).
328
181
329
182
## Usage in Details
330
183
@@ -459,6 +312,28 @@ If the server exits at startup with a chrony sudo permission error, check the ch
459
312
460
313
For details on the specification of REST server and environment variables, see [remote_hosts_scripts/README.md](./remote_hosts_scripts/README.md#rest_serverpy).
461
314
315
+
#### Evaluate Clock Skew Before Benchmark (Recommended)
316
+
317
+
When you need stricter one-way latency interpretation, evaluate inter-host clock skew before running trials.
318
+
319
+
Stricter REST-based check (recommended for REST benchmark runs):
320
+
321
+
Prerequisite: start `remote_hosts_scripts/rest_server.py` on each target Host first. If REST is not running/reachable, clock probe requests fail (timeout/connection error) and that Host is recorded as `error`.
##### Alternative method (manual startup on each Host):
463
338
464
339
If you prefer to control startup host by host (for example, when debugging a specific Host or when centralized SSH fan-out is not available), you can start `rest_server.py` manually on each target Host.
-[remote_hosts_scripts/README.md](./remote_hosts_scripts/README.md): REST server endpoints, QoS case forwarding, environment variables, and monitor CSV format.
@@ -626,6 +505,7 @@ Common issues and fixes:
626
505
-`python3 manager_scripts/generate_exec_scripts.py ...` fails because output exists: rerun with `--force` or remove the existing topology directory under `performance_ws/`.
627
506
-`distribute_exec_scripts.sh` fails with SSH/SCP errors: verify hostnames, SSH keys, and that repository paths are identical across Hosts.
628
507
- REST benchmark does not start remote execution: ensure REST servers are running on every target Host (for example, run `./manager_scripts/manage_rest_servers.sh start <topology>` from the Manager before calling `performance_test.py`).
508
+
- Clock skew should be measured more strictly before latency trials: run `python3 manager_scripts/system_perf/check_clock_skew_rest.py --hosts host1,host2,host3 --samples 30 --interval 0.05` and review `performance_ws/system_perf/clock_skew/<timestamp>/{summary,pairwise}.csv`.
629
509
- Docker mode fails on remote Hosts: pull `ghcr.io/hal-lab-u-tokyo/ros2-perf-multihost:latest` and confirm Docker permissions on each Host.
630
510
- Native mode cannot find workspace paths: set `ROS2_PERF_WS` to the project root before running `<host_name>_exec_native.sh`.
631
511
- Expected CSV outputs are missing: check `<ws-dir>/<topology>/results/latest-<rmw>/raw_logs/trial<N>/` for trial logs and analyzer error output from the CSV-generation step; `coordination_logs/` only covers the REST prepare/start phases.
0 commit comments