Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

update of memory-protection values see http://www.yacy-forum.de/viewtopic.php?p=35539#35539

orbiter46367afaaa93
diff --git a/source/de/anomic/kelondro/kelondroCache.java b/source/de/anomic/kelondro/kelondroCache.java
index 5c1f32bcb..30c817ea3 100644
--- a/source/de/anomic/kelondro/kelondroCache.java
+++ b/source/de/anomic/kelondro/kelondroCache.java
@@ -50,8 +50,8 @@ public class kelondroCache implements kelondroIndex {
// static object tracker; stores information about object cache usage
private static final TreeMap objectTracker = new TreeMap();
- private static long memStopGrow = 4000000; // a limit for the node cache to stop growing if less than this memory amount is available
- private static long memStartShrink = 2000000; // a limit for the node cache to start with shrinking if less than this memory amount is available
+ private static long memStopGrow = 10000000; // a limit for the node cache to stop growing if less than this memory amount is available
+ private static long memStartShrink = 6000000; // a limit for the node cache to start with shrinking if less than this memory amount is available
// class objects
private kelondroRowSet readHitCache;
diff --git a/source/de/anomic/kelondro/kelondroRecords.java b/source/de/anomic/kelondro/kelondroRecords.java
index e2ed97e21..f645244f7 100644
--- a/source/de/anomic/kelondro/kelondroRecords.java
+++ b/source/de/anomic/kelondro/kelondroRecords.java
@@ -127,8 +127,8 @@ public class kelondroRecords {
// static supervision objects: recognize and coordinate all activites
private static TreeMap recordTracker = new TreeMap(); // a String/filename - kelondroRecords mapping
- private static long memStopGrow = 4000000; // a limit for the node cache to stop growing if less than this memory amount is available
- private static long memStartShrink = 2000000; // a limit for the node cache to start with shrinking if less than this memory amount is available
+ private static long memStopGrow = 10000000; // a limit for the node cache to stop growing if less than this memory amount is available
+ private static long memStartShrink = 6000000; // a limit for the node cache to start with shrinking if less than this memory amount is available
// values that are only present at run-time
protected String filename; // the database's file name
diff --git a/source/de/anomic/plasma/plasmaSearchEvent.java b/source/de/anomic/plasma/plasmaSearchEvent.java
index f9163d12c..9d7e1e841 100644
--- a/source/de/anomic/plasma/plasmaSearchEvent.java
+++ b/source/de/anomic/plasma/plasmaSearchEvent.java
@@ -407,7 +407,7 @@ public final class plasmaSearchEvent extends Thread implements Runnable {
// start url-fetch
long postorderTime = profileLocal.getTargetTime(plasmaSearchTimingProfile.PROCESS_POSTSORT);
- System.out.println("DEBUG: postorder-final (urlfetch) maxtime = " + postorderTime);
+ //System.out.println("DEBUG: postorder-final (urlfetch) maxtime = " + postorderTime);
long postorderLimitTime = (postorderTime < 0) ? Long.MAX_VALUE : (System.currentTimeMillis() + postorderTime);
profileLocal.startTimer();
plasmaSearchPostOrder acc = new plasmaSearchPostOrder(query, ranking);
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 5b9879ce2..658869c8b 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -1065,11 +1065,12 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
wordIndex.setInMaxWordCount(wordInCacheMaxCount);
wordIndex.setWordFlushSize((int) getConfigLong("wordFlushSize", 1000));
- // set a minimum amount of memory for the indexer thread
- long memprereq = wordIndex.minMem();
- //setConfig(INDEXER_MEMPREREQ, memprereq);
- kelondroRecords.setCacheGrowStati(memprereq + 2 * 1024 * 1024, memprereq);
- kelondroCache.setCacheGrowStati(memprereq + 2 * 1024 * 1024, memprereq);
+ // set a maximum amount of memory for the caches
+ long memprereq = Math.max(getConfigLong(INDEXER_MEMPREREQ, 0), wordIndex.minMem());
+ // setConfig(INDEXER_MEMPREREQ, memprereq);
+ //setThreadPerformance(INDEXER, getConfigLong(INDEXER_IDLESLEEP, 0), getConfigLong(INDEXER_BUSYSLEEP, 0), memprereq);
+ kelondroRecords.setCacheGrowStati(memprereq + 4 * 1024 * 1024, memprereq + 2 * 1024 * 1024);
+ kelondroCache.setCacheGrowStati(memprereq + 4 * 1024 * 1024, memprereq + 2 * 1024 * 1024);
// make parser
log.logConfig("Starting Parser");
@@ -1861,12 +1862,12 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
if (yacyCore.newsPool.automaticProcess() > 0) hasDoneSomething = true;
} catch (IOException e) {}
- // set new memory limit for indexer thread
+ // set a maximum amount of memory for the caches
long memprereq = Math.max(getConfigLong(INDEXER_MEMPREREQ, 0), wordIndex.minMem());
- //setConfig(INDEXER_MEMPREREQ, memprereq);
+ // setConfig(INDEXER_MEMPREREQ, memprereq);
//setThreadPerformance(INDEXER, getConfigLong(INDEXER_IDLESLEEP, 0), getConfigLong(INDEXER_BUSYSLEEP, 0), memprereq);
- kelondroRecords.setCacheGrowStati(memprereq + 2 * 1024 * 1024, memprereq);
- kelondroCache.setCacheGrowStati(memprereq + 2 * 1024 * 1024, memprereq);
+ kelondroRecords.setCacheGrowStati(memprereq + 4 * 1024 * 1024, memprereq + 2 * 1024 * 1024);
+ kelondroCache.setCacheGrowStati(memprereq + 4 * 1024 * 1024, memprereq + 2 * 1024 * 1024);
// update the cluster set
this.clusterhashes = yacyCore.seedDB.clusterHashes(getConfig("cluster.peers.yacydomain", ""));
diff --git a/yacy.init b/yacy.init
index a6cb52135..eae48cf34 100644
--- a/yacy.init
+++ b/yacy.init
@@ -325,7 +325,7 @@ use_proxyAccounts=false
# because the p2p-index-sharing function will use the http server for
# data exchange.
# example
-#serverAccount=dicke:berta
+#serverAccount=admin:mysecretpassword
serverAccount=
serverAccountBase64MD5=
@@ -334,7 +334,7 @@ serverAccountBase64MD5=
# should be set to a secret. By default it is without a password
# but you are encouraged to set it to another value on the page
# http://localhost:8080/
-#adminAccount=admin:anomic
+#adminAccount=admin:mysecretpassword
adminAccount=
adminAccountBase64MD5=
@@ -395,7 +395,6 @@ peerCycle=2
# - process any job only if we are online, which is technically only the case
# if the proxy is used -> mode 1
# - process jobs periodically, with periodes according to peerCycle -> mode 2
-#onlineMode=1
onlineMode=2
# Debug mode for YACY network: this will trigger that also local ip's are
@@ -615,7 +614,7 @@ javastart_priority=0
# flushed to disc; this may last some minutes.
wordCacheMaxCount = 20000
wordCacheInitCount = 30000
-wordFlushSize = 1000;
+wordFlushSize = 500;
# Specifies if yacy can be used as transparent http proxy.
#
@@ -635,7 +634,7 @@ isTransparentProxy=false
connectionKeepAliveSupport=true
# Specifies the timeout the proxy sould use
-proxy.clientTimeout = 10000
+proxy.clientTimeout = 30000
# Specifies if the proxy should send the via header according to RFC
proxy.sendViaHeader=true
@@ -666,7 +665,7 @@ msgForwardingCmd=/usr/sbin/sendmail
msgForwardingTo=root@localhost
#onlineCautionDelay: delay time after proxy usage before crawling is resumed
-onlineCautionDelay=30000
+onlineCautionDelay=10000
# Some configuration values for the crawler
crawler.clientTimeout=9000