Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
PerformanceProfile: don't change peerPing, peerSeed and cleanUp
danielr01e9c7320ec6
diff --git a/defaults/performance_dht.profile b/defaults/performance_dht.profileindex 753059a38..34714babf 100644--- a/defaults/performance_dht.profile+++ b/defaults/performance_dht.profile@@ -13,12 +13,6 @@20_dhtdistribution_idlesleep=500020_dhtdistribution_busysleep=200020_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=209715250_localcrawl_idlesleep=400050_localcrawl_busysleep=50050_localcrawl_busysleep__pro=100@@ -44,7 +38,4 @@82_crawlstack_idlesleep=500082_crawlstack_busysleep=182_crawlstack_memprereq=1048576-90_cleanup_idlesleep=300000-90_cleanup_busysleep=300000-90_cleanup_memprereq=0diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.javaindex e0b6e930b..9d76c6068 100644--- a/htroot/PerformanceQueues_p.java+++ b/htroot/PerformanceQueues_p.java@@ -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 loopsif (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 loopsif (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);