(no commit message)
[oweals/gnunet.git] / src / fs / fs.h
index d48af35b410cd65d5585e98ad911bb47c6ee83f5..ccd949c59b73f17a5d25484bec6c91299e17b365 100644 (file)
 #include "gnunet_block_lib.h"
 #include "block_fs.h"
 
+
+/**
+ * Maximum number of outgoing messages we queue per peer.
+ *
+ * Performance measurements for 2 peer setup for 50 MB file
+ * (with MAX_DATASTORE_QUEUE = 1 and RETRY_PROBABILITY_INV = 1):
+ *
+ *   2: 1700 kb/s, 1372 kb/s
+ *   8: 2117 kb/s, 1284 kb/s, 1112 kb/s
+ *  16: 3500 kb/s, 3200 kb/s, 3388 kb/s
+ *  32: 3441 kb/s, 3163 kb/s, 3277 kb/s
+ * 128: 1700 kb/s; 2010 kb/s, 3383 kb/s, 1156 kb/s
+ *
+ * Conclusion: 16 seems to be a pretty good value (stable
+ * and high performance, no excessive memory use).
+ */
+#define MAX_QUEUE_PER_PEER 16
+
 /**
  * Maximum size of the datastore queue for P2P operations.
+ * Needs to be large enough to queue MAX_QUEUE_PER_PEER
+ * operations for roughly the number of active (connected)
+ * peers.
  */
-#define MAX_DATASTORE_QUEUE 16
+#define MAX_DATASTORE_QUEUE (16 * MAX_QUEUE_PER_PEER)
 
 /**
  * Maximum number of blocks we keep in memory for migration.
  * be more efficient but will be more disruptive
  * as far as the scheduler is concerned.
  */
-#define HASHING_BLOCKSIZE (1024 * 1024)
+#define HASHING_BLOCKSIZE (1024 * 128)
 
 /**
  * Number of bits we set per entry in the bloomfilter.
@@ -1150,11 +1171,6 @@ GNUNET_FS_end_top (struct GNUNET_FS_Handle *h,
  */
 struct GNUNET_FS_Handle
 {
-  /**
-   * Scheduler.
-   */
-  struct GNUNET_SCHEDULER_Handle *sched;
-
   /**
    * Configuration to use.
    */