Explorar o código

Reproduction script for Figure 10 (scaling with the number of cores)

Ian Goldberg hai 1 ano
pai
achega
edf78e5fa7
Modificáronse 2 ficheiros con 131 adicións e 2 borrados
  1. 12 2
      Docker/repro
  2. 119 0
      repro/repro-scaling

+ 12 - 2
Docker/repro

@@ -175,12 +175,22 @@ if [ "$whichexps" = "small" -o "$whichexps" = "all" ]; then
     run 22 30ms 100mbit ${numops}
     run 24 30ms 100mbit ${numops}
 fi
-if [ "$whichexps" = "small" -o "$whichexps" = "scaling" -o "$whichexps" = "all" ]; then
-    # Figures s 7(a), 9(a), 10
+if [ "$whichexps" = "small" -o "$whichexps" = "all" ]; then
+    # Figures 7(a), 9(a)
     run 16 30ms 100mbit ${numops}
     run 20 30ms 100mbit ${numops}
     run 26 30ms 100mbit ${numops}
 fi
+if [ "$whichexps" = "scaling" ]; then
+    echo "Running scaling experiments..."
+    # Figure 10
+    runone read 16 30ms 100mbit ${numops} online 2P
+    runone read 20 30ms 100mbit ${numops} online 2P
+    runone read 26 30ms 100mbit ${numops} online 2P
+    runone read 16 30ms 100mbit ${numops} online 3P
+    runone read 20 30ms 100mbit ${numops} online 3P
+    runone read 26 30ms 100mbit ${numops} online 3P
+fi
 if [ "$whichexps" = "large" -o "$whichexps" = "all" ]; then
     echo "Running large experiments..."
     # Figure 9(a)

+ 119 - 0
repro/repro-scaling

@@ -0,0 +1,119 @@
+#!/bin/bash
+
+# This is the experiment that requires the most customization for your
+# hardware setup.  Ideally, set BASE_DUORAM_NUMA_P{0,1} to numactl
+# commands that use as disjoint resources as possible (separate NUMA
+# nodes if you have them, separate CPUs if not, or just seprarate
+# physical cores if not).  We'll set P2 to be the same as P0, since
+# P0/P1 and P2 don't do most of their work at the same time.
+#
+# The code will set the environment variables DUORAM_NUMA_P0,
+# DUORAM_NUMA_P1, and DUORAM_NUMA_P2 to use _subsets of the appropriate
+# size_ of the cores you specify here for each party.
+
+# e.g.:
+
+# You have at least two NUMA nodes, each with at least 32 cores:
+
+BASE_DUORAM_NUMA_P0="numactl -N 0 -m 0"
+BASE_DUORAM_NUMA_P1="numactl -N 1 -m 1"
+CORESLIST="4 8 16 32"
+
+# You have two 16-core CPUs (times 2 for hyperthreading); CPU 0 is cores
+# 0-15 and 32-47; CPU 1 is cores 16-31 and 48-63
+
+# BASE_DUORAM_NUMA_P0="numactl -C 0-15,32-47"
+# BASE_DUORAM_NUMA_P1="numactl -C 16-31,48-63"
+# CORESLIST="4 8 16 32"
+
+# You have one 16-core CPU (times 2 for hyperthreading); you won't be
+# able to run the 32-core (for each party) test.
+
+# BASE_DUORAM_NUMA_P0="numactl -C 0-7,16-23"
+# BASE_DUORAM_NUMA_P1="numactl -C 8-15,24-31"
+# CORESLIST="4 8 16"
+
+# Hopefully you don't have to touch anything below here when
+# customizing.
+
+# The number of operations to do
+numops=128
+if [ "$1" != "" ]; then
+    numops="$1"
+fi
+
+outputfile=$$.scaling.log
+
+cleanup() {
+    rm -f $outputfile
+    exit
+}
+
+trap cleanup EXIT SIGINT
+
+# Stop any running dockers
+./stop-all-dockers
+
+for c in $CORESLIST; do
+    echo
+    echo "Using $c cores..."
+    echo
+    export DUORAM_NUMA_P0="$BASE_DUORAM_NUMA_P0 numactl -C +0-$((c-1))"
+    export DUORAM_NUMA_P1="$BASE_DUORAM_NUMA_P1 numactl -C +0-$((c-1))"
+    export DUORAM_NUMA_P2="$BASE_DUORAM_NUMA_P0 numactl -C +0-$((c-1))"
+    export LOGSUFFIX=".${c}core"
+    # Duoram
+    echo
+    echo Running Duoram repro
+    echo
+    ( cd ../Docker && echo "Starting Duoram dockers" && echo && \
+        ./start-docker && ./repro scaling $numops && \
+        cat read_30ms_100mbit_${numops}_*.out.${c}core | \
+            docker exec -w /root/duoram/Docker -i duoram_p0 ./parse_logs | \
+            egrep 'DuoramOnln read .*s$' | sed -e "s/30ms/${c} 30ms/" | \
+            sort -k4 -n && \
+        echo "Stopping Duoram dockers" && \
+        echo && ./stop-docker ) | tee -a $outputfile
+    if [ ${PIPESTATUS[0]} != "0" ]; then
+        exit 1
+    fi
+
+    # Floram
+    echo
+    echo Running Floram repro
+    echo
+    ( cd floram-docker && echo "Starting Floram dockers" && echo && \
+        ./start-docker && ./repro scaling $numops && \
+        cat read_30ms_100mbit_${numops}.out.${c}core | \
+            docker exec -w /root -i floram_p0 ./parse_logs | \
+            egrep ' read .*s$' | sed -e "s/30ms/${c} 30ms/" | \
+            sort -k4 -n && \
+        echo "Stopping Floram dockers" && \
+        echo && ./stop-docker ) | tee -a $outputfile
+    if [ ${PIPESTATUS[0]} != "0" ]; then
+        exit 1
+    fi
+done
+
+echo
+echo "# Figure 10(a)"
+grep 'Floram read 16 ' $outputfile
+echo
+grep '2PDuoramOnln read 16 ' $outputfile
+echo
+grep '3PDuoramOnln read 16 ' $outputfile
+echo
+echo "# Figure 10(b)"
+grep 'Floram read 20 ' $outputfile
+echo
+grep '2PDuoramOnln read 20 ' $outputfile
+echo
+grep '3PDuoramOnln read 20 ' $outputfile
+echo
+echo "# Figure 10(c)"
+grep 'Floram read 26 ' $outputfile
+echo
+grep '2PDuoramOnln read 26 ' $outputfile
+echo
+grep '3PDuoramOnln read 26 ' $outputfile
+echo