Author: j16sdiz
Date: 2008-09-05 15:48:39 +0000 (Fri, 05 Sep 2008)
New Revision: 22462

Modified:
   trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
   trunk/freenet/src/freenet/node/Node.java
Log:
default size of bloom filter

Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2008-09-05 
15:48:12 UTC (rev 22461)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2008-09-05 
15:48:39 UTC (rev 22462)
@@ -718,7 +718,7 @@
 Node.storeType=Store type (LEAVE THIS ALONE)
 Node.storeTypeLong=Datastore type. Currently this can be salt-hash (use a 
salted on-disk hashtable with bloom filter), bdb-index (use a 
BerkeleyDBFreenetStore to store the index, and keep the data in files on disk), 
or ram (keep the index and the data in RAM). Only use ram if you know what you 
are doing and have enough RAM to store all your data (and note it will not be 
saved on shutdown)! Changes will not take effect until Freenet has been 
restarted.
 Node.storeBloomFilterSize=Bloom filter size (total) in bytes
-Node.storeBloomFilterSizeLong=Bloom filter size (total) in bytes. Usually 
1/1500 the size of data store is more than enough. Set this to zero to disable 
bloom filter.
+Node.storeBloomFilterSizeLong=Bloom filter size (total) in bytes. Usually 
1/2048th the size of data store is more than enough. Set this to zero to 
disable bloom filter.
 Node.storeBloomFilterCounting=Use counting bloom filter?
 Node.storeBloomFilterCountingLong=Use 2-bit counting bloom filter? (don't 
touch this unless you know what you are doing) 
 Node.swapRInterval=Swap request send interval (ms)

Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2008-09-05 15:48:12 UTC (rev 
22461)
+++ trunk/freenet/src/freenet/node/Node.java    2008-09-05 15:48:39 UTC (rev 
22462)
@@ -1462,7 +1462,7 @@

                maxTotalKeys = maxTotalDatastoreSize / sizePerKey;

-               nodeConfig.register("storeBloomFilterSize", 0x3600000, 
sortOrder++, true, false, "Node.storeBloomFilterSize",
+               nodeConfig.register("storeBloomFilterSize", (int) 
Math.min(maxTotalDatastoreSize / 2048, 268435456), sortOrder++, true, false, 
"Node.storeBloomFilterSize",
                        "Node.storeBloomFilterSizeLong", new IntCallback() {
                                private Integer cachedBloomFilterSize;



Reply via email to