Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for https://github.com/yacy/yacy_search_server/issues/363 We still need to set the load in the process because a demand for higher crawl speed may require to increase the maximum load limit. However, following the criticism in the bug, we do never reduce the load limit again.
Michael Peter Christen03bf25960101
diff --git a/source/net/yacy/htroot/Crawler_p.java b/source/net/yacy/htroot/Crawler_p.javaindex d6b19e883..e95562713 100644--- a/source/net/yacy/htroot/Crawler_p.java+++ b/source/net/yacy/htroot/Crawler_p.java@@ -799,10 +799,14 @@ public class Crawler_p {wPPM = 30000;}final int newBusySleep = 60000 / wPPM; // for wantedPPM = 10: 6000; for wantedPPM = 1000: 60- final float loadprereq = wantedPPM <= 10 ? 1.0f : wantedPPM <= 100 ? 2.0f : wantedPPM >= 1000 ? 8.0f : 3.0f;- BusyThread thread;+ // we must increase the load limit because a conservative load limit will prevent a high crawling speed+ // however this must not cause that the load limit is reduced again because that may go against the users requirements+ // in case they set the limit themself, see https://github.com/yacy/yacy_search_server/issues/363+ float loadprereq = wantedPPM <= 10 ? 1.0f : wantedPPM <= 100 ? 2.0f : wantedPPM >= 1000 ? 8.0f : 3.0f;+ loadprereq = Math.max(loadprereq, sb.getConfigFloat(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL_LOADPREREQ, loadprereq));+ BusyThread thread;thread = sb.getThread(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL);if ( thread != null ) {sb.setConfig(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL_BUSYSLEEP, thread.setBusySleep(newBusySleep));