From b68d06a6e8445f819f277688662be35047b298c6 Mon Sep 17 00:00:00 2001 From: lotus Date: Wed, 10 Sep 2008 12:52:17 +0000 Subject: [PATCH] performance settings based on network's remote crawl speed removed some _pro values from config git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5134 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- defaults/performance_dht.profile | 4 ---- defaults/yacy.init | 2 -- htroot/PerformanceQueues_p.java | 13 ++++++++----- source/de/anomic/plasma/plasmaSwitchboard.java | 2 +- .../anomic/plasma/plasmaSwitchboardConstants.java | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/defaults/performance_dht.profile b/defaults/performance_dht.profile index 34714babf..d174d27a6 100644 --- a/defaults/performance_dht.profile +++ b/defaults/performance_dht.profile @@ -15,13 +15,10 @@ 20_dhtdistribution_memprereq=6291456 50_localcrawl_idlesleep=4000 50_localcrawl_busysleep=500 -50_localcrawl_busysleep__pro=100 50_localcrawl_memprereq=4194304 50_localcrawl_isPaused=false 60_remotecrawlloader_idlesleep=60000 -60_remotecrawlloader_idlesleep__pro=10000 60_remotecrawlloader_busysleep=40000 -60_remotecrawlloader_busysleep__pro=2000 60_remotecrawlloader_memprereq=2097152 60_remotecrawlloader_isPaused=false 62_remotetriggeredcrawl_idlesleep=10000 @@ -33,7 +30,6 @@ 70_cachemanager_memprereq=1048576 80_indexing_idlesleep=1000 80_indexing_busysleep=100 -80_indexing_busysleep__pro=10 80_indexing_memprereq=6291456 82_crawlstack_idlesleep=5000 82_crawlstack_busysleep=1 diff --git a/defaults/yacy.init b/defaults/yacy.init index dc6bd3877..48c1b9b6f 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -555,7 +555,6 @@ performanceSpeed=100 40_peerseedcycle_memprereq=2097152 50_localcrawl_idlesleep=2000 50_localcrawl_busysleep=50 -50_localcrawl_busysleep__pro=0 50_localcrawl_memprereq=4194304 50_localcrawl_isPaused=false 60_remotecrawlloader_idlesleep=60000 @@ -571,7 +570,6 @@ performanceSpeed=100 70_cachemanager_memprereq=1048576 80_indexing_idlesleep=1000 80_indexing_busysleep=10 -80_indexing_busysleep__pro=0 80_indexing_memprereq=6291456 82_crawlstack_idlesleep=5000 82_crawlstack_busysleep=0 diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java index 8cb3133f8..ae1abdcbf 100644 --- a/htroot/PerformanceQueues_p.java +++ b/htroot/PerformanceQueues_p.java @@ -166,12 +166,15 @@ public class PerformanceQueues_p { // check values to prevent short-cut loops if (idlesleep < 1000) idlesleep = 1000; if (threadName.equals("10_httpd")) { idlesleep = 0; busysleep = 0; memprereq = 0; } - if ((threadName.equals("50_localcrawl")) && (busysleep < 100)) busysleep = 100; - if ((threadName.equals("61_globalcrawltrigger")) && (busysleep < 100)) busysleep = 100; - if ((threadName.equals("62_remotetriggeredcrawl")) && (busysleep < 100)) busysleep = 100; + if (threadName.equals(plasmaSwitchboardConstants.CRAWLJOB_LOCAL_CRAWL) && (busysleep < 50)) busysleep = 50; if (threadName.equals("autoReCrawl")) { idlesleep = 3600000; busysleep = 3600000; memprereq = -1; } - - onTheFlyReconfiguration(switchboard, threadName, idlesleep, busysleep, memprereq); + + if (threadName.equals(plasmaSwitchboardConstants.CRAWLJOB_REMOTE_CRAWL_LOADER) + || threadName.equals(plasmaSwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL)) { + switchboard.setRemotecrawlPPM(Math.max(1, (int) (switchboard.getConfigLong("network.unit.remotecrawl.speed", 60) / multiplier))); + } else { + onTheFlyReconfiguration(switchboard, threadName, idlesleep, busysleep, memprereq); + } } prop.put("table_" + c + "_idlesleep", idlesleep); prop.put("table_" + c + "_busysleep", busysleep); diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index 8e31e2b68..d39da4668 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -763,7 +763,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitchpublic static final String CRAWLJOB_REMOTE_CRAWL_LOADER = "60_remotecrawlloader"

*

Name of the remote crawl list loading thread