Author: toad
Date: 2008-09-25 22:55:43 +0000 (Thu, 25 Sep 2008)
New Revision: 22840

Modified:
   trunk/freenet/src/freenet/node/Node.java
Log:
Explain why we pad by default


Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2008-09-25 22:19:46 UTC (rev 
22839)
+++ trunk/freenet/src/freenet/node/Node.java    2008-09-25 22:55:43 UTC (rev 
22840)
@@ -1600,6 +1600,16 @@
                maxStoreKeys = maxTotalKeys / 2;
                maxCacheKeys = maxTotalKeys - maxStoreKeys;

+               /*
+                * On Windows, setting the file length normally involves 
writing lots of zeros.
+                * So it's an uninterruptible system call that takes a loooong 
time. On OS/X,
+                * presumably the same is true. If the RNG is fast enough, this 
means that
+                * setting the length and writing random data take exactly the 
same amount
+                * of time. On most versions of Unix, holes can be created. 
However on all
+                * systems, predictable disk usage is a good thing. So lets 
turn it on by
+                * default for now, on all systems. The datastore can be read 
but mostly not 
+                * written while the random data is being written.
+                */
                nodeConfig.register("storePreallocate", true, sortOrder++, 
true, false, "Node.storePreallocate", "Node.storePreallocateLong", 
                                new BooleanCallback() {
                                        @Override


Reply via email to