Browse Source

-more data

Christian Grothoff 8 years ago
parent
commit
537de3328e

+ 12 - 3
src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c

@@ -40,10 +40,19 @@
 
 /**
  * Maximum allowed result value for the scalarproduct computation.
- * DLOG will fail if the result is bigger.
+ * DLOG will fail if the result is bigger.  At 1 million, the
+ * precomputation takes about 2s on a fast machine.
  */
 #define MAX_RESULT (1024 * 1024)
 
+/**
+ * How many values should DLOG store in memory (determines baseline
+ * RAM consumption, roughly 100 bytes times the value given here).
+ * Should be about SQRT (MAX_RESULT), larger values will make the
+ * online computation faster.
+ */
+#define MAX_RAM (1024)
+
 /**
  * An encrypted element key-value pair.
  */
@@ -1162,8 +1171,8 @@ run (void *cls,
   };
 
   cfg = c;
-  edc = GNUNET_CRYPTO_ecc_dlog_prepare (MAX_RESULT /* max value */,
-                                        1024 /* RAM */);
+  edc = GNUNET_CRYPTO_ecc_dlog_prepare (MAX_RESULT,
+                                        MAX_RAM);
   /* Select a random 'a' value for Alice */
   GNUNET_CRYPTO_ecc_rnd_mpi (edc,
                              &my_privkey,

+ 12 - 9
src/scalarproduct/perf_scalarproduct.sh

@@ -2,15 +2,19 @@
 # Computes a simple scalar product, with configurable vector size.
 #
 # Some results (wall-clock for Alice+Bob, single-core, i7):
-# SIZE   2048-H(s)  2048-O(s)    1024-O(s)
-#  25     10          14            3
-#  50     17          21            5
-# 100     32          39            7
-# 200                 77           13
-# 400                149           23
-# 800                304           32
+# SIZE   2048-H(s)  2048-O(s)    1024-O(s)      ECC-2^20-H(s)  ECC-2^28-H(s)
+#  25     10          14            3              2               29
+#  50     17          21            5              2               29
+# 100     32          39            7              2               29
+# 200                 77           13              3               30
+# 400                149           23             OOR              31
+# 800                304           32             OOR              33
+
+# Bandwidth (including set intersection):
+#              RSA-2048       ECC
+# 800:         3846 kb       70 kb
 # Configure benchmark size:
-SIZE=1600
+SIZE=800
 #
 # Construct input vectors:
 INPUTALICE="-k CCC -e '"
@@ -54,4 +58,3 @@ gnunet-statistics $CFGBOB -s core | grep "bytes encrypted"
 echo "Terminating testbed..."
 # terminate the testbed
 kill $PID
-

+ 5 - 1
src/scalarproduct/scalarproduct.conf.in

@@ -8,6 +8,8 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-scalarproduct-alice.sock
 UNIX_MATCH_UID = NO
 UNIX_MATCH_GID = YES
 #OPTIONS = -L DEBUG
+#PREFIX = valgrind
+
 
 [scalarproduct-bob]
 AUTOSTART = @AUTOSTART@
@@ -20,4 +22,6 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-scalarproduct-bob.sock
 #ACCEPT_FROM6 = ::1;
 UNIX_MATCH_UID = NO
 UNIX_MATCH_GID = YES
-#OPTIONS = -L DEBUG
+#OPTIONS = -L DEBUG
+
+#PREFIX = valgrind