From 39f1a9ff655a3204dd6097d62bc41a0d8c2e9ad2 Mon Sep 17 00:00:00 2001 From: Dimitris Mouris Date: Tue, 12 Nov 2024 18:49:29 -0500 Subject: [PATCH] Update README and configs --- README.md | 9 ++++-- artifact/README.md | 30 ++++++++++++++++++- .../configs/figure-3/Mastic-m=10,n=128.toml | 2 +- .../configs/figure-3/Mastic-m=10,n=256.toml | 2 +- .../configs/figure-3/Mastic-m=10,n=64.toml | 2 +- .../configs/figure-3/Mastic-m=30,n=128.toml | 2 +- .../configs/figure-3/Mastic-m=30,n=256.toml | 2 +- .../configs/figure-3/Mastic-m=30,n=64.toml | 2 +- artifact/configs/figure-4/Mastic-m=30.toml | 4 +-- artifact/configs/figure-6/Mastic-A=1.toml | 4 +-- artifact/configs/figure-6/Mastic-A=1024.toml | 4 +-- artifact/configs/figure-6/Mastic-A=128.toml | 2 +- artifact/configs/figure-6/Prio-A=1024.toml | 4 +-- artifact/configs/figure-6/Prio-A=128.toml | 4 +-- 14 files changed, 52 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index ecac695..16196e6 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ cargo 1.74.0 Next, build from sources using: ```bash ❯❯ cargo build --release + +... +Finished `release` profile [optimized] target(s) in ...s ``` ## Running @@ -182,13 +185,13 @@ called `Result::unwrap()` on an `Err` value: Disconnected ``` which is caused by the RPC batch sizes. -To fix this reduce the batch sizes of either the reports or the FLPs (or both). -Note that this does not affect the online running time, but it affects the -upload time from the `driver` to the Mastic servers. +To fix this, reduce the batch sizes of either the reports or the FLPs (or both). ```toml add_report_share_batch_size = 1000 query_flp_batch_size = 100000 ``` +**Note:** this does not affect the online running time, but it affects the +upload time from the `driver` to the Mastic servers. ## Disclaimer diff --git a/artifact/README.md b/artifact/README.md index 7ee16d3..4d13adb 100644 --- a/artifact/README.md +++ b/artifact/README.md @@ -248,7 +248,10 @@ histogram as in the print message: `4 histogram buckets`. Each string e.g., Lastly, you can run both weighted heavy hitters and attribute based metrics with malicious clients by passing the `--malicious` and a percentage. -### Experiments + +# Experiments + +## Understanding the configuration files Our experiments can be reproduced by using our config files: https://github.com/TrustworthyComputing/mastic/tree/main/src/configs and the values provided in the paper. For instance: @@ -302,5 +305,30 @@ zipf_exponent = 1.03 etc. These parameters are sufficient to reproduce all our results -- all our experiments in the paper specify the parameters used. +## Reproducing Experiments and Figures To reproduce our experiments, use the configs from the [configs](./configs/) directory and the scripts from the [plots](../plots/) directory. + +## Troubleshooting +As mentioned in the **Troubleshooting** section of the [README file](../README.md) file, +Mastic relies on the [tarpc](https://github.com/google/tarpc) library which has +a limit on the size of the RPC messages. As such, you might see an error similar +to the following: +```shell +thread 'main' panicked at src/bin/driver.rs:335: +called `Result::unwrap()` on an `Err` value: Disconnected +``` +which is caused by the RPC batch sizes. + +In case you run into this issue, you can fix this easily by reducing the batch +sizes of either the reports or the FLPs (or both). +```toml +add_report_share_batch_size = 1000 +query_flp_batch_size = 100000 +``` +**Note:** this does not affect the online running time, but it affects the +upload time from the `driver` to the Mastic servers. In other words, this does +not change the experiments but will make setting up the experiments faster. For +this reason, most of the provided configs use the default batch sizes, which may +cause crashes with more clients or bits, but this can be simply resolved by +reducing the batch sizes. diff --git a/artifact/configs/figure-3/Mastic-m=10,n=128.toml b/artifact/configs/figure-3/Mastic-m=10,n=128.toml index 1212469..e8c0155 100644 --- a/artifact/configs/figure-3/Mastic-m=10,n=128.toml +++ b/artifact/configs/figure-3/Mastic-m=10,n=128.toml @@ -6,7 +6,7 @@ hist_buckets = 9 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 100 +add_report_share_batch_size = 50 query_flp_batch_size = 100000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-3/Mastic-m=10,n=256.toml b/artifact/configs/figure-3/Mastic-m=10,n=256.toml index 0681645..c0b0871 100644 --- a/artifact/configs/figure-3/Mastic-m=10,n=256.toml +++ b/artifact/configs/figure-3/Mastic-m=10,n=256.toml @@ -6,7 +6,7 @@ hist_buckets = 9 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 100 +add_report_share_batch_size = 50 query_flp_batch_size = 100000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-3/Mastic-m=10,n=64.toml b/artifact/configs/figure-3/Mastic-m=10,n=64.toml index 8672d58..82a1517 100644 --- a/artifact/configs/figure-3/Mastic-m=10,n=64.toml +++ b/artifact/configs/figure-3/Mastic-m=10,n=64.toml @@ -6,7 +6,7 @@ hist_buckets = 9 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 100 +add_report_share_batch_size = 50 query_flp_batch_size = 100000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-3/Mastic-m=30,n=128.toml b/artifact/configs/figure-3/Mastic-m=30,n=128.toml index 797d4a2..119c42d 100644 --- a/artifact/configs/figure-3/Mastic-m=30,n=128.toml +++ b/artifact/configs/figure-3/Mastic-m=30,n=128.toml @@ -6,7 +6,7 @@ hist_buckets = 29 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 100 +add_report_share_batch_size = 50 query_flp_batch_size = 100000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-3/Mastic-m=30,n=256.toml b/artifact/configs/figure-3/Mastic-m=30,n=256.toml index 3b7264f..651d561 100644 --- a/artifact/configs/figure-3/Mastic-m=30,n=256.toml +++ b/artifact/configs/figure-3/Mastic-m=30,n=256.toml @@ -6,7 +6,7 @@ hist_buckets = 29 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 100 +add_report_share_batch_size = 50 query_flp_batch_size = 100000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-3/Mastic-m=30,n=64.toml b/artifact/configs/figure-3/Mastic-m=30,n=64.toml index 69b799d..d86efa3 100644 --- a/artifact/configs/figure-3/Mastic-m=30,n=64.toml +++ b/artifact/configs/figure-3/Mastic-m=30,n=64.toml @@ -6,7 +6,7 @@ hist_buckets = 29 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 100 +add_report_share_batch_size = 50 query_flp_batch_size = 100000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-4/Mastic-m=30.toml b/artifact/configs/figure-4/Mastic-m=30.toml index 3b7264f..d0585b0 100644 --- a/artifact/configs/figure-4/Mastic-m=30.toml +++ b/artifact/configs/figure-4/Mastic-m=30.toml @@ -6,7 +6,7 @@ hist_buckets = 29 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 100 -query_flp_batch_size = 100000 +add_report_share_batch_size = 50 +query_flp_batch_size = 10000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-6/Mastic-A=1.toml b/artifact/configs/figure-6/Mastic-A=1.toml index 8d0271f..e2dcbfa 100644 --- a/artifact/configs/figure-6/Mastic-A=1.toml +++ b/artifact/configs/figure-6/Mastic-A=1.toml @@ -6,7 +6,7 @@ hist_buckets = 100 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 1000 -query_flp_batch_size = 100000 +add_report_share_batch_size = 500 +query_flp_batch_size = 10000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-6/Mastic-A=1024.toml b/artifact/configs/figure-6/Mastic-A=1024.toml index 430b455..11a31d4 100644 --- a/artifact/configs/figure-6/Mastic-A=1024.toml +++ b/artifact/configs/figure-6/Mastic-A=1024.toml @@ -6,7 +6,7 @@ hist_buckets = 100 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 1000 -query_flp_batch_size = 100000 +add_report_share_batch_size = 50 +query_flp_batch_size = 10000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-6/Mastic-A=128.toml b/artifact/configs/figure-6/Mastic-A=128.toml index 423e79e..a3ac111 100644 --- a/artifact/configs/figure-6/Mastic-A=128.toml +++ b/artifact/configs/figure-6/Mastic-A=128.toml @@ -6,7 +6,7 @@ hist_buckets = 100 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 1000 +add_report_share_batch_size = 100 query_flp_batch_size = 100000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-6/Prio-A=1024.toml b/artifact/configs/figure-6/Prio-A=1024.toml index 47d4ef2..6487248 100644 --- a/artifact/configs/figure-6/Prio-A=1024.toml +++ b/artifact/configs/figure-6/Prio-A=1024.toml @@ -5,7 +5,7 @@ hist_buckets = 102400 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 1000 -query_flp_batch_size = 100000 +add_report_share_batch_size = 5 +query_flp_batch_size = 10000 zipf_unique_buckets = 1000 zipf_exponent = 1.03 diff --git a/artifact/configs/figure-6/Prio-A=128.toml b/artifact/configs/figure-6/Prio-A=128.toml index e650033..51cf2ad 100644 --- a/artifact/configs/figure-6/Prio-A=128.toml +++ b/artifact/configs/figure-6/Prio-A=128.toml @@ -5,7 +5,7 @@ hist_buckets = 12800 server_0 = "0.0.0.0:8000" server_1 = "0.0.0.0:8001" -add_report_share_batch_size = 1000 -query_flp_batch_size = 100000 +add_report_share_batch_size = 10 +query_flp_batch_size = 10000 zipf_unique_buckets = 1000 zipf_exponent = 1.03