Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
re-inserted default value re-set button to performance queues and patched missing values for recent new queues
Michael Peter Christen931541d198ba
diff --git a/defaults/yacy.init b/defaults/yacy.initindex b3804ef7d..8dc36d1f2 100644--- a/defaults/yacy.init+++ b/defaults/yacy.init@@ -605,7 +605,7 @@ collection=user30_peerping_idlesleep=3000030_peerping_busysleep=3000030_peerping_memprereq=2097152-30_peerping_loadprereq=2.0+30_peerping_loadprereq=4.040_peerseedcycle_idlesleep=180000040_peerseedcycle_busysleep=120000040_peerseedcycle_memprereq=4194304@@ -629,6 +629,14 @@ collection=user70_surrogates_busysleep=070_surrogates_memprereq=1258291270_surrogates_loadprereq=8.0+720_ccimport_idlesleep=100+720_ccimport_busysleep=1000+720_ccimport_memprereq=1048576+720_ccimport_loadprereq=9.0+730_ccfilter_idlesleep=100+730_ccfilter_busysleep=1000+730_ccfilter_memprereq=1048576+730_ccfilter_loadprereq=9.080_searchresult_idlesleep=1000080_searchresult_busysleep=20080_searchresult_memprereq=0diff --git a/htroot/PerformanceQueues_p.html b/htroot/PerformanceQueues_p.htmlindex 6cf5ce64d..d3c73f52c 100644--- a/htroot/PerformanceQueues_p.html+++ b/htroot/PerformanceQueues_p.html@@ -59,6 +59,7 @@<tr class="TableCellLight"><td align="left" colspan="19"><input type="submit" name="submitdelay" value="Submit New Delay Values" />+ <input type="submit" name="submitdefault" value="Re-set to default" />Changes take effect immediately<br/></td></tr>diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.javaindex 9de319a04..a1741ba7e 100644--- a/htroot/PerformanceQueues_p.java+++ b/htroot/PerformanceQueues_p.java@@ -125,7 +125,6 @@ public class PerformanceQueues_p {int c = 0;long idleCycles, busyCycles, memshortageCycles;// set profile?- final double multiplier = (post != null) && post.containsKey("profileSpeed") ? 100.0 / post.getFloat("profileSpeed", 100.0f) : 1.0;final boolean setProfile = (post != null && post.containsKey("submitdefault"));final boolean setDelay = (post != null) && (post.containsKey("submitdelay"));// save used settings file to config@@ -197,22 +196,16 @@ public class PerformanceQueues_p {busysleep = sb.getConfigLong(threadName + "_busysleep", busysleep);}if (setProfile) {- if (threadName.equals(SwitchboardConstants.PEER_PING) ||- threadName.equals(SwitchboardConstants.SEED_UPLOAD) ||- threadName.equals(SwitchboardConstants.CLEANUP)) {- /* do not change any values */- } else {- // load with new values- 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;- if (threadName.equals("10_httpd")) { idlesleep = 0; busysleep = 0; memprereq = 0; loadprereq = 9; }- //if (threadName.equals(plasmaSwitchboardConstants.CRAWLJOB_LOCAL_CRAWL) && (busysleep < 50)) busysleep = 50;- sb.setThreadPerformance(threadName, idlesleep, busysleep, memprereq, loadprereq);- }+ // load with new values+ idlesleep = Long.parseLong(d(defaultSettings.get(threadName + "_idlesleep"), String.valueOf(idlesleep)));+ busysleep = Long.parseLong(d(defaultSettings.get(threadName + "_busysleep"), String.valueOf(busysleep)));+ memprereq = Long.parseLong(d(defaultSettings.get(threadName + "_memprereq"), String.valueOf(memprereq)));+ loadprereq = Double.parseDouble(d(defaultSettings.get(threadName + "_loadprereq"), String.valueOf(memprereq)));+ // check values to prevent short-cut loops+ if (idlesleep < 1000) idlesleep = 1000;+ if (threadName.equals("10_httpd")) { idlesleep = 0; busysleep = 0; memprereq = 0; loadprereq = 9; }+ //if (threadName.equals(plasmaSwitchboardConstants.CRAWLJOB_LOCAL_CRAWL) && (busysleep < 50)) busysleep = 50;+ sb.setThreadPerformance(threadName, idlesleep, busysleep, memprereq, loadprereq);}prop.put("table_" + c + "_idlesleep", idlesleep);prop.put("table_" + c + "_busysleep", busysleep);diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.javaindex 8e8df2174..45292f4b6 100644--- a/source/net/yacy/search/Switchboard.java+++ b/source/net/yacy/search/Switchboard.java@@ -1095,36 +1095,36 @@ public final class Switchboard extends serverSwitch {// content control: initialize list sync threaddeployThread(- "720_ccimport",- "Content Control Import",- "this is the content control import thread",- null,- new InstantBusyThread(- new SMWListSyncThread(this, sb.getConfig("contentcontrol.bookmarklist", "contentcontrol"), "Category:Content Source", "/?Url/?Filter/?Category/?Modification date", sb.getConfigBool(- "contentcontrol.smwimport.purgelistoninit", false)),- "run",- SwitchboardConstants.PEER_PING_METHOD_JOBCOUNT,- SwitchboardConstants.PEER_PING_METHOD_FREEMEM,- 3000,- 10000,- 3000,- 10000),- 2000);+ "720_ccimport",+ "Content Control Import",+ "this is the content control import thread",+ null,+ new InstantBusyThread(+ new SMWListSyncThread(this, sb.getConfig("contentcontrol.bookmarklist", "contentcontrol"), "Category:Content Source", "/?Url/?Filter/?Category/?Modification date", sb.getConfigBool(+ "contentcontrol.smwimport.purgelistoninit", false)),+ "run",+ SwitchboardConstants.PEER_PING_METHOD_JOBCOUNT,+ SwitchboardConstants.PEER_PING_METHOD_FREEMEM,+ 3000,+ 10000,+ 3000,+ 10000),+ 2000);deployThread(- "730_ccfilter",- "Content Control Filter",- "this is the content control filter update thread",- null,- new InstantBusyThread(- new ContentControlFilterUpdateThread(this),- "run",- SwitchboardConstants.PEER_PING_METHOD_JOBCOUNT,- SwitchboardConstants.PEER_PING_METHOD_FREEMEM,- 3000,- 10000,- 3000,- 10000),- 2000);+ "730_ccfilter",+ "Content Control Filter",+ "this is the content control filter update thread",+ null,+ new InstantBusyThread(+ new ContentControlFilterUpdateThread(this),+ "run",+ SwitchboardConstants.PEER_PING_METHOD_JOBCOUNT,+ SwitchboardConstants.PEER_PING_METHOD_FREEMEM,+ 3000,+ 10000,+ 3000,+ 10000),+ 2000);// set network-specific performance attributesif ( this.firstInit ) {