gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r4125 - in GNUnet: contrib src/applications/dht/module src/


From: grothoff
Subject: [GNUnet-SVN] r4125 - in GNUnet: contrib src/applications/dht/module src/applications/dstore
Date: Sat, 30 Dec 2006 05:57:46 -0800 (PST)

Author: grothoff
Date: 2006-12-30 05:57:42 -0800 (Sat, 30 Dec 2006)
New Revision: 4125

Modified:
   GNUnet/contrib/config-daemon.scm
   GNUnet/src/applications/dht/module/routing.c
   GNUnet/src/applications/dstore/dstore.c
Log:
additional options

Modified: GNUnet/contrib/config-daemon.scm
===================================================================
--- GNUnet/contrib/config-daemon.scm    2006-12-30 07:56:45 UTC (rev 4124)
+++ GNUnet/contrib/config-daemon.scm    2006-12-30 13:57:42 UTC (rev 4125)
@@ -676,7 +676,7 @@
  (builder
   "GAP"
   "TABLESIZE"
-  (_ "Size of the routing table.")
+  (_ "Size of the routing table for anonymous routing.")
   (nohelp)
   '()
   #t
@@ -684,7 +684,19 @@
   (cons 1024 1048576)
   'rare))
 
+(define (fs-gap-tablesize builder)
+ (builder
+  "DHT"
+  "TABLESIZE"
+  (_ "Size of the routing table for DHT routing.")
+  (nohelp)
+  '()
+  #t
+  1024
+  (cons 128 1048576)
+  'rare))
 
+
 (define (fs-activemigration builder)
  (builder
   "FS"
@@ -699,6 +711,21 @@
   #f
   #f
   'advanced))
+
+
+(define (dstore-quota builder)
+ (builder
+  "DSTORE"
+  "QUOTA"
+  (_ "MB of diskspace GNUnet can use for caching DHT index data (the data will 
be stored in /tmp)")
+  (_ "DHT index data is inherently small and expires comparatively quickly.  
It is deleted whenever gnunetd is shut down.
+
+The size of the DSTORE QUOTA is specified in MB.")
+  '()
+  #t
+  1
+  (cons 1 1024)
+  'rare))
  
 
 (define (fs builder)
@@ -711,7 +738,9 @@
     (fs-quota builder)
     (fs-activemigration builder)
     (fs-gap-tablesize builder)
+    (fs-dht-tablesize builder)
     (mysql builder)
+    (dstore-quota builder)
   )
   #t
   #t

Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c        2006-12-30 07:56:45 UTC 
(rev 4124)
+++ GNUnet/src/applications/dht/module/routing.c        2006-12-30 13:57:42 UTC 
(rev 4125)
@@ -614,10 +614,20 @@
  * @return OK on success
  */
 int init_dht_routing(CoreAPIForApplication * capi) {
+  unsigned long long rts;
+  
   coreAPI = capi;
+  rts = 65536;
+  GC_get_configuration_value_number(coreAPI->cfg,
+                                   "DHT",
+                                   "TABLESIZE",
+                                   128,
+                                   1024 * 1024,
+                                   1024,
+                                   &rts);
   GROW(records,
        rt_size,
-       512);
+       rts);
   lock = MUTEX_CREATE(NO);
   stats = capi->requestService("stats");
   if (stats != NULL) {

Modified: GNUnet/src/applications/dstore/dstore.c
===================================================================
--- GNUnet/src/applications/dstore/dstore.c     2006-12-30 07:56:45 UTC (rev 
4124)
+++ GNUnet/src/applications/dstore/dstore.c     2006-12-30 13:57:42 UTC (rev 
4125)
@@ -465,7 +465,16 @@
   coreAPI = capi;
   api.get = &d_get;
   api.put = &d_put;
-  quota = 1024 * 1024; /* FIXME: allow user to configure */
+  GC_get_configuration_value_number(coreAPI->cfg,
+                                   "DSTORE",
+                                   "QUOTA",
+                                   1,
+                                   1024,
+                                   1,
+                                   &quota);
+  if (quota == 0) /* error */
+    quota = 1;
+  quota *= 1024 * 1024; 
   stats = capi->requestService("stats");
   if (stats != NULL) 
     stat_dstore_size = stats->create(gettext_noop("# bytes in dstore"));





reply via email to

[Prev in Thread] Current Thread [Next in Thread]