Author: toad
Date: 2008-04-10 18:43:01 +0000 (Thu, 10 Apr 2008)
New Revision: 19152
Modified:
trunk/freenet/src/freenet/client/FECCodec.java
Log:
One thread up to 256MB. More consistent this way: 1 thread up to 256, then 2 at
256, 3 at 384 etc.
Modified: trunk/freenet/src/freenet/client/FECCodec.java
===================================================================
--- trunk/freenet/src/freenet/client/FECCodec.java 2008-04-10 18:31:03 UTC
(rev 19151)
+++ trunk/freenet/src/freenet/client/FECCodec.java 2008-04-10 18:43:01 UTC
(rev 19152)
@@ -368,10 +368,8 @@
Runtime r = Runtime.getRuntime();
int max = r.availableProcessors(); // FIXME this may
change in a VM, poll it
long maxMemory = r.maxMemory();
- if(maxMemory < 128*1024*1024) {
+ if(maxMemory < 256*1024*1024) {
max = 1;
- } else if(maxMemory < 256*1024*1024) {
- max = Math.min(max, 2);
} else {
// Measured 11MB decode 8MB encode on amd64.
// No more than 10% of available RAM, so 110MB
for each extra processor.