From dd44a1394fb7cec98061ab25d293c99a38cf7aef Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 2 May 2007 15:39:27 +0000 Subject: [PATCH] disabled automatic performance setting change - during crawl start - each indexing cycle - for delay values - for short memory cycles git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3634 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/IndexCreate_p.html | 11 -------- htroot/PerformanceQueues_p.html | 2 +- htroot/PerformanceQueues_p.java | 4 ++- htroot/WatchCrawler_p.java | 2 -- .../de/anomic/plasma/plasmaSwitchboard.java | 25 ++++++------------- 5 files changed, 12 insertions(+), 32 deletions(-) diff --git a/htroot/IndexCreate_p.html b/htroot/IndexCreate_p.html index fd586fbeb..0d8ee9c78 100644 --- a/htroot/IndexCreate_p.html +++ b/htroot/IndexCreate_p.html @@ -203,17 +203,6 @@ --> - Wanted Performance: - -
- : PPM
- - - - Set wanted level of computing power, used for this and other running crawl tasks. (PPM = pages per minute) - - - diff --git a/htroot/PerformanceQueues_p.html b/htroot/PerformanceQueues_p.html index a77af9fb9..f2e703ef1 100644 --- a/htroot/PerformanceQueues_p.html +++ b/htroot/PerformanceQueues_p.html @@ -52,7 +52,7 @@ milliseconds milliseconds kbytes - #[longdescr]# + #[longdescr]##(recommendation)#::
recommended: #[value]##(/recommendation)# #{/table}# diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java index c41d269c9..37fc51b43 100644 --- a/htroot/PerformanceQueues_p.java +++ b/htroot/PerformanceQueues_p.java @@ -174,7 +174,9 @@ public class PerformanceQueues_p { prop.put("table_" + c + "_busysleep", busysleep); prop.put("table_" + c + "_memprereq", memprereq / 1024); // disallow setting of memprereq for indexer to prevent db from throwing OOMs - prop.put("table_" + c + "_disabled", (threadName.endsWith("_indexing")) ? 1 : 0); + prop.put("table_" + c + "_disabled", /*(threadName.endsWith("_indexing")) ? 1 :*/ 0); + prop.put("table_" + c + "_recommendation", (threadName.endsWith("_indexing")) ? 1 : 0); + prop.put("table_" + c + "_recommendation_value", (threadName.endsWith("_indexing")) ? ((switchboard.wordIndex.minMem() + 2 * 1024 * 1024)/1024) : 0); c++; } prop.put("table", c); diff --git a/htroot/WatchCrawler_p.java b/htroot/WatchCrawler_p.java index 19c250fab..47f2b1381 100644 --- a/htroot/WatchCrawler_p.java +++ b/htroot/WatchCrawler_p.java @@ -143,8 +143,6 @@ public class WatchCrawler_p { boolean xpstopw = post.get("xpstopw", "off").equals("on"); env.setConfig("xpstopw", (xpstopw) ? "true" : "false"); - setPerformance(switchboard, post); - String crawlingMode = post.get("crawlingMode","url"); if (crawlingMode.equals("url")) { // getting the crawljob start url diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index ee360bc1a..b4782f485 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -1060,11 +1060,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser wordIndex.setWordFlushSize((int) getConfigLong("wordFlushSize", 1000)); // set a minimum amount of memory for the indexer thread - long memprereq = Math.max(getConfigLong(INDEXER_MEMPREREQ, 0), wordIndex.minMem()); - long memprereq1 = memprereq + (memprereq / 8) + 2 * 1024 * 1024; - setConfig(INDEXER_MEMPREREQ, memprereq); - kelondroRecords.setCacheGrowStati(memprereq1, memprereq); - kelondroCache.setCacheGrowStati(memprereq1, memprereq); + long memprereq = wordIndex.minMem(); + //setConfig(INDEXER_MEMPREREQ, memprereq); + kelondroRecords.setCacheGrowStati(memprereq + 2 * 1024 * 1024, memprereq); + kelondroCache.setCacheGrowStati(memprereq + 2 * 1024 * 1024, memprereq); // make parser log.logConfig("Starting Parser"); @@ -1699,11 +1698,6 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser log.logFine("deQueue: online caution, omitting resource stack processing"); return false; } - - if ((sbQueue.size() == 0) && ((getThread(CRAWLJOB_LOCAL_CRAWL).getJobCount() == 0))) { - long sleep = getConfigLong(INDEX_DIST_BUSYSLEEP, 6000); - setPerformance((int) Math.max(120, 60000 / (sleep==0?1:sleep))); // if there is no activity, set low performance - } // flush some entries from the RAM cache if (sbQueue.size() == 0) wordIndex.flushCacheSome(); // permanent flushing only if we are not busy @@ -1861,13 +1855,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser // set new memory limit for indexer thread 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 + (memprereq / 8) + 2 * 1024 * 1024, memprereq); - kelondroCache.setCacheGrowStati(memprereq + (memprereq / 8) + 2 * 1024 * 1024, 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); // update the cluster set this.clusterhashes = yacyCore.seedDB.clusterHashes(getConfig("cluster.peers.yacydomain", ""));