From 462edd6cdfc0d0bd7f4205afb37c7e42d69a6b18 Mon Sep 17 00:00:00 2001 From: alrevuelta Date: Wed, 11 Oct 2023 13:04:40 +0200 Subject: [PATCH] mods --- rln-delay-simulations/README.md | 65 +++++++++++++++++++------------ rln-delay-simulations/shadow.yaml | 4 +- rln-delay-simulations/test.txr | 0 3 files changed, 43 insertions(+), 26 deletions(-) delete mode 100644 rln-delay-simulations/test.txr diff --git a/rln-delay-simulations/README.md b/rln-delay-simulations/README.md index 5f27037..100d37f 100644 --- a/rln-delay-simulations/README.md +++ b/rln-delay-simulations/README.md @@ -6,7 +6,8 @@ This folder contains a `shadow` configuration to simulate `1000` `nwaku` nodes i * `rln` is used with hardcoded memberships, to avoid the sepolia node + contract, [see](https://raw.githubusercontent.com/waku-org/nwaku/master/waku/waku_rln_relay/constants.nim). * Focused on measuring message propagation delays. Each message that is sent, encodes the timestamp when it was created. * Same setup can be reused with different parameters, configured either via flags (see `shadow.yaml`) or modifying the code (see [simulations](https://github.com/waku-org/nwaku/tree/simulations)). -* TODO delay + bandwidth TODO add payload messages. +* Requires significant resources to run (tested with 256 GB RAM) +* Uses `100ms` of latency and `10Mbit` connection per node. ## How to run @@ -29,24 +30,50 @@ First check that the simulation finished ok. Check that the numbers match. grep -nr 'ended_simulation' shadow.data | wc -l # expected: 1000 (simulation finished ok in all nodes) -grep -nr '\[TX MSG\]*' shadow.data | wc -l +grep -nr 'tx_msg' shadow.data | wc -l # expected: 15 (total of published messages) ``` - - -* no errors in any stderr: eg: shadow.data/hosts/peer1/wakunode2.1000.stderr -* see msg published: grep -nr '\[TX MSG\]*' shadow.data | wc -l -* grep -nr '\[RX MSG\]*' shadow.data | wc -l - - -calculate metrics: - -latency +Print metrics: +``` +grep -nr 'rx_msg' shadow.data > latency.txt +grep -nr 'mesh_size' shadow.data > mesh_size.txt ``` -grep -nr '\[RX MSG\]*' shadow.data > latency.txt -python metrics.py latency.txt "diff: " " milliseconds" +``` +python analyze.py latency.txt "arrival_diff=" +python analyze.py mesh_size.txt "mesh_size=" + +no msg payload is added +Config: file: latency.txt field: arrival_diff= +number_samples=14985 +Percentiles. P75=401.0 P95=502.0 +Statistics. mode_value=400 mode_count=1521 mean=320.76176176176176 max=701 min=100 + +this is wrong. was generating the random bytes inside the timer. +Config: file: latency.txt field: arrival_diff= +number_samples=14985 +Percentiles. P75=456.0 P95=583.7999999999993 +Statistics. mode_value=412 mode_count=84 mean=365.7955288621955 max=873 min=100 + +run 1 +Config: file: latency.txt field: arrival_diff= +number_samples=14985 +Percentiles. P75=451.0 P95=578.0 +Statistics. mode_value=318 mode_count=84 mean=362.09422756089424 max=778 min=100 + +Config: file: latency.txt field: arrival_diff= +number_samples=14985 +Percentiles. P75=452.0 P95=587.0 +Statistics. mode_value=313 mode_count=77 mean=360.5741741741742 max=868 min=100 + +run 2 same data. + +``` + + + +# TODO: remove Amount of samples: 14985 percentile 75: 300.0 percentile 25: 201.0 @@ -88,16 +115,6 @@ worst: 5 best: 2 ``` -``` -TODO -``` - -Output - -``` -TODO -``` - ``` Amount of samples: 14985 diff --git a/rln-delay-simulations/shadow.yaml b/rln-delay-simulations/shadow.yaml index 1e9eaa8..b4bf19f 100644 --- a/rln-delay-simulations/shadow.yaml +++ b/rln-delay-simulations/shadow.yaml @@ -14,8 +14,8 @@ network: graph [ node [ id 0 - host_bandwidth_up "100 Mbit" - host_bandwidth_down "100 Mbit" + host_bandwidth_up "10 Mbit" + host_bandwidth_down "10 Mbit" ] edge [ source 0 diff --git a/rln-delay-simulations/test.txr b/rln-delay-simulations/test.txr deleted file mode 100644 index e69de29..0000000