PerformanceProfile: don't change peerPing, peerSeed and cleanUp

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4938 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
danielr 17 years ago
parent 6bdd99e065
commit 01e9c7320e

@ -13,12 +13,6 @@
20_dhtdistribution_idlesleep=5000
20_dhtdistribution_busysleep=2000
20_dhtdistribution_memprereq=6291456
30_peerping_idlesleep=120000
30_peerping_busysleep=120000
30_peerping_memprereq=1048576
40_peerseedcycle_idlesleep=1800000
40_peerseedcycle_busysleep=1200000
40_peerseedcycle_memprereq=2097152
50_localcrawl_idlesleep=4000
50_localcrawl_busysleep=500
50_localcrawl_busysleep__pro=100
@ -44,7 +38,4 @@
82_crawlstack_idlesleep=5000
82_crawlstack_busysleep=1
82_crawlstack_memprereq=1048576
90_cleanup_idlesleep=300000
90_cleanup_busysleep=300000
90_cleanup_memprereq=0

@ -154,12 +154,16 @@ public class PerformanceQueues_p {
prop.putNum("table_" + c + "_execpercycle", (busyCycles == 0) ? -1 : exectime / busyCycles);
prop.putNum("table_" + c + "_memusepercycle", (busyCycles == 0) ? -1 : memuse / busyCycles / 1024);
// load with old values
idlesleep = switchboard.getConfigLong(threadName + "_idlesleep" , 1000);
busysleep = switchboard.getConfigLong(threadName + "_busysleep", 100);
memprereq = switchboard.getConfigLong(threadName + "_memprereq", 0);
if (setDelay) {
// load with new values
idlesleep = post.getLong(threadName + "_idlesleep", 1000);
busysleep = post.getLong(threadName + "_busysleep", 100);
memprereq = post.getLong(threadName + "_memprereq", 0) * 1024;
if (memprereq == 0) memprereq = sb.getConfigLong(threadName + "_memprereq", 0);
idlesleep = post.getLong(threadName + "_idlesleep", idlesleep);
busysleep = post.getLong(threadName + "_busysleep", busysleep);
memprereq = post.getLong(threadName + "_memprereq", memprereq) * 1024;
if (memprereq == 0) memprereq = switchboard.getConfigLong(threadName + "_memprereq", 0);
// check values to prevent short-cut loops
if (idlesleep < 1000) idlesleep = 1000;
@ -168,9 +172,9 @@ public class PerformanceQueues_p {
onTheFlyReconfiguration(switchboard, threadName, idlesleep, busysleep, memprereq);
} if (setProfile) {
// load with new values
idlesleep = (long) (Long.parseLong(d(defaultSettings.get(threadName + "_idlesleep"), "1000")) * multiplier);
busysleep = (long) (Long.parseLong(d(defaultSettings.get(threadName + "_busysleep"), "100")) * multiplier);
memprereq = (long) (Long.parseLong(d(defaultSettings.get(threadName + "_memprereq"), "0")) * multiplier);
idlesleep = (long) (Long.parseLong(d(defaultSettings.get(threadName + "_idlesleep"), String.valueOf(idlesleep))) * multiplier);
busysleep = (long) (Long.parseLong(d(defaultSettings.get(threadName + "_busysleep"), String.valueOf(busysleep))) * multiplier);
memprereq = (long) (Long.parseLong(d(defaultSettings.get(threadName + "_memprereq"), String.valueOf(memprereq))) * multiplier);
// check values to prevent short-cut loops
if (idlesleep < 1000) idlesleep = 1000;
@ -180,11 +184,6 @@ public class PerformanceQueues_p {
if ((threadName.equals("62_remotetriggeredcrawl")) && (busysleep < 100)) busysleep = 100;
onTheFlyReconfiguration(switchboard, threadName, idlesleep, busysleep, memprereq);
} else {
// load with old values
idlesleep = Long.parseLong(switchboard.getConfig(threadName + "_idlesleep" , "1000"));
busysleep = Long.parseLong(switchboard.getConfig(threadName + "_busysleep", "100"));
memprereq = Long.parseLong(switchboard.getConfig(threadName + "_memprereq", "0"));
}
prop.put("table_" + c + "_idlesleep", idlesleep);
prop.put("table_" + c + "_busysleep", busysleep);

Loading…
Cancel
Save