Skip to content

Commit

Permalink
performance settings based on network's remote crawl speed
Browse files Browse the repository at this point in the history
removed some _pro values from config

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5134 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
lotus committed Sep 10, 2008
1 parent d60b2b1 commit b68d06a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
4 changes: 0 additions & 4 deletions defaults/performance_dht.profile
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions defaults/yacy.init
Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 8 additions & 5 deletions htroot/PerformanceQueues_p.java
Expand Up @@ -166,12 +166,15 @@ public static serverObjects respond(final httpRequestHeader header, final server
// 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);
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/plasma/plasmaSwitchboard.java
Expand Up @@ -763,7 +763,7 @@ public void switchNetwork(final String networkDefinition) {
setRemotecrawlPPM(Math.max(1, (int) getConfigLong("network.unit.remotecrawl.speed", 60)));
}

private void setRemotecrawlPPM(int ppm) {
public void setRemotecrawlPPM(int ppm) {
setConfig(plasmaSwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL_BUSYSLEEP, 60000 / ppm);
setConfig(plasmaSwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL_IDLESLEEP, Math.max(10000, 180000 / ppm));
setConfig(plasmaSwitchboardConstants.CRAWLJOB_REMOTE_CRAWL_LOADER_BUSYSLEEP, Math.max(15000, 1800000 / ppm));
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/plasma/plasmaSwitchboardConstants.java
Expand Up @@ -86,7 +86,7 @@ public final class plasmaSwitchboardConstants {
public static final String CRAWLJOB_LOCAL_CRAWL_METHOD_FREEMEM = null;
public static final String CRAWLJOB_LOCAL_CRAWL_IDLESLEEP = "50_localcrawl_idlesleep";
public static final String CRAWLJOB_LOCAL_CRAWL_BUSYSLEEP = "50_localcrawl_busysleep";
// 61_globalcawltrigger
// 60_remotecrawlloader
/**
* <p><code>public static final String <strong>CRAWLJOB_REMOTE_CRAWL_LOADER</strong> = "60_remotecrawlloader"</code></p>
* <p>Name of the remote crawl list loading thread</p>
Expand Down

0 comments on commit b68d06a

Please sign in to comment.