diff --git a/.gitignore b/.gitignore index c63095b..365026a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ results.csv rebar3.crashdump results-* dets/ +*.csv diff --git a/Makefile b/Makefile index 97bcafe..e55b4a4 100644 --- a/Makefile +++ b/Makefile @@ -78,32 +78,74 @@ echo-bench: pkill -9 beam.smp; pkill -9 epmd; exit 0 BENCH_CONFIG=echo.config $(REBAR) ct --suite=throughput_SUITE --group=partisan_with_parallelism --case=bench_test --readable=false -v -fsm-perf: release +kvs-latency: release pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=disterl pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_channels - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_parallelism - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_monotonic_channels - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_partitioned_parallelism - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_partitioned_parallelism_and_channels pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_partitioned_parallelism_and_channels_and_monotonic_channels +fsm-perf: release + pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=disterl + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_channels + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_parallelism + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_monotonic_channels + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_partitioned_parallelism + pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_partitioned_parallelism_and_channels + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=fsm_performance_test --group=partisan_with_partitioned_parallelism_and_channels_and_monotonic_channels + echo-perf: release pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=disterl - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_channels - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_monotonic_channels - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_parallelism - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_partitioned_parallelism - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_partitioned_parallelism_and_channels - pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_partitioned_parallelism_and_channels_and_monotonic_channels + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_channels + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_monotonic_channels + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_parallelism + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_partitioned_parallelism + pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_partitioned_parallelism_and_channels + # pkill -9 beam.smp; pkill -9 epmd; SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=echo_performance_test --group=partisan_with_partitioned_parallelism_and_channels_and_monotonic_channels partisan-perf: release pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=disterl pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan - pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_channels + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_channels pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_parallelism - pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels + +microbenchmarks: release + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=disterl + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_channels + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_parallelism + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels + +microbenchmarks-highlatency: release + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=disterl + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_channels + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_parallelism + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels + +microbenchmarks-largepayload: release + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=disterl + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_channels + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_parallelism + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels + +microbenchmarks-queueoverhead: release + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=disterl + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_channels + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_parallelism + # pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=8 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=16 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=32 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels + pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=64 ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels pkill -9 beam.smp; pkill -9 epmd; PARTISAN_INIT=true SIZE=${SIZE} LATENCY=${LATENCY} CONCURRENCY=${CONCURRENCY} PARALLELISM=${CONCURRENCY} ${REBAR} ct --readable=false -v --suite=throughput_SUITE --case=partisan_performance_test --group=partisan_with_partitioned_parallelism_and_channels profile: release diff --git a/README.md b/README.md new file mode 100644 index 0000000..4536686 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# ATC'19 Results for Partisan + +Here you can find the test harness used for generating all of our results. +Obviously, your results will differ from ours if you do not use the same +experimental configuration as we do. + +Preliminary results are available [here.](http://partisan.cloud) + +This repository includes a microbenchmark suite for Partisan itself, and a +port of Riak Core (from Basho) ported to Partisan for running experiments +with a simulated key-value store using three vnodes, and a echo service using +a single vnode. + +Our port of Riak Core is available [here](https://github.com/lasp-lang/riak_core/tree/partisan-support-r21) with a compatibility library available [here](https://github.com/lasp-lang/riak_core_partisan_utils). + +## Data Collection Targets + +* `bin/microbenchmarks.sh`: Run the microbenchmark suite, Figure 1. + +* `bin/microbenchmarks-queueoverhead.sh`: Run the microbenchmark suite for identifying queue overhead introduced by additional connections/queues, Figure 2. + +* `bin/microbenchmarks-highlatency.sh`: Run the high-latency microbenchmark suite, Figure 3. + +* `bin/microbenchmarks-largepayload.sh`: Run the large-payload microbenchmark suite, Figure 4. + +* `bin/throughput-echo.sh`: Run the Echo workload, Figures 5 & 6. + +* `bin/throughput-kvs.sh`: Run the KVS workload, Figures 7 & 8. + +## Plots + +Available in the ```Rscripts``` folder are a number of scripts used to generate the plots included in our final paper. \ No newline at end of file diff --git a/README.rst b/README.rst deleted file mode 100644 index c0fb6d5..0000000 --- a/README.rst +++ /dev/null @@ -1,121 +0,0 @@ -unir -=========== - -A riak_core application - -Build ------ - -:: - - rebar3 release - -Test ----- - -:: - - rebar3 ct - -Run ---- - -:: - - rebar3 run - -Try ---- - -:: - - 1> unir:ping(). - {pong,753586781748746817198774991869333432010090217472} - -Quit ----- - -:: - - 2> q(). - -Play with Clustering --------------------- - -Build 3 releases that can run on the same machine:: - - make devrel - -Start them in different consoles:: - - make dev1-console - make dev2-console - make dev3-console - -join 2 nodes to the first one:: - - make devrel-join - -check the status of the cluster:: - - make devrel-status - -you should see something like this:: - - ================================= Membership ================================== - Status Ring Pending Node - ------------------------------------------------------------------------------- - joining 0.0% -- 'unir2@127.0.0.1' - joining 0.0% -- 'unir3@127.0.0.1' - valid 100.0% -- 'unir1@127.0.0.1' - ------------------------------------------------------------------------------- - Valid:1 / Leaving:0 / Exiting:0 / Joining:2 / Down:0 - -it should say that 3 nodes are joining, now check the cluster plan:: - - make devrel-cluster-plan - -it should display the cluster plan, now we can commit the plan:: - - make devrel-cluster-commit - -check the status of the cluster again:: - - make devrel-status - -you could see the vnodes transfering:: - - ================================= Membership ================================== - Status Ring Pending Node - ------------------------------------------------------------------------------- - valid 75.0% 25.0% 'unir1@127.0.0.1' - valid 9.4% 25.0% 'unir2@127.0.0.1' - valid 7.8% 25.0% 'unir3@127.0.0.1' - ------------------------------------------------------------------------------- - Valid:3 / Leaving:0 / Exiting:0 / Joining:0 / Down:0 - -at some point you should see something like this:: - - ================================= Membership ================================== - Status Ring Pending Node - ------------------------------------------------------------------------------- - valid 33.3% -- 'unir1@127.0.0.1' - valid 33.3% -- 'unir2@127.0.0.1' - valid 33.3% -- 'unir3@127.0.0.1' - ------------------------------------------------------------------------------- - Valid:3 / Leaving:0 / Exiting:0 / Joining:0 / Down:0 - -when you are bored you can stop them:: - - make devrel-stop - - -TODO ----- - -* define license and create LICENSE file - -License -------- - -TODO \ No newline at end of file diff --git a/Rscripts/echo-latency.R b/Rscripts/echo-latency.R deleted file mode 100644 index 4fc908f..0000000 --- a/Rscripts/echo-latency.R +++ /dev/null @@ -1,35 +0,0 @@ -# library -library(ggplot2) - -# Read in the input information -data <- read.csv(file="C:\\Users\\chris\\OneDrive\\Desktop\\Results\\partisan-bench.csv", - head=FALSE, sep=",") - -# Rename the columns -colnames(data)[1] <- "Backend" -colnames(data)[2] <- "Concurrency" -colnames(data)[3] <- "Connections" -colnames(data)[4] <- "Size" -colnames(data)[5] <- "NumMessages" -colnames(data)[6] <- "Latency" -colnames(data)[7] <- "Time" - -data[8] <- paste(data$Backend, data$Latency, "ms", "RTT latency") -colnames(data)[8] <- "Configuration" - -# Select optimal Partisan configuration and base Disterl configuration -df = data[data$Size == 8388608 & data$Latency != 100 & - ( - (data$Backend == "disterl" & data$Connections == 1) | - (data$Backend == "partisan" & - (data$Concurrency == data$Connections))),] - -# Plot performance -ggplot(aes(y = (Time / 1000 / 1000), x = Concurrency, colour = Configuration), data = df, stat="identity") + - geom_point(aes(shape=Configuration)) + - geom_line(aes(linetype=Backend)) + - xlab("Concurrent Processes") + - ylab("Time (ms)") + - theme(legend.justification = c(1, 1), legend.position = c(0.3, 0.9)) + - theme(axis.text.x = element_text(angle = 0, hjust = 1)) + - ggtitle("echo request/reply with 8MB object") \ No newline at end of file diff --git a/Rscripts/graph.R b/Rscripts/graph.R deleted file mode 100644 index 4ab3c6f..0000000 --- a/Rscripts/graph.R +++ /dev/null @@ -1,32 +0,0 @@ -# library -library(ggplot2) - -# Read in the input information -data <- read.csv(file="C:\\Users\\chris\\OneDrive\\Desktop\\Results\\partisan-bench.csv", - head=FALSE, sep=",") - -# Rename the columns -colnames(data)[1] <- "Backend" -colnames(data)[2] <- "Concurrency" -colnames(data)[3] <- "Connections" -colnames(data)[4] <- "Size" -colnames(data)[5] <- "NumMessages" -colnames(data)[6] <- "Latency" -colnames(data)[7] <- "Time" - -# Select optimal Partisan configuration and base Disterl configuration -df = data[data$Size == 8388608 & data$Latency == 1 & - ( - (data$Backend == "disterl" & data$Connections == 1) | - (data$Backend == "partisan" & - (data$Concurrency == data$Connections))),] - -# Plot performance -ggplot(aes(y = (Time / 1000 / 1000), x = Concurrency, colour = Backend), data = df, stat="identity") + - geom_point(aes(shape=Backend)) + - geom_line(aes(linetype=Backend)) + - xlab("Concurrent Processes") + - ylab("Time (ms)") + - theme(legend.justification = c(1, 1), legend.position = c(1, 0.2)) + - theme(axis.text.x = element_text(angle = 0, hjust = 1)) + - ggtitle("echo request/reply with 8MB object and 1ms RTT latency") \ No newline at end of file diff --git a/Rscripts/microbenchmarks-highlatency.R b/Rscripts/microbenchmarks-highlatency.R new file mode 100644 index 0000000..3d72fa7 --- /dev/null +++ b/Rscripts/microbenchmarks-highlatency.R @@ -0,0 +1,66 @@ +library(ggplot2) +library(tidyverse) +library(scales) +library(shades) +library(socviz) + +# df <- read.csv("C:\\Users\\cmeiklej\\source\\repos\\unir-2019-03-28\\microbenchmarks.csv", header = FALSE) +# df <- read.csv("C:\\Users\\cmeiklej\\OneDrive\\Desktop\\usenix-2019-camera-ready-results\\microbenchmarks.csv", header = FALSE) +# df <- read.csv("C:\\Users\\chris\\Documents\\GitHub\\unir\\results-3.csv", header = FALSE) +df <- read.csv("../microbenchmarks-highlatency.csv", header = FALSE) +colnames(df) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") +df <- transform(df, Time = round(as.numeric(Time) / 1000, digits = 2)) + +df1 <- subset(df, ( + # disterl 1 1 false + (Transport == "disterl" & Channels == 1 & Parallelism == 1 & Affinity == "false") | + + # partisan 1 1 false + (Transport == "partisan" & Channels == 1 & Parallelism == 1 & Affinity == "false") | + + # partisan 1 16 false + (Transport == "partisan" & Channels == 1 & Parallelism == 16 & Affinity == "false") | + + # partisan 1 16 true + (Transport == "partisan" & Channels == 1 & Parallelism == 16 & Affinity == "true") | + + # partisan 4 1 false + (Transport == "partisan" & Channels == 4 & Parallelism == 1 & Affinity == "false") | + + # partisan 4 16 true + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") +) +& (Size == 524288 & Latency == "20" & is.element(Concurrency, c(16, 32, 64, 128)))) +df1$Concurrency <- factor(df1$Concurrency) +df1$Experiment <- paste("", + ifelse(df1$Affinity == "true" & df1$Transport == "partisan" & df1$Channels == 4 & df1$Parallelism == 16, "partisan parallel affinitized (N = 16)", + ifelse(df1$Affinity == "true" & df1$Transport == "partisan" & df1$Channels == 1 & df1$Parallelism == 16, "partisan parallel affinitized (N = 16)", + ifelse(df1$Affinity == "false" & df1$Channels == 1 & df1$Transport == "partisan" & df1$Parallelism == 1, "partisan (N = 1)", + ifelse(df1$Affinity == "false" & df1$Channels == 4 & df1$Transport == "partisan" & df1$Parallelism == 1, "partisan w/ channels (N = 1)", + ifelse(df1$Affinity == "false" & df1$Transport == "partisan" & df1$Channels == 1 & df1$Parallelism == 16, "partisan parallel (N = 16)", + "disterl")))))) + + +ggplot(data = df1, aes(x = Concurrency, y = Time, fill = Experiment)) + + geom_jitter(alpha=0.1, position = position_jitterdodge(jitter.width = 0.1), aes(color = Experiment)) + + geom_boxplot(outlier.shape = NA, notch = TRUE) + + # geom_boxplot() + + # theme_grey(base_size = 14) + + ylab("Milliseconds / RT Request") + + xlab("# of Actors") + + #scale_y_continuous(trans='log2') + + #annotation_logticks(base = 2, sides = "l") + + ggtitle("512KB Payload, 20ms RTT Latency") + + theme_classic() + + theme(legend.position = c(0.27, 0.86), + panel.grid.major.y = element_line(size = 0.25, linetype = 'solid', colour = "grey60"), + panel.grid.minor.y = element_line(size = 0.1, linetype = 'solid', colour = "grey80"), + # legend.background = element_rect(color = "black", fill = "grey90", size = 1, linetype = "solid"), + plot.title=element_text(size=18), + axis.text=element_text(size=16), + axis.title=element_text(size=18), + legend.title=element_text(size=16, face="bold"), + legend.text=element_text(size=16) + ) + +ggsave("../Microbenchmarks-HighLatency-Final-linear.png", dpi = 400) diff --git a/Rscripts/microbenchmarks-largepayload.R b/Rscripts/microbenchmarks-largepayload.R new file mode 100644 index 0000000..6dd354a --- /dev/null +++ b/Rscripts/microbenchmarks-largepayload.R @@ -0,0 +1,66 @@ +library(ggplot2) +library(tidyverse) +library(scales) +library(shades) +library(socviz) + +# df <- read.csv("C:\\Users\\cmeiklej\\source\\repos\\unir-2019-03-28\\microbenchmarks.csv", header = FALSE) +# df <- read.csv("C:\\Users\\cmeiklej\\OneDrive\\Desktop\\usenix-2019-camera-ready-results\\microbenchmarks.csv", header = FALSE) +# df <- read.csv("C:\\Users\\chris\\Documents\\GitHub\\unir\\results-3.csv", header = FALSE) +df <- read.csv("../microbenchmarks-largepayload.csv", header = FALSE) +colnames(df) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") +df <- transform(df, Time = round(as.numeric(Time) / 1000, digits = 2)) + +df1 <- subset(df, ( + # disterl 1 1 false + (Transport == "disterl" & Channels == 1 & Parallelism == 1 & Affinity == "false") | + + # partisan 1 1 false + (Transport == "partisan" & Channels == 1 & Parallelism == 1 & Affinity == "false") | + + # partisan 1 16 false + (Transport == "partisan" & Channels == 1 & Parallelism == 16 & Affinity == "false") | + + # partisan 1 16 true + (Transport == "partisan" & Channels == 1 & Parallelism == 16 & Affinity == "true") | + + # partisan 4 1 false + (Transport == "partisan" & Channels == 4 & Parallelism == 1 & Affinity == "false") | + + # partisan 4 16 true + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") +) +& (Size == 8388608 & Latency == "1" & is.element(Concurrency, c(16, 32, 64, 128)))) +df1$Concurrency <- factor(df1$Concurrency) +df1$Experiment <- paste("", + ifelse(df1$Affinity == "true" & df1$Transport == "partisan" & df1$Channels == 4 & df1$Parallelism == 16, "partisan parallel affinitized (N = 16)", + ifelse(df1$Affinity == "true" & df1$Transport == "partisan" & df1$Channels == 1 & df1$Parallelism == 16, "partisan parallel affinitized (N = 16)", + ifelse(df1$Affinity == "false" & df1$Channels == 1 & df1$Transport == "partisan" & df1$Parallelism == 1, "partisan (N = 1)", + ifelse(df1$Affinity == "false" & df1$Channels == 4 & df1$Transport == "partisan" & df1$Parallelism == 1, "partisan w/ channels (N = 1)", + ifelse(df1$Affinity == "false" & df1$Transport == "partisan" & df1$Channels == 1 & df1$Parallelism == 16, "partisan parallel (N = 16)", + "disterl")))))) + +ggplot(data = df1, aes(x = Concurrency, y = Time, fill = Experiment)) + + geom_jitter(alpha=0.1, position = position_jitterdodge(jitter.width = 0.1), aes(color = Experiment)) + + geom_boxplot(outlier.shape = NA, notch = TRUE) + + # geom_boxplot() + + # theme_grey(base_size = 14) + + ylab("Milliseconds / RT Request") + + xlab("# of Actors") + + #scale_y_continuous(trans='log2') + + #annotation_logticks(base = 2, sides = "l") + + ggtitle("8MB Payload, 1ms RTT Latency") + + theme_classic() + + theme(legend.position = c(0.27, 0.86), + panel.grid.major.y = element_line(size = 0.25, linetype = 'solid', colour = "grey60"), + panel.grid.minor.y = element_line(size = 0.1, linetype = 'solid', colour = "grey80"), + # legend.background = element_rect(color = "black", fill = "grey90", size = 1, linetype = "solid"), + plot.title=element_text(size=18), + axis.text=element_text(size=16), + axis.title=element_text(size=18), + legend.title=element_text(size=16, face="bold"), + legend.text=element_text(size=16) + ) + + +ggsave("../Microbenchmarks-LargePayload-Final-linear.png", dpi = 400) diff --git a/Rscripts/microbenchmarks-queueoverhead.R b/Rscripts/microbenchmarks-queueoverhead.R new file mode 100644 index 0000000..27b0fea --- /dev/null +++ b/Rscripts/microbenchmarks-queueoverhead.R @@ -0,0 +1,46 @@ +library(ggplot2) +library(tidyverse) +library(scales) +library(shades) +library(socviz) + +df <- read.csv("../microbenchmarks-queueoverhead.csv", header = FALSE) +colnames(df) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") +df <- transform(df, Time = round(as.numeric(Time) / 1000), digits = 2) + +df1 <- subset(df, ( + # (Transport == "disterl" & Channels == 1 & Parallelism == 1 & Affinity == "false") | + # (Transport == "partisan" & Channels == 1 & Parallelism == Concurrency & Affinity == "false") | + # (Transport == "partisan" & Channels == 1 & Parallelism == 1 & Affinity == "false") | + (Transport == "partisan" & Channels == 4 & Affinity == "true") + # (Transport == "partisan" & Channels == 4 & Parallelism == Concurrency & Affinity == "true") +) +& (Size == 524288 & Latency == "1" & is.element(Concurrency, c(128)))) +df1$Concurrency <- factor(df1$Concurrency) +df1$Experiment <- paste("partisan parallel affinitized") + +#sample_n(df1, 96000) + +ggplot(data = df1, aes(x = factor(Parallelism), y = Time, fill = Experiment)) + + geom_jitter(alpha=0.15, position = position_jitterdodge(jitter.width = 0.25)) + + # geom_boxplot() + + # theme_grey(base_size = 14) + + ylab("Milliseconds / RT Request") + + xlab("# of Actors") + + #scale_y_continuous(trans='log2') + + #annotation_logticks(base = 2, sides = "l") + + ggtitle("512KB Payload, 1ms RTT Latency, 128 Actors") + + theme_classic() + + theme(legend.position = c(0.27, 0.86), + panel.grid.major.y = element_line(size = 0.25, linetype = 'solid', colour = "grey60"), + panel.grid.minor.y = element_line(size = 0.1, linetype = 'solid', colour = "grey80"), + # legend.background = element_rect(color = "black", fill = "grey90", size = 1, linetype = "solid"), + plot.title=element_text(size=18), + axis.text=element_text(size=16), + axis.title=element_text(size=18), + legend.title=element_text(size=16, face="bold"), + legend.text=element_text(size=16) + ) + + +ggsave("../Microbenchmarks-QueueOverhead-black.png", dpi = 400) diff --git a/Rscripts/microbenchmarks.R b/Rscripts/microbenchmarks.R new file mode 100644 index 0000000..ac4c32e --- /dev/null +++ b/Rscripts/microbenchmarks.R @@ -0,0 +1,75 @@ +library(ggplot2) +library(tidyverse) +library(scales) +library(shades) +library(socviz) + +# df <- read.csv("C:\\Users\\cmeiklej\\source\\repos\\unir-2019-03-28\\microbenchmarks.csv", header = FALSE) +# df <- read.csv("C:\\Users\\cmeiklej\\OneDrive\\Desktop\\usenix-2019-camera-ready-results\\microbenchmarks.csv", header = FALSE) +# df <- read.csv("C:\\Users\\chris\\Documents\\GitHub\\unir\\results-3.csv", header = FALSE) +df <- read.csv("../microbenchmarks.csv", header = FALSE) +colnames(df) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") +df <- transform(df, Time = round(as.numeric(Time) / 1000, digits = 2)) + +df1 <- subset(df, ( + # disterl 1 1 false + (Transport == "disterl" & Channels == 1 & Parallelism == 1 & Affinity == "false") | + + # partisan 1 1 false + (Transport == "partisan" & Channels == 1 & Parallelism == 1 & Affinity == "false") | + + # partisan 1 16 false + (Transport == "partisan" & Channels == 1 & Parallelism == 16 & Affinity == "false") | + + # partisan 1 16 true + (Transport == "partisan" & Channels == 1 & Parallelism == 16 & Affinity == "true") | + + # partisan 4 1 false + (Transport == "partisan" & Channels == 4 & Parallelism == 1 & Affinity == "false") | + + # partisan 4 16 true + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") +) +& (Size == 524288 & Latency == "1" & is.element(Concurrency, c(16, 32, 64, 128)))) +df1$Concurrency <- factor(df1$Concurrency) +df1$Experiment <- paste("", + ifelse(df1$Affinity == "true" & df1$Transport == "partisan" & df1$Channels == 4 & df1$Parallelism == 16, "partisan parallel affinitized (N = 16)", + ifelse(df1$Affinity == "true" & df1$Transport == "partisan" & df1$Channels == 1 & df1$Parallelism == 16, "partisan parallel affinitized (N = 16)", + ifelse(df1$Affinity == "false" & df1$Channels == 1 & df1$Transport == "partisan" & df1$Parallelism == 1, "partisan (N = 1)", + ifelse(df1$Affinity == "false" & df1$Channels == 4 & df1$Transport == "partisan" & df1$Parallelism == 1, "partisan w/ channels (N = 1)", + ifelse(df1$Affinity == "false" & df1$Transport == "partisan" & df1$Channels == 1 & df1$Parallelism == 16, "partisan parallel (N = 16)", + "disterl")))))) + +lighten <- function(color, factor=1.4){ + col <- col2rgb(color) + col <- col*factor + col <- rgb(t(col), maxColorValue=255) + col +} + +#sample_n(df1, 96000) + +ggplot(data = df1, aes(x = Concurrency, y = Time, fill = Experiment)) + + geom_jitter(alpha=0.1, position = position_jitterdodge(jitter.width = 0.1), aes(color = Experiment)) + + geom_boxplot(outlier.shape = NA, notch = TRUE) + + # geom_boxplot() + + # theme_grey(base_size = 14) + + ylab("Milliseconds / RT Request") + + xlab("# of Actors") + + #scale_y_continuous(trans='log2') + + #annotation_logticks(base = 2, sides = "l") + + ggtitle("512KB Payload, 1ms RTT Latency") + + theme_classic() + + theme(legend.position = c(0.27, 0.86), + panel.grid.major.y = element_line(size = 0.25, linetype = 'solid', colour = "grey60"), + panel.grid.minor.y = element_line(size = 0.1, linetype = 'solid', colour = "grey80"), + # legend.background = element_rect(color = "black", fill = "grey90", size = 1, linetype = "solid"), + plot.title=element_text(size=18), + axis.text=element_text(size=16), + axis.title=element_text(size=18), + legend.title=element_text(size=16, face="bold"), + legend.text=element_text(size=16) + ) + #coord_trans(y='log2') + +ggsave("../Microbenchmarks-Final-linear.png", dpi = 400) \ No newline at end of file diff --git a/Rscripts/partisan-bench-8mb-1ms.R b/Rscripts/partisan-bench-8mb-1ms.R deleted file mode 100644 index 4ab3c6f..0000000 --- a/Rscripts/partisan-bench-8mb-1ms.R +++ /dev/null @@ -1,32 +0,0 @@ -# library -library(ggplot2) - -# Read in the input information -data <- read.csv(file="C:\\Users\\chris\\OneDrive\\Desktop\\Results\\partisan-bench.csv", - head=FALSE, sep=",") - -# Rename the columns -colnames(data)[1] <- "Backend" -colnames(data)[2] <- "Concurrency" -colnames(data)[3] <- "Connections" -colnames(data)[4] <- "Size" -colnames(data)[5] <- "NumMessages" -colnames(data)[6] <- "Latency" -colnames(data)[7] <- "Time" - -# Select optimal Partisan configuration and base Disterl configuration -df = data[data$Size == 8388608 & data$Latency == 1 & - ( - (data$Backend == "disterl" & data$Connections == 1) | - (data$Backend == "partisan" & - (data$Concurrency == data$Connections))),] - -# Plot performance -ggplot(aes(y = (Time / 1000 / 1000), x = Concurrency, colour = Backend), data = df, stat="identity") + - geom_point(aes(shape=Backend)) + - geom_line(aes(linetype=Backend)) + - xlab("Concurrent Processes") + - ylab("Time (ms)") + - theme(legend.justification = c(1, 1), legend.position = c(1, 0.2)) + - theme(axis.text.x = element_text(angle = 0, hjust = 1)) + - ggtitle("echo request/reply with 8MB object and 1ms RTT latency") \ No newline at end of file diff --git a/Rscripts/throughput-echo-1ms.R b/Rscripts/throughput-echo-1ms.R new file mode 100644 index 0000000..b08fc75 --- /dev/null +++ b/Rscripts/throughput-echo-1ms.R @@ -0,0 +1,72 @@ +library(ggplot2) +library(scales) + +# Echo 1ms + +df <- read.csv("../throughput-echo-1-1ms.csv", header = FALSE) +colnames(df) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") +df <- transform(df, Time = as.numeric(Time) / 1000) + +df1 <- subset(df, ( + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") | + (Transport == "disterl" & Channels == 1) +) +& (Latency == "1") & (Size == "1024" | Size == "8388608" | Size == "524288") & is.element(Concurrency, c(16, 32, 64, 128))) +df1$Transport <- paste("", ifelse(df1$Transport == "partisan", "partisan", "disterl"), sep="") +df1$Concurrency <- factor(df1$Concurrency) +df1$Experiment <- paste(df1$Transport, "@", ifelse(df1$Size == "8388608", "8192KB", ifelse(df1$Size == "524288", "512KB", "1KB"))) +df1$Size <- factor(ifelse(df1$Size == "8388608", "8192KB", ifelse(df1$Size == "524288", "512KB", "1KB"))) + +df2 <- aggregate(df1$Time, list(df1$Transport, df1$Concurrency, df1$Size, df1$Experiment), length) +colnames(df2) <- c("Transport", "Concurrency", "Size", "Experiment","Ops") + +for(n in c(2, 3, 4, 5)) { + df3 <- read.csv(paste("../throughput-echo-", toString(n), "-1ms.csv", sep=""), header = FALSE) + + colnames(df3) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") + df3 <- transform(df3, Time = as.numeric(Time) / 1000) + + df4 <- subset(df3, ( + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") | + (Transport == "disterl" & Channels == 1) + ) + & (Latency == "1") & (Size == "1024" | Size == "8388608" | Size == "524288") & is.element(Concurrency, c(16, 32, 64, 128))) + df4$Transport <- paste("", ifelse(df3$Transport == "partisan", "partisan", "disterl"), sep="") + df4$Concurrency <- factor(df3$Concurrency) + df4$Experiment <- paste(df3$Transport, "@", ifelse(df3$Size == "8388608", "8192KB", ifelse(df3$Size == "524288", "512KB", "1KB"))) + df4$Size <- factor(ifelse(df3$Size == "8388608", "8192KB", ifelse(df3$Size == "524288", "512KB", "1KB"))) + + df5 <- aggregate(df4$Time, list(df4$Transport, df4$Concurrency, df4$Size, df4$Experiment), length) + colnames(df5) <- c("Transport", "Concurrency", "Size", "Experiment","Ops") + df2 <- rbind(df2, df5) +} + +df2$Join <- paste(df2$Experiment, df2$Concurrency) + +std = function(x) sd(x)/sqrt(length(x)) + +mean <- aggregate(Ops ~ Join + Transport + Concurrency + Size + Experiment, df2, function(x) mean(x)) +colnames(mean) <- c("Join", "Transport", "Concurrency", "Size", "Experiment", "Mean") + +lower <- aggregate(Ops ~ Join, df2, function(x) mean(x) - std(x)) +colnames(lower) <- c("Join", "Lower") + +upper <- aggregate(Ops ~ Join, df2, function(x) mean(x) + std(x)) +colnames(upper) <- c("Join", "Upper") + +final <- merge(mean, upper, by="Join") +final <- merge(final, lower, by="Join") + +ggplot(data = final, aes(x = Concurrency, y = (Mean / 120), fill = Transport, group = Experiment, color = Experiment)) + + geom_line(aes(linetype=Transport), size=1) + geom_point(size=2.5, aes(shape=Size)) + ylab("Ops/Second") + ylim(0, 450) + + geom_errorbar(data = final, aes(width=0.2, ymin=Lower / 120, ymax=Upper / 120)) + + theme_grey(base_size = 12) + + xlab("# of Actors") + + ylab("Requests / Second") + + theme(# legend.position = c(0.1, 0.6), + legend.background = element_rect(color = "black", fill = "grey90", size = 1, linetype = "solid"), + axis.text=element_text(size=12), + axis.title=element_text(size=14)) + + ggtitle("1/512/8192KB, 1ms RTT Latency, Echo Throughput") + +ggsave("../Echo1MSThroughput-Final.png", dpi = 400) \ No newline at end of file diff --git a/Rscripts/throughput-echo-20ms.R b/Rscripts/throughput-echo-20ms.R new file mode 100644 index 0000000..f5e601b --- /dev/null +++ b/Rscripts/throughput-echo-20ms.R @@ -0,0 +1,72 @@ +library(ggplot2) +library(scales) + +# Echo 20ms + +df <- read.csv("../throughput-echo-1-20ms.csv", header = FALSE) +colnames(df) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") +df <- transform(df, Time = as.numeric(Time) / 1000) + +df1 <- subset(df, ( + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") | + (Transport == "disterl" & Channels == 1) +) +& (Latency == "20") & (Size == "1024" | Size == "8388608" | Size == "524288") & is.element(Concurrency, c(16, 32, 64, 128))) +df1$Transport <- paste("", ifelse(df1$Transport == "partisan", "partisan", "disterl"), sep="") +df1$Concurrency <- factor(df1$Concurrency) +df1$Experiment <- paste(df1$Transport, "@", ifelse(df1$Size == "8388608", "8192KB", ifelse(df1$Size == "524288", "512KB", "1KB"))) +df1$Size <- factor(ifelse(df1$Size == "8388608", "8192KB", ifelse(df1$Size == "524288", "512KB", "1KB"))) + +df2 <- aggregate(df1$Time, list(df1$Transport, df1$Concurrency, df1$Size, df1$Experiment), length) +colnames(df2) <- c("Transport", "Concurrency", "Size", "Experiment","Ops") + +for(n in c(2, 3, 4, 5)) { + df3 <- read.csv(paste("../throughput-echo-", toString(n), "-20ms.csv", sep=""), header = FALSE) + + colnames(df3) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") + df3 <- transform(df3, Time = as.numeric(Time) / 1000) + + df4 <- subset(df3, ( + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") | + (Transport == "disterl" & Channels == 1) + ) + & (Latency == "20") & (Size == "1024" | Size == "8388608" | Size == "524288") & is.element(Concurrency, c(16, 32, 64, 128))) + df4$Transport <- paste("", ifelse(df3$Transport == "partisan", "partisan", "disterl"), sep="") + df4$Concurrency <- factor(df3$Concurrency) + df4$Experiment <- paste(df3$Transport, "@", ifelse(df3$Size == "8388608", "8192KB", ifelse(df3$Size == "524288", "512KB", "1KB"))) + df4$Size <- factor(ifelse(df3$Size == "8388608", "8192KB", ifelse(df3$Size == "524288", "512KB", "1KB"))) + + df5 <- aggregate(df4$Time, list(df4$Transport, df4$Concurrency, df4$Size, df4$Experiment), length) + colnames(df5) <- c("Transport", "Concurrency", "Size", "Experiment","Ops") + df2 <- rbind(df2, df5) +} + +df2$Join <- paste(df2$Experiment, df2$Concurrency) + +std = function(x) sd(x)/sqrt(length(x)) + +mean <- aggregate(Ops ~ Join + Transport + Concurrency + Size + Experiment, df2, function(x) mean(x)) +colnames(mean) <- c("Join", "Transport", "Concurrency", "Size", "Experiment", "Mean") + +lower <- aggregate(Ops ~ Join, df2, function(x) mean(x) - std(x)) +colnames(lower) <- c("Join", "Lower") + +upper <- aggregate(Ops ~ Join, df2, function(x) mean(x) + std(x)) +colnames(upper) <- c("Join", "Upper") + +final <- merge(mean, upper, by="Join") +final <- merge(final, lower, by="Join") + +ggplot(data = final, aes(x = Concurrency, y = (Mean / 120), fill = Transport, group = Experiment, color = Experiment)) + + geom_line(aes(linetype=Transport), size=1) + geom_point(size=2.5, aes(shape=Size)) + ylab("Ops/Second") + ylim(0, 450) + + geom_errorbar(data = final, aes(width=0.2, ymin=Lower / 120, ymax=Upper / 120)) + + theme_grey(base_size = 12) + + xlab("# of Actors") + + ylab("Requests / Second") + + theme(# legend.position = c(0.1, 0.6), + legend.background = element_rect(color = "black", fill = "grey90", size = 1, linetype = "solid"), + axis.text=element_text(size=12), + axis.title=element_text(size=14)) + + ggtitle("1/512/8192KB, 20ms RTT Latency, Echo Throughput") + +ggsave("../Echo20MSThroughput-Final.png", dpi = 400) \ No newline at end of file diff --git a/Rscripts/throughput-kvs-1ms.R b/Rscripts/throughput-kvs-1ms.R new file mode 100644 index 0000000..b0940c4 --- /dev/null +++ b/Rscripts/throughput-kvs-1ms.R @@ -0,0 +1,72 @@ +library(ggplot2) +library(scales) + +# KVS 1ms + +df <- read.csv("../throughput-kvs-1-1ms.csv", header = FALSE) +colnames(df) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") +df <- transform(df, Time = as.numeric(Time) / 1000) + +df1 <- subset(df, ( + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") | + (Transport == "disterl" & Channels == 1) +) +& (Latency == "1") & (Size == "1024" | Size == "8388608" | Size == "524288") & is.element(Concurrency, c(16, 32, 64, 128))) +df1$Transport <- paste("", ifelse(df1$Transport == "partisan", "partisan", "disterl"), sep="") +df1$Concurrency <- factor(df1$Concurrency) +df1$Experiment <- paste(df1$Transport, "@", ifelse(df1$Size == "8388608", "8192KB", ifelse(df1$Size == "524288", "512KB", "1KB"))) +df1$Size <- factor(ifelse(df1$Size == "8388608", "8192KB", ifelse(df1$Size == "524288", "512KB", "1KB"))) + +df2 <- aggregate(df1$Time, list(df1$Transport, df1$Concurrency, df1$Size, df1$Experiment), length) +colnames(df2) <- c("Transport", "Concurrency", "Size", "Experiment","Ops") + +for(n in c(2, 3, 4, 5)) { + df3 <- read.csv(paste("../throughput-kvs-", toString(n), "-1ms.csv", sep=""), header = FALSE) + + colnames(df3) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") + df3 <- transform(df3, Time = as.numeric(Time) / 1000) + + df4 <- subset(df3, ( + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") | + (Transport == "disterl" & Channels == 1) + ) + & (Latency == "1") & (Size == "1024" | Size == "8388608" | Size == "524288") & is.element(Concurrency, c(16, 32, 64, 128))) + df4$Transport <- paste("", ifelse(df3$Transport == "partisan", "partisan", "disterl"), sep="") + df4$Concurrency <- factor(df3$Concurrency) + df4$Experiment <- paste(df3$Transport, "@", ifelse(df3$Size == "8388608", "8192KB", ifelse(df3$Size == "524288", "512KB", "1KB"))) + df4$Size <- factor(ifelse(df3$Size == "8388608", "8192KB", ifelse(df3$Size == "524288", "512KB", "1KB"))) + + df5 <- aggregate(df4$Time, list(df4$Transport, df4$Concurrency, df4$Size, df4$Experiment), length) + colnames(df5) <- c("Transport", "Concurrency", "Size", "Experiment","Ops") + df2 <- rbind(df2, df5) +} + +df2$Join <- paste(df2$Experiment, df2$Concurrency) + +std = function(x) sd(x)/sqrt(length(x)) + +mean <- aggregate(Ops ~ Join + Transport + Concurrency + Size + Experiment, df2, function(x) mean(x)) +colnames(mean) <- c("Join", "Transport", "Concurrency", "Size", "Experiment", "Mean") + +lower <- aggregate(Ops ~ Join, df2, function(x) mean(x) - std(x)) +colnames(lower) <- c("Join", "Lower") + +upper <- aggregate(Ops ~ Join, df2, function(x) mean(x) + std(x)) +colnames(upper) <- c("Join", "Upper") + +final <- merge(mean, upper, by="Join") +final <- merge(final, lower, by="Join") + +ggplot(data = final, aes(x = Concurrency, y = (Mean / 120), fill = Transport, group = Experiment, color = Experiment)) + + geom_line(aes(linetype=Transport), size=1) + geom_point(size=2.5, aes(shape=Size)) + ylab("Ops/Second") + ylim(50, 150) + + geom_errorbar(data = final, aes(width=0.2, ymin=Lower / 120, ymax=Upper / 120)) + + theme_grey(base_size = 12) + + xlab("# of Actors") + + ylab("Requests / Second") + + theme(# legend.position = c(0.1, 0.6), + legend.background = element_rect(color = "black", fill = "grey90", size = 1, linetype = "solid"), + axis.text=element_text(size=12), + axis.title=element_text(size=14)) + + ggtitle("1/512/8192KB, 1ms RTT Latency, KVS Throughput") + +ggsave("../KVS1MSThroughput-Final.png", dpi = 400) diff --git a/Rscripts/throughput-kvs-20ms.R b/Rscripts/throughput-kvs-20ms.R new file mode 100644 index 0000000..80ccd71 --- /dev/null +++ b/Rscripts/throughput-kvs-20ms.R @@ -0,0 +1,72 @@ +library(ggplot2) +library(scales) + +# KVS 20ms + +df <- read.csv("../hroughput-kvs-1-20ms.csv", header = FALSE) +colnames(df) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") +df <- transform(df, Time = as.numeric(Time) / 1000) + +df1 <- subset(df, ( + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") | + (Transport == "disterl" & Channels == 1) +) +& (Latency == "20") & (Size == "1024" | Size == "8388608" | Size == "524288") & is.element(Concurrency, c(16, 32, 64, 128))) +df1$Transport <- paste("", ifelse(df1$Transport == "partisan", "partisan", "disterl"), sep="") +df1$Concurrency <- factor(df1$Concurrency) +df1$Experiment <- paste(df1$Transport, "@", ifelse(df1$Size == "8388608", "8192KB", ifelse(df1$Size == "524288", "512KB", "1KB"))) +df1$Size <- factor(ifelse(df1$Size == "8388608", "8192KB", ifelse(df1$Size == "524288", "512KB", "1KB"))) + +df2 <- aggregate(df1$Time, list(df1$Transport, df1$Concurrency, df1$Size, df1$Experiment), length) +colnames(df2) <- c("Transport", "Concurrency", "Size", "Experiment","Ops") + +for(n in c(2, 3, 4, 5)) { + df3 <- read.csv(paste("../throughput-kvs-", toString(n), "-20ms.csv", sep=""), header = FALSE) + + colnames(df3) <- c("App", "Transport", "Concurrency", "Channels", "Monotonic", "Parallelism", "Affinity", "Size", "Num", "Latency", "Time") + df3 <- transform(df3, Time = as.numeric(Time) / 1000) + + df4 <- subset(df3, ( + (Transport == "partisan" & Channels == 4 & Parallelism == 16 & Affinity == "true") | + (Transport == "disterl" & Channels == 1) + ) + & (Latency == "20") & (Size == "1024" | Size == "8388608" | Size == "524288") & is.element(Concurrency, c(16, 32, 64, 128))) + df4$Transport <- paste("", ifelse(df3$Transport == "partisan", "partisan", "disterl"), sep="") + df4$Concurrency <- factor(df3$Concurrency) + df4$Experiment <- paste(df3$Transport, "@", ifelse(df3$Size == "8388608", "8192KB", ifelse(df3$Size == "524288", "512KB", "1KB"))) + df4$Size <- factor(ifelse(df3$Size == "8388608", "8192KB", ifelse(df3$Size == "524288", "512KB", "1KB"))) + + df5 <- aggregate(df4$Time, list(df4$Transport, df4$Concurrency, df4$Size, df4$Experiment), length) + colnames(df5) <- c("Transport", "Concurrency", "Size", "Experiment","Ops") + df2 <- rbind(df2, df5) +} + +df2$Join <- paste(df2$Experiment, df2$Concurrency) + +std = function(x) sd(x)/sqrt(length(x)) + +mean <- aggregate(Ops ~ Join + Transport + Concurrency + Size + Experiment, df2, function(x) mean(x)) +colnames(mean) <- c("Join", "Transport", "Concurrency", "Size", "Experiment", "Mean") + +lower <- aggregate(Ops ~ Join, df2, function(x) mean(x) - std(x)) +colnames(lower) <- c("Join", "Lower") + +upper <- aggregate(Ops ~ Join, df2, function(x) mean(x) + std(x)) +colnames(upper) <- c("Join", "Upper") + +final <- merge(mean, upper, by="Join") +final <- merge(final, lower, by="Join") + +ggplot(data = final, aes(x = Concurrency, y = (Mean / 120), fill = Transport, group = Experiment, color = Experiment)) + + geom_line(aes(linetype=Transport), size=1) + geom_point(size=2.5, aes(shape=Size)) + ylab("Ops/Second") + ylim(0, 150) + + geom_errorbar(data = final, aes(width=0.2, ymin=Lower / 120, ymax=Upper / 120)) + + theme_grey(base_size = 12) + + xlab("# of Actors") + + ylab("Requests / Second") + + theme(# legend.position = c(0.1, 0.6), + legend.background = element_rect(color = "black", fill = "grey90", size = 1, linetype = "solid"), + axis.text=element_text(size=12), + axis.title=element_text(size=14)) + + ggtitle("1/512/8192KB, 20ms RTT Latency, KVS Throughput") + +ggsave("../KVS20MSThroughput-Final.png", dpi = 400) diff --git a/bin/latency-suite.sh b/bin/latency-suite.sh new file mode 100644 index 0000000..f8767f6 --- /dev/null +++ b/bin/latency-suite.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# Other options: make partisan-perf fsm-perf + +sudo tc qdisc del dev lo root netem + +# 1ms RTT +sudo tc qdisc add dev lo root netem delay 0.5ms + +LATENCY=1 SIZE=1024 CONCURRENCY=8 make kvs-latency + +sudo tc qdisc del dev lo root netem + +# 10 RTT +sudo tc qdisc add dev lo root netem delay 5ms + +LATENCY=10 SIZE=1024 CONCURRENCY=8 make kvs-latency + +sudo tc qdisc del dev lo root netem + +# 20 RTT +sudo tc qdisc add dev lo root netem delay 10 + +LATENCY=20 SIZE=1024 CONCURRENCY=8 make kvs-latency + +sudo tc qdisc del dev lo root netem + +# 40 RTT +sudo tc qdisc add dev lo root netem delay 20 + +LATENCY=40 SIZE=1024 CONCURRENCY=8 make kvs-latency + +sudo tc qdisc del dev lo root netem + +# 80 RTT +sudo tc qdisc add dev lo root netem delay 40 + +LATENCY=80 SIZE=1024 CONCURRENCY=8 make kvs-latency + +sudo tc qdisc del dev lo root netem + +# 120 RTT +sudo tc qdisc add dev lo root netem delay 60 + +LATENCY=120 SIZE=1024 CONCURRENCY=8 make kvs-latency + +sudo tc qdisc del dev lo root netem + +sudo tc qdisc del dev lo root netem \ No newline at end of file diff --git a/bin/microbenchmarks-highlatency.sh b/bin/microbenchmarks-highlatency.sh new file mode 100755 index 0000000..395139b --- /dev/null +++ b/bin/microbenchmarks-highlatency.sh @@ -0,0 +1,16 @@ + +#!/bin/bash + +sudo tc qdisc del dev lo root netem + +# 1ms RTT +sudo tc qdisc add dev lo root netem delay 10ms + +LATENCY=20 SIZE=512 CONCURRENCY=16 make microbenchmarks-highlatency +LATENCY=20 SIZE=512 CONCURRENCY=32 make microbenchmarks-highlatency +LATENCY=20 SIZE=512 CONCURRENCY=64 make microbenchmarks-highlatency +LATENCY=20 SIZE=512 CONCURRENCY=128 make microbenchmarks-highlatency + +sudo tc qdisc del dev lo root netem + +mv results.csv microbenchmarks-highlatency.csv diff --git a/bin/microbenchmarks-largepayload.sh b/bin/microbenchmarks-largepayload.sh new file mode 100755 index 0000000..af0606f --- /dev/null +++ b/bin/microbenchmarks-largepayload.sh @@ -0,0 +1,16 @@ + +#!/bin/bash + +sudo tc qdisc del dev lo root netem + +# 1ms RTT +sudo tc qdisc add dev lo root netem delay 0.5ms + +LATENCY=1 SIZE=8192 CONCURRENCY=16 make microbenchmarks-largepayload +LATENCY=1 SIZE=8192 CONCURRENCY=32 make microbenchmarks-largepayload +LATENCY=1 SIZE=8192 CONCURRENCY=64 make microbenchmarks-largepayload +LATENCY=1 SIZE=8192 CONCURRENCY=128 make microbenchmarks-largepayload + +sudo tc qdisc del dev lo root netem + +mv results.csv microbenchmarks-largepayload.csv diff --git a/bin/microbenchmarks-queueoverhead.sh b/bin/microbenchmarks-queueoverhead.sh new file mode 100755 index 0000000..3f584f8 --- /dev/null +++ b/bin/microbenchmarks-queueoverhead.sh @@ -0,0 +1,13 @@ + +#!/bin/bash + +sudo tc qdisc del dev lo root netem + +# 1ms RTT +sudo tc qdisc add dev lo root netem delay 0.5ms + +LATENCY=1 SIZE=512 CONCURRENCY=128 make microbenchmarks-queueoverhead + +sudo tc qdisc del dev lo root netem + +mv results.csv microbenchmarks-queueoverhead.csv diff --git a/bin/microbenchmarks.sh b/bin/microbenchmarks.sh new file mode 100755 index 0000000..90a1b83 --- /dev/null +++ b/bin/microbenchmarks.sh @@ -0,0 +1,16 @@ + +#!/bin/bash + +sudo tc qdisc del dev lo root netem + +# 1ms RTT +sudo tc qdisc add dev lo root netem delay 0.5ms + +LATENCY=1 SIZE=512 CONCURRENCY=16 make microbenchmarks +LATENCY=1 SIZE=512 CONCURRENCY=32 make microbenchmarks +LATENCY=1 SIZE=512 CONCURRENCY=64 make microbenchmarks +LATENCY=1 SIZE=512 CONCURRENCY=128 make microbenchmarks + +sudo tc qdisc del dev lo root netem + +mv results.csv microbenchmarks.csv diff --git a/bin/perf-suite.sh b/bin/perf-suite.sh index 017b281..a1f3e27 100755 --- a/bin/perf-suite.sh +++ b/bin/perf-suite.sh @@ -11,21 +11,41 @@ LATENCY=1 SIZE=1024 CONCURRENCY=1 make echo-perf LATENCY=1 SIZE=1024 CONCURRENCY=2 make echo-perf LATENCY=1 SIZE=1024 CONCURRENCY=4 make echo-perf LATENCY=1 SIZE=1024 CONCURRENCY=8 make echo-perf +LATENCY=1 SIZE=1024 CONCURRENCY=16 make echo-perf +LATENCY=1 SIZE=1024 CONCURRENCY=24 make echo-perf +LATENCY=1 SIZE=1024 CONCURRENCY=32 make echo-perf +LATENCY=1 SIZE=1024 CONCURRENCY=64 make echo-perf +LATENCY=1 SIZE=1024 CONCURRENCY=120 make echo-perf LATENCY=1 SIZE=2048 CONCURRENCY=1 make echo-perf LATENCY=1 SIZE=2048 CONCURRENCY=2 make echo-perf LATENCY=1 SIZE=2048 CONCURRENCY=4 make echo-perf LATENCY=1 SIZE=2048 CONCURRENCY=8 make echo-perf +LATENCY=1 SIZE=2048 CONCURRENCY=16 make echo-perf +LATENCY=1 SIZE=2048 CONCURRENCY=24 make echo-perf +LATENCY=1 SIZE=2048 CONCURRENCY=32 make echo-perf +LATENCY=1 SIZE=2048 CONCURRENCY=64 make echo-perf +LATENCY=1 SIZE=2048 CONCURRENCY=120 make echo-perf LATENCY=1 SIZE=4096 CONCURRENCY=1 make echo-perf LATENCY=1 SIZE=4096 CONCURRENCY=2 make echo-perf LATENCY=1 SIZE=4096 CONCURRENCY=4 make echo-perf LATENCY=1 SIZE=4096 CONCURRENCY=8 make echo-perf +LATENCY=1 SIZE=4096 CONCURRENCY=16 make echo-perf +LATENCY=1 SIZE=4096 CONCURRENCY=24 make echo-perf +LATENCY=1 SIZE=4096 CONCURRENCY=32 make echo-perf +LATENCY=1 SIZE=4096 CONCURRENCY=64 make echo-perf +LATENCY=1 SIZE=4096 CONCURRENCY=120 make echo-perf LATENCY=1 SIZE=8192 CONCURRENCY=1 make echo-perf LATENCY=1 SIZE=8192 CONCURRENCY=2 make echo-perf LATENCY=1 SIZE=8192 CONCURRENCY=4 make echo-perf LATENCY=1 SIZE=8192 CONCURRENCY=8 make echo-perf +LATENCY=1 SIZE=8192 CONCURRENCY=16 make echo-perf +LATENCY=1 SIZE=8192 CONCURRENCY=24 make echo-perf +LATENCY=1 SIZE=8192 CONCURRENCY=32 make echo-perf +LATENCY=1 SIZE=8192 CONCURRENCY=64 make echo-perf +LATENCY=1 SIZE=8192 CONCURRENCY=120 make echo-perf sudo tc qdisc del dev lo root netem @@ -36,21 +56,41 @@ LATENCY=20 SIZE=1024 CONCURRENCY=1 make echo-perf LATENCY=20 SIZE=1024 CONCURRENCY=2 make echo-perf LATENCY=20 SIZE=1024 CONCURRENCY=4 make echo-perf LATENCY=20 SIZE=1024 CONCURRENCY=8 make echo-perf +LATENCY=20 SIZE=1024 CONCURRENCY=16 make echo-perf +LATENCY=20 SIZE=1024 CONCURRENCY=24 make echo-perf +LATENCY=20 SIZE=1024 CONCURRENCY=32 make echo-perf +LATENCY=20 SIZE=1024 CONCURRENCY=64 make echo-perf +LATENCY=20 SIZE=1024 CONCURRENCY=120 make echo-perf LATENCY=20 SIZE=2048 CONCURRENCY=1 make echo-perf LATENCY=20 SIZE=2048 CONCURRENCY=2 make echo-perf LATENCY=20 SIZE=2048 CONCURRENCY=4 make echo-perf LATENCY=20 SIZE=2048 CONCURRENCY=8 make echo-perf +LATENCY=20 SIZE=2048 CONCURRENCY=16 make echo-perf +LATENCY=20 SIZE=2048 CONCURRENCY=24 make echo-perf +LATENCY=20 SIZE=2048 CONCURRENCY=32 make echo-perf +LATENCY=20 SIZE=2048 CONCURRENCY=64 make echo-perf +LATENCY=20 SIZE=2048 CONCURRENCY=120 make echo-perf LATENCY=20 SIZE=4096 CONCURRENCY=1 make echo-perf LATENCY=20 SIZE=4096 CONCURRENCY=2 make echo-perf LATENCY=20 SIZE=4096 CONCURRENCY=4 make echo-perf LATENCY=20 SIZE=4096 CONCURRENCY=8 make echo-perf +LATENCY=20 SIZE=4096 CONCURRENCY=16 make echo-perf +LATENCY=20 SIZE=4096 CONCURRENCY=24 make echo-perf +LATENCY=20 SIZE=4096 CONCURRENCY=32 make echo-perf +LATENCY=20 SIZE=4096 CONCURRENCY=64 make echo-perf +LATENCY=20 SIZE=4096 CONCURRENCY=120 make echo-perf LATENCY=20 SIZE=8192 CONCURRENCY=1 make echo-perf LATENCY=20 SIZE=8192 CONCURRENCY=2 make echo-perf LATENCY=20 SIZE=8192 CONCURRENCY=4 make echo-perf LATENCY=20 SIZE=8192 CONCURRENCY=8 make echo-perf +LATENCY=20 SIZE=8192 CONCURRENCY=16 make echo-perf +LATENCY=20 SIZE=8192 CONCURRENCY=24 make echo-perf +LATENCY=20 SIZE=8192 CONCURRENCY=32 make echo-perf +LATENCY=20 SIZE=8192 CONCURRENCY=64 make echo-perf +LATENCY=20 SIZE=8192 CONCURRENCY=120 make echo-perf sudo tc qdisc del dev lo root netem diff --git a/bin/throughput-echo.sh b/bin/throughput-echo.sh new file mode 100755 index 0000000..4bd63f4 --- /dev/null +++ b/bin/throughput-echo.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +rm results.csv + +for N in 1 2 3 4 5 +do + sudo tc qdisc del dev lo root netem + + # 1ms RTT + sudo tc qdisc add dev lo root netem delay 0.5ms + + LATENCY=1 SIZE=1 CONCURRENCY=16 make echo-perf + LATENCY=1 SIZE=1 CONCURRENCY=32 make echo-perf + LATENCY=1 SIZE=1 CONCURRENCY=64 make echo-perf + LATENCY=1 SIZE=1 CONCURRENCY=128 make echo-perf + + LATENCY=1 SIZE=512 CONCURRENCY=16 make echo-perf + LATENCY=1 SIZE=512 CONCURRENCY=32 make echo-perf + LATENCY=1 SIZE=512 CONCURRENCY=64 make echo-perf + LATENCY=1 SIZE=512 CONCURRENCY=128 make echo-perf + + LATENCY=1 SIZE=8192 CONCURRENCY=16 make echo-perf + LATENCY=1 SIZE=8192 CONCURRENCY=32 make echo-perf + LATENCY=1 SIZE=8192 CONCURRENCY=64 make echo-perf + LATENCY=1 SIZE=8192 CONCURRENCY=128 make echo-perf + + sudo tc qdisc del dev lo root netem + + mv results.csv throughput-echo-${N}-1ms.csv +done + +for N in 1 2 3 4 5 +do + sudo tc qdisc del dev lo root netem + + # 20ms RTT + sudo tc qdisc add dev lo root netem delay 10ms + + LATENCY=20 SIZE=1 CONCURRENCY=16 make echo-perf + LATENCY=20 SIZE=1 CONCURRENCY=32 make echo-perf + LATENCY=20 SIZE=1 CONCURRENCY=64 make echo-perf + LATENCY=20 SIZE=1 CONCURRENCY=128 make echo-perf + + LATENCY=20 SIZE=512 CONCURRENCY=16 make echo-perf + LATENCY=20 SIZE=512 CONCURRENCY=32 make echo-perf + LATENCY=20 SIZE=512 CONCURRENCY=64 make echo-perf + LATENCY=20 SIZE=512 CONCURRENCY=128 make echo-perf + + LATENCY=20 SIZE=8192 CONCURRENCY=16 make echo-perf + LATENCY=20 SIZE=8192 CONCURRENCY=32 make echo-perf + LATENCY=20 SIZE=8192 CONCURRENCY=64 make echo-perf + LATENCY=20 SIZE=8192 CONCURRENCY=128 make echo-perf + + sudo tc qdisc del dev lo root netem + + mv results.csv throughput-echo-${N}-20ms.csv +done diff --git a/bin/throughput-kvs.sh b/bin/throughput-kvs.sh new file mode 100755 index 0000000..bcde5f8 --- /dev/null +++ b/bin/throughput-kvs.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +rm results.csv + +for N in 1 2 3 4 5 +do + sudo tc qdisc del dev lo root netem + + # 1ms RTT +sudo tc qdisc add dev lo root netem delay 0.5ms + + LATENCY=1 SIZE=1 CONCURRENCY=16 make fsm-perf + LATENCY=1 SIZE=1 CONCURRENCY=32 make fsm-perf + LATENCY=1 SIZE=1 CONCURRENCY=64 make fsm-perf + LATENCY=1 SIZE=1 CONCURRENCY=128 make fsm-perf + + LATENCY=1 SIZE=512 CONCURRENCY=16 make fsm-perf + LATENCY=1 SIZE=512 CONCURRENCY=32 make fsm-perf + LATENCY=1 SIZE=512 CONCURRENCY=64 make fsm-perf + LATENCY=1 SIZE=512 CONCURRENCY=128 make fsm-perf + + LATENCY=1 SIZE=8192 CONCURRENCY=16 make fsm-perf + LATENCY=1 SIZE=8192 CONCURRENCY=32 make fsm-perf + LATENCY=1 SIZE=8192 CONCURRENCY=64 make fsm-perf + LATENCY=1 SIZE=8192 CONCURRENCY=128 make fsm-perf + + sudo tc qdisc del dev lo root netem + + mv results.csv throughput-kvs-${N}-1ms.csv +done + +for N in 1 2 3 4 5 +do + sudo tc qdisc del dev lo root netem + + # 20ms RTT + sudo tc qdisc add dev lo root netem delay 10ms + + LATENCY=20 SIZE=1 CONCURRENCY=16 make fsm-perf + LATENCY=20 SIZE=1 CONCURRENCY=32 make fsm-perf + LATENCY=20 SIZE=1 CONCURRENCY=64 make fsm-perf + LATENCY=20 SIZE=1 CONCURRENCY=128 make fsm-perf + + LATENCY=20 SIZE=512 CONCURRENCY=16 make fsm-perf + LATENCY=20 SIZE=512 CONCURRENCY=32 make fsm-perf + LATENCY=20 SIZE=512 CONCURRENCY=64 make fsm-perf + LATENCY=20 SIZE=512 CONCURRENCY=128 make fsm-perf + + LATENCY=20 SIZE=8192 CONCURRENCY=16 make fsm-perf + LATENCY=20 SIZE=8192 CONCURRENCY=32 make fsm-perf + LATENCY=20 SIZE=8192 CONCURRENCY=64 make fsm-perf + LATENCY=20 SIZE=8192 CONCURRENCY=128 make fsm-perf + + sudo tc qdisc del dev lo root netem + + mv results.csv throughput-kvs-${N}-20ms.csv +done diff --git a/examples/10mb_object.config b/examples/10mb_object.config deleted file mode 100644 index 0875b77..0000000 --- a/examples/10mb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 10485760}}. diff --git a/examples/1kb_object.config b/examples/1kb_object.config deleted file mode 100644 index 522b988..0000000 --- a/examples/1kb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 1024}}. diff --git a/examples/1mb_object.config b/examples/1mb_object.config deleted file mode 100644 index 1fcf244..0000000 --- a/examples/1mb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 1048576}}. diff --git a/examples/2mb_object.config b/examples/2mb_object.config deleted file mode 100644 index 45d16f3..0000000 --- a/examples/2mb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 2097152}}. diff --git a/examples/32kb_object.config b/examples/32kb_object.config deleted file mode 100644 index a096f94..0000000 --- a/examples/32kb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 32768}}. diff --git a/examples/32mb_object.config b/examples/32mb_object.config deleted file mode 100644 index f1d46a4..0000000 --- a/examples/32mb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 33554144}}. diff --git a/examples/4mb_object.config b/examples/4mb_object.config deleted file mode 100644 index 16ae21f..0000000 --- a/examples/4mb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 4194304}}. diff --git a/examples/512kb_object.config b/examples/512kb_object.config deleted file mode 100644 index ad3877a..0000000 --- a/examples/512kb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 524288}}. diff --git a/examples/64kb_object.config b/examples/64kb_object.config deleted file mode 100644 index 8d5dada..0000000 --- a/examples/64kb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 65536}}. \ No newline at end of file diff --git a/examples/64mb_object.config b/examples/64mb_object.config deleted file mode 100644 index 804d7c3..0000000 --- a/examples/64mb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 67108864}}. diff --git a/examples/8mb_object.config b/examples/8mb_object.config deleted file mode 100644 index bb8aeb2..0000000 --- a/examples/8mb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 8388608}}. diff --git a/examples/96kb_object.config b/examples/96kb_object.config deleted file mode 100644 index cfd65b9..0000000 --- a/examples/96kb_object.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, object}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{fsm_get, 10}, {fsm_put, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 98304}}. diff --git a/examples/default.config b/examples/default.config deleted file mode 100644 index 8fd3e1d..0000000 --- a/examples/default.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, ping}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{ping, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 0}}. \ No newline at end of file diff --git a/examples/echo.config b/examples/echo.config deleted file mode 100644 index 1d32a96..0000000 --- a/examples/echo.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, echo}. - -{concurrent, 1}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{echo, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 16777216}}. diff --git a/examples/ping.config b/examples/ping.config deleted file mode 100644 index 8fd3e1d..0000000 --- a/examples/ping.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, ping}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{ping, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 0}}. \ No newline at end of file diff --git a/examples/sync_ping.config b/examples/sync_ping.config deleted file mode 100644 index 0a11edf..0000000 --- a/examples/sync_ping.config +++ /dev/null @@ -1,15 +0,0 @@ -{mode, max}. - -{duration, 2}. - -{type, sync_ping}. - -{concurrent, 3}. - -{driver, lasp_bench_driver_unir}. - -{operations, [{sync_ping, 1}]}. - -{key_generator, {int_to_bin_bigendian, {uniform_int, 1000}}}. - -{value_generator, {fixed_bin, 0}}. diff --git a/results-scale.csv b/results-scale.csv deleted file mode 100644 index ebde49f..0000000 --- a/results-scale.csv +++ /dev/null @@ -1,12 +0,0 @@ -16142632,3,59900 -22295029,4,60872 -31635989,5,61922 -16203026,3,59900 -57021042,4,60872 -32065029,5,61922 -20507275,3,59900 -22637026,4,60872 -23482090,5,61922 -22673100,3,59900 -20631567,4,60872 -22660729,5,61922 diff --git a/test/partisan_support.erl b/test/partisan_support.erl index 3ca7358..34928e7 100644 --- a/test/partisan_support.erl +++ b/test/partisan_support.erl @@ -58,6 +58,7 @@ start(_Case, Config, Options) -> ct:pal("Starting node: ~p", [Name]), NodeConfig = [{monitor_master, true}, + {erl_flags, "+K true -smp"}, %% smp for the eleveldb god {startup_functions, [{code, set_path, [codepath()]}]}], case ct_slave:start(Name, NodeConfig) of @@ -125,7 +126,12 @@ start(_Case, Config, Options) -> true -> false; _ -> - false + case ?config(disterl, Config) of + true -> + true; + _ -> + false + end end, ct:pal("Setting disterl to: ~p", [Disterl]), ok = rpc:call(Node, partisan_config, set, [disterl, Disterl]), @@ -176,6 +182,15 @@ start(_Case, Config, Options) -> ct:pal("Setting parallelism to: ~p", [Parallelism]), ok = rpc:call(Node, partisan_config, set, [parallelism, Parallelism]), + VnodePartitioning = case ?config(vnode_partitioning, Config) of + undefined -> + false; + VP -> + VP + end, + ct:pal("Setting vnode_partitioning to: ~p", [VnodePartitioning]), + ok = rpc:call(Node, partisan_config, set, [vnode_partitioning, VnodePartitioning]), + Servers = proplists:get_value(servers, Options, []), Clients = proplists:get_value(clients, Options, []), @@ -334,4 +349,4 @@ node_list(N, Name, Config) -> integer_to_list(?config(hash, Config)), integer_to_list(X)], "_")) || - X <- lists:seq(1, N) ]. \ No newline at end of file + X <- lists:seq(1, N) ]. diff --git a/test/support.erl b/test/support.erl index a1bf9ba..d6b0c32 100644 --- a/test/support.erl +++ b/test/support.erl @@ -98,7 +98,7 @@ start(_Case, Config, Options) -> lager:info("Starting node: ~p", [NameToStart]), NodeConfig = [{monitor_master, true}, - {erl_flags, "-smp"}, %% smp for the eleveldb god + {erl_flags, "+K true -smp"}, %% smp for the eleveldb god {startup_functions, [{code, set_path, [codepath()]}]}], diff --git a/test/throughput_SUITE.erl b/test/throughput_SUITE.erl index f9905f9..bcf5717 100644 --- a/test/throughput_SUITE.erl +++ b/test/throughput_SUITE.erl @@ -63,7 +63,7 @@ end_per_testcase(Case, Config) -> Config. init_per_group(disterl, Config) -> - Config; + [{disterl, true}] ++ Config; init_per_group(partisan, Config) -> [{pid_encoding, false}, {partisan_dispatch, true}] ++ Config; @@ -159,6 +159,7 @@ partisan_performance_test(Config) -> %% Start nodes. partisan_support:start(partisan_performance_test, Config, [{partisan_peer_service_manager, Manager}, + {sync_join, true}, {servers, Servers}, {clients, Clients}]); _ -> @@ -229,8 +230,8 @@ partisan_performance_test(Config) -> P -> P end, - - NumMessages = 1000, + + NumMessages = 10000, BenchPid = self(), BytesSize = Size * 1024, @@ -241,13 +242,23 @@ partisan_performance_test(Config) -> %% Spawn processes to send receive messages on node 1. ct:pal("Spawning processes."), SenderPids = lists:map(fun(SenderNum) -> + PartitionKey = case rpc:call(Node1, partisan_config, get, [vnode_partitioning]) of + undefined -> + undefined; + false -> + undefined; + true -> + SenderNum + end, + lager:warning("******** USING PARITION KEY FOR SENDER: ~p", [PartitionKey]), + ReceiverFun = fun() -> - receiver(Manager, BenchPid, NumMessages) + receiver(Manager, BenchPid, NumMessages, []) end, ReceiverPid = rpc:call(Node2, erlang, spawn, [ReceiverFun]), SenderFun = fun() -> - init_sender(EchoBinary, Manager, Node2, ReceiverPid, SenderNum, NumMessages) + init_sender(EchoBinary, Manager, Node2, ReceiverPid, PartitionKey, NumMessages) end, SenderPid = rpc:call(Node1, erlang, spawn, [SenderFun]), SenderPid @@ -263,7 +274,7 @@ partisan_performance_test(Config) -> %% Wait for them all. bench_receiver(Concurrency) end, - {Time, _Value} = timer:tc(ProfileFun), + {Time, Tdiffs} = timer:tc(ProfileFun), %% Write results. RootDir = root_dir(Config), @@ -290,7 +301,16 @@ partisan_performance_test(Config) -> VP -> VP end, - io:format(FileHandle, "~p,~p,~p,~p,~p,~p,~p,~p,~p,~p,~p~n", [App, Backend, Concurrency, NumChannels, false, Parallelism, Partitioned, BytesSize, NumMessages, Latency, Time]), + ct:pal("Tdiffs are: ~p", [Tdiffs]), + case Tdiffs of + [] -> + io:format(FileHandle, "~p,~p,~p,~p,~p,~p,~p,~p,~p,~p,~p~n", [App, Backend, Concurrency, NumChannels, false, Parallelism, Partitioned, BytesSize, NumMessages, Latency, Time]); + Tdiffs when is_list(Tdiffs) -> + lists:foreach(fun(Tdiff) -> + io:format(FileHandle, "~p,~p,~p,~p,~p,~p,~p,~p,~p,~p,~p~n", [App, Backend, Concurrency, NumChannels, false, Parallelism, Partitioned, BytesSize, NumMessages, Latency, Tdiff]) + end, Tdiffs) + end, + file:close(FileHandle), case Profile of @@ -358,7 +378,7 @@ echo_performance_test(Config) -> P end, - NumMessages = 1000, + NumMessages = 100000, BenchPid = self(), BytesSize = Size * 1024, @@ -387,7 +407,7 @@ echo_performance_test(Config) -> %% Wait for them all. bench_receiver(length(SenderPids)) end, - {Time, _Value} = timer:tc(ProfileFun), + {Time, Tdiffs} = timer:tc(ProfileFun), %% Write results. RootDir = root_dir(Config), @@ -420,7 +440,14 @@ echo_performance_test(Config) -> MC -> MC end, - io:format(FileHandle, "~p,~p,~p,~p,~p,~p,~p,~p,~p,~p,~p~n", [echo, Backend, Concurrency, NumChannels, MonotonicChannels, Parallelism, Partitioned, BytesSize, NumMessages, Latency, Time]), + case Tdiffs of + [] -> + io:format(FileHandle, "~p,~p,~p,~p,~p,~p,~p,~p,~p,~p,~p~n", [echo, Backend, Concurrency, NumChannels, MonotonicChannels, Parallelism, Partitioned, BytesSize, NumMessages, Latency, Time]); + Tdiffs when is_list(Tdiffs) -> + lists:foreach(fun(Tdiff) -> + io:format(FileHandle, "~p,~p,~p,~p,~p,~p,~p,~p,~p,~p,~p~n", [echo, Backend, Concurrency, NumChannels, MonotonicChannels, Parallelism, Partitioned, BytesSize, NumMessages, Latency, Tdiff]) + end, Tdiffs) + end, file:close(FileHandle), ct:pal("Time: ~p", [Time]), @@ -477,7 +504,7 @@ fsm_performance_test(Config) -> P end, - NumMessages = 1000, + NumMessages = 100000, BenchPid = self(), BytesSize = Size * 1024, @@ -506,7 +533,7 @@ fsm_performance_test(Config) -> %% Wait for them all. bench_receiver(length(SenderPids)) end, - {Time, Value} = timer:tc(ProfileFun), + {Time, Tdiffs} = timer:tc(ProfileFun), %% Write results. RootDir = root_dir(Config), @@ -539,10 +566,17 @@ fsm_performance_test(Config) -> VP -> VP end, - io:format(FileHandle, "~p,~p,~p,~p,~p,~p,~p,~p,~p,~p,~p~n", [kvs, Backend, Concurrency, NumChannels, MonotonicChannels, Parallelism, Partitioned, BytesSize, NumMessages, Latency, Time]), + case Tdiffs of + [] -> + io:format(FileHandle, "~p,~p,~p,~p,~p,~p,~p,~p,~p,~p,~p~n", [kvs, Backend, Concurrency, NumChannels, MonotonicChannels, Parallelism, Partitioned, BytesSize, NumMessages, Latency, Time]); + Tdiffs when is_list(Tdiffs) -> + lists:foreach(fun(Tdiff) -> + io:format(FileHandle, "~p,~p,~p,~p,~p,~p,~p,~p,~p,~p,~p~n", [kvs, Backend, Concurrency, NumChannels, MonotonicChannels, Parallelism, Partitioned, BytesSize, NumMessages, Latency, Tdiff]) + end, Tdiffs) + end, file:close(FileHandle), - ct:pal("Value: ~p, Time: ~p", [Value, Time]), + ct:pal("Time: ~p", [Time]), %% Stop nodes. ?SUPPORT:stop(Nodes), @@ -775,12 +809,22 @@ rand_bits(Bits) -> Result. %% @private -echo_sender(BenchPid, _SenderNum, _EchoBinary, 0) -> - BenchPid ! done, +echo_sender(BenchPid, _SenderNum, _EchoBinary, 0, Tdiffs) -> + BenchPid ! {done, Tdiffs}, ok; -echo_sender(BenchPid, SenderNum, EchoBinary, Count) -> - unir:echo(EchoBinary), - echo_sender(BenchPid, SenderNum, EchoBinary, Count - 1). +echo_sender(BenchPid, SenderNum, EchoBinary, Count, Tdiffs) -> + receive + done -> + lager:info("Timer expired for experiment!"), + BenchPid ! {done, Tdiffs} + after + 0 -> + StartTime = erlang:timestamp(), + unir:echo(EchoBinary), + EndTime = erlang:timestamp(), + Tdiff = timer:now_diff(EndTime, StartTime), + echo_sender(BenchPid, SenderNum, EchoBinary, Count - 1, Tdiffs ++ [Tdiff]) + end. %% @private init_echo_sender(BenchPid, SenderNum, EchoBinary, Count) -> @@ -788,34 +832,54 @@ init_echo_sender(BenchPid, SenderNum, EchoBinary, Count) -> start -> ok end, - echo_sender(BenchPid, SenderNum, EchoBinary, Count). + timer:send_after(120 * 1000, done), + echo_sender(BenchPid, SenderNum, EchoBinary, Count, []). %% @private -fsm_sender(BenchPid, _SenderNum, _EchoBinary, Success, Failure, 0) -> - BenchPid ! {done, Success, Failure}, +fsm_sender(BenchPid, _SenderNum, _EchoBinary, Success, Failure, 0, Tdiffs) -> + BenchPid ! {done, Tdiffs}, ok; -fsm_sender(BenchPid, SenderNum, EchoBinary, Success, Failure, Count) -> - %% Normal distribution over 10000 keys. - RandomNumber = trunc((rand:normal() + 1) * 5000), - - %% Craft object name. - ObjectName = list_to_binary("object" ++ integer_to_list(RandomNumber)), +fsm_sender(BenchPid, SenderNum, EchoBinary, Success, Failure, Count, Tdiffs) -> + receive + done -> + lager:info("Timer expired for experiment!"), + BenchPid ! {done, Tdiffs} + after + 0 -> + StartTime = erlang:timestamp(), + %% Normal distribution over 10000 keys. + RandomNumber = trunc((rand:normal() + 1) * 5000), + + %% Craft object name. + ObjectName = list_to_binary("object" ++ integer_to_list(RandomNumber)), + + case Count rem 100 == 0 of + true -> + lager:info("~p has ~p messages remaining to be sent...", [self(), Count]); + _ -> + ok + end, - %% 50/50 read/write workload. - case Count rem 2 == 0 of - true -> - case unir:fsm_put(ObjectName, EchoBinary) of - {ok, _Val} -> - fsm_sender(BenchPid, SenderNum, EchoBinary, Success + 1, Failure, Count - 1); - {error, timeout} -> - fsm_sender(BenchPid, SenderNum, EchoBinary, Success, Failure + 1, Count - 1) - end; - false -> - case unir:fsm_get(ObjectName) of - {ok, _Val} -> - fsm_sender(BenchPid, SenderNum, EchoBinary, Success + 1, Failure, Count - 1); - {error, timeout} -> - fsm_sender(BenchPid, SenderNum, EchoBinary, Success, Failure + 1, Count - 1) + %% 90/10 read/write workload. + case Count rem 10 == 0 of + true -> + case unir:fsm_put(ObjectName, EchoBinary) of + {ok, _Val} -> + EndTime = erlang:timestamp(), + Tdiff = timer:now_diff(EndTime, StartTime), + fsm_sender(BenchPid, SenderNum, EchoBinary, Success + 1, Failure, Count - 1, Tdiffs ++ [Tdiff]); + {error, timeout} -> + fsm_sender(BenchPid, SenderNum, EchoBinary, Success, Failure + 1, Count - 1, Tdiffs) + end; + false -> + case unir:fsm_get(ObjectName) of + {ok, _Val} -> + EndTime = erlang:timestamp(), + Tdiff = timer:now_diff(EndTime, StartTime), + fsm_sender(BenchPid, SenderNum, EchoBinary, Success + 1, Failure, Count - 1, Tdiffs ++ [Tdiff]); + {error, timeout} -> + fsm_sender(BenchPid, SenderNum, EchoBinary, Success, Failure + 1, Count - 1, Tdiffs) + end end end. @@ -825,7 +889,8 @@ init_fsm_sender(BenchPid, SenderNum, EchoBinary, Count) -> start -> ok end, - fsm_sender(BenchPid, SenderNum, EchoBinary, 0, 0, Count). + timer:send_after(120 * 1000, done), + fsm_sender(BenchPid, SenderNum, EchoBinary, 0, 0, Count, []). %% @private root_path(Config) -> @@ -861,39 +926,52 @@ monotonic_channels() -> %% @private bench_receiver(Count) -> - bench_receiver(0, 0, Count). + bench_receiver(0, 0, Count, []). %% @private -bench_receiver(Success, Failure, 0) -> +bench_receiver(Success, Failure, 0, Tdiffs) -> ct:pal("Success: ~p, Failure: ~p", [Success, Failure]), - ok; -bench_receiver(Success, Failure, Count) -> + lists:flatten(Tdiffs); +bench_receiver(Success, Failure, Count, Tdiffs) -> ct:pal("Waiting for ~p processes to finish...", [Count]), receive done -> - ct:pal("Received, but still waiting for ~p", [Count -1]), - bench_receiver(Success, Failure, Count - 1); + ct:pal("Received, but still waiting for ~p", [Count - 1]), + bench_receiver(Success, Failure, Count - 1, Tdiffs); + {done, Tdiff} -> + ct:pal("Received, but still waiting for ~p", [Count - 1]), + bench_receiver(Success, Failure, Count - 1, Tdiffs ++ [Tdiff]); {done, S, F} -> - ct:pal("Received; success: ~p, failure: ~p; but still waiting for ~p", [S, F, Count -1]), - bench_receiver(Success + S, Failure + F, Count - 1) + ct:pal("Received; success: ~p, failure: ~p; but still waiting for ~p", [S, F, Count - 1]), + bench_receiver(Success + S, Failure + F, Count - 1, Tdiffs) end. %% @private -receiver(_Manager, BenchPid, 0) -> - BenchPid ! done, +receiver(_Manager, BenchPid, 0, Tdiffs) -> + BenchPid ! {done, Tdiffs}, ok; -receiver(Manager, BenchPid, Count) -> +receiver(Manager, BenchPid, Count, Tdiffs) -> receive {_Message, _SourceNode, _SourcePid} -> - receiver(Manager, BenchPid, Count - 1) + receiver(Manager, BenchPid, Count - 1, Tdiffs); + {_Message, _SourceNode, SourcePid, StartTime} -> + EndTime = erlang:timestamp(), + SourcePid ! ok, + Tdiff = timer:now_diff(EndTime, StartTime), + receiver(Manager, BenchPid, Count - 1, Tdiffs ++ [Tdiff]) end. %% @private sender(_EchoBinary, _Manager, _DestinationNode, _DestinationPid, _PartitionKey, 0) -> ok; sender(EchoBinary, Manager, DestinationNode, DestinationPid, PartitionKey, Count) -> - Manager:forward_message(DestinationNode, undefined, DestinationPid, {EchoBinary, node(), self()}, [{partition_key, PartitionKey}]), + StartTime = erlang:timestamp(), + Manager:forward_message(DestinationNode, undefined, DestinationPid, {EchoBinary, node(), self(), StartTime}, [{partition_key, PartitionKey}]), + receive + ok -> + ok + end, sender(EchoBinary, Manager, DestinationNode, DestinationPid, PartitionKey, Count - 1). %% @private