Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- performance settings refactoring: made headlines to fieldsets - show performance profiles more prominent for easier configuration
lotuscafa1a952f2f
diff --git a/defaults/yacy.init b/defaults/yacy.initindex dca26bb67..1c6879d9c 100644--- a/defaults/yacy.init+++ b/defaults/yacy.init@@ -542,6 +542,7 @@ filterOutStopwordsFromTopwords=true# the prereq-value is a memory pre-requisite: that much bytes must# be available/free in the heap; othervise the loop is not executed# and another idlesleep is performed+performanceProfile=defaults/yacy.init20_dhtdistribution_idlesleep=3000020_dhtdistribution_busysleep=1000020_dhtdistribution_memprereq=6291456diff --git a/htroot/PerformanceQueues_p.html b/htroot/PerformanceQueues_p.htmlindex 26986f889..dbeb09fce 100644--- a/htroot/PerformanceQueues_p.html+++ b/htroot/PerformanceQueues_p.html@@ -3,241 +3,249 @@<head><title>YaCy '#[clientname]#': Performance Settings of Queues and Processes</title>#%env/templates/metas.template%#+ <script type="text/javascript" src="js/html.js"></script></head>- <body id="PerformanceQueues">+ <body id="PerformanceQueues" onload="hide('expert_settings')">#%env/templates/header.template%##%env/templates/submenuConfig.template%#<h2>Performance Settings of Queues and Processes</h2>- <p>- <strong>Scheduled tasks overview and waiting time settings:</strong>- </p><form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">- <table border="0" cellpadding="2" cellspacing="1">- <tr class="TableHeader" valign="bottom">- <td>Thread</td>- <td>Queue Size</td>- <td colspan="2">Total<br />Block Time</td>- <td colspan="2">Total<br />Sleep Time</td>- <td colspan="2">Total<br />Exec Time</td>- <td>Total<br />Cycles</td>- <td>Idle<br />Cycles</td>- <td>Busy<br />Cycles</td>- <td>Short Mem<br />Cycles</td>- <td>Sleep Time<br />per Cycle<br />(millis)</td>- <td>Exec Time<br />per Busy-Cycle<br />(millis)</td>- <td>Memory Use<br />per Busy-Cycle<br />(kbytes)</td>- <td>Delay between<br />idle loops</td>- <td>Delay between<br />busy loops</td>- <td>Minimum of<br />Required Memory</td>- <td>Full Description</td>- </tr>- #{table}#- <tr class="TableCellDark">- <td align="left">#(hasurl)##[shortdescr]#::<a href="#[url]#">#[shortdescr]#</a>#(/hasurl)#</td>- <td align="right">#[queuesize]#</td>- <td align="right">#[blocktime]# sec</td>- <td align="right">#[blockpercent]#%</td>- <td align="right">#[sleeptime]# sec</td>- <td align="right">#[sleeppercent]#%</td>- <td align="right">#[exectime]# sec</td>- <td align="right">#[execpercent]#%</td>- <td align="right">#[totalcycles]#</td>- <td align="right">#[idlecycles]#</td>- <td align="right">#[busycycles]#</td>- <td align="right">#[memscycles]#</td>- <td align="right">#[sleeppercycle]#</td>- <td align="right">#[execpercycle]#</td>- <td align="right">#[memusepercycle]#</td>- <td align="right"><input name="#[threadname]#_idlesleep" size="7" maxlength="7" value="#[idlesleep]#" /> milliseconds</td>- <td align="right"><input name="#[threadname]#_busysleep" size="7" maxlength="7" value="#[busysleep]#" /> milliseconds</td>- <td align="right"><input name="#[threadname]#_memprereq" size="7" maxlength="10" value="#[memprereq]#" #(disabled)#:: disabled="disabled"#(/disabled)# /> kbytes</td>- <td align="left">#[longdescr]##(recommendation)#::<br/>recommended: #[value]# kbytes#(/recommendation)#</td>- </tr>- #{/table}#- <tr class="TableCellLight">- <td align="left" colspan="19">- <input type="submit" name="submitdelay" value="Submit New Delay Values" /> - Changes take effect immediately<br/>- <input type="submit" name="submitdefault" value="Use Default Profile:" />- <select name="defaultFile">- #{profile}#- <option value="#[filename]#">#[description]#</option>- #{/profile}#- </select> and use <select name="multiplier"><option value="0.5">200 %</option><option value="0.75">150 %</option><option value="1" selected="selected">100 %</option><option value="2">50 %</option><option value="3">33 %</option><option value="10">10 %</option></select> of the defiend performance.- </td>- </tr>- </table>+ <fieldset><legend>Use Default Profile:</legend>+ <p>+ <select name="defaultFile">+ #{profile}#+ <option value="#[filename]#"#(used)#:: selected="selected"#(/used)#>#[description]#</option>+ #{/profile}#+ </select> and use <select name="multiplier"><option value="0.5">200 %</option><option value="0.75">150 %</option><option value="1" selected="selected">100 %</option><option value="2">50 %</option><option value="3">33 %</option><option value="10">10 %</option></select> of the defiend performance.+ </p>+ <p><input type="submit" name="submitdefault" value="Save" /> Changes take effect immediately</p>+ </fieldset>++ <a href="javascript:show('expert_settings')">show expert settings</a>++ <div id="expert_settings">++ <fieldset><legend>Scheduled tasks overview and waiting time settings:</legend>+ <table border="0" cellpadding="2" cellspacing="1">+ <tr class="TableHeader" valign="bottom">+ <td>Thread</td>+ <td>Queue Size</td>+ <td colspan="2">Total<br />Block Time</td>+ <td colspan="2">Total<br />Sleep Time</td>+ <td colspan="2">Total<br />Exec Time</td>+ <td>Total<br />Cycles</td>+ <td>Idle<br />Cycles</td>+ <td>Busy<br />Cycles</td>+ <td>Short Mem<br />Cycles</td>+ <td>Sleep Time<br />per Cycle<br />(millis)</td>+ <td>Exec Time<br />per Busy-Cycle<br />(millis)</td>+ <td>Memory Use<br />per Busy-Cycle<br />(kbytes)</td>+ <td>Delay between<br />idle loops</td>+ <td>Delay between<br />busy loops</td>+ <td>Minimum of<br />Required Memory</td>+ <td>Full Description</td>+ </tr>+ #{table}#+ <tr class="TableCellDark">+ <td align="left">#(hasurl)##[shortdescr]#::<a href="#[url]#">#[shortdescr]#</a>#(/hasurl)#</td>+ <td align="right">#[queuesize]#</td>+ <td align="right">#[blocktime]# sec</td>+ <td align="right">#[blockpercent]#%</td>+ <td align="right">#[sleeptime]# sec</td>+ <td align="right">#[sleeppercent]#%</td>+ <td align="right">#[exectime]# sec</td>+ <td align="right">#[execpercent]#%</td>+ <td align="right">#[totalcycles]#</td>+ <td align="right">#[idlecycles]#</td>+ <td align="right">#[busycycles]#</td>+ <td align="right">#[memscycles]#</td>+ <td align="right">#[sleeppercycle]#</td>+ <td align="right">#[execpercycle]#</td>+ <td align="right">#[memusepercycle]#</td>+ <td align="right"><input name="#[threadname]#_idlesleep" size="7" maxlength="7" value="#[idlesleep]#" /> milliseconds</td>+ <td align="right"><input name="#[threadname]#_busysleep" size="7" maxlength="7" value="#[busysleep]#" /> milliseconds</td>+ <td align="right"><input name="#[threadname]#_memprereq" size="7" maxlength="10" value="#[memprereq]#" #(disabled)#:: disabled="disabled"#(/disabled)# /> kbytes</td>+ <td align="left">#[longdescr]##(recommendation)#::<br/>recommended: #[value]# kbytes#(/recommendation)#</td>+ </tr>+ #{/table}#+ <tr class="TableCellLight">+ <td align="left" colspan="19">+ <input type="submit" name="submitdelay" value="Submit New Delay Values" />+ Changes take effect immediately<br/>+ </td>+ </tr>+ </table>+ </fieldset></form>- <p>- <strong>Cache Settings:</strong>- </p><form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">- <table border="0" cellpadding="5" cellspacing="1">- <tr valign="top" class="TableHeader">- <td>Cache Type</td>- <td>DHT-Out</td>- <td>DHT-In</td>- <td>Description</td>- </tr>- <tr valign="top" class="TableCellDark">- <td>URLs in RAM buffer:</td>- <td colspan="2" align="center">#[urlCacheSize]#</td>- <td>- This is the size of the URL write buffer. Its purpose is to buffer incoming URLs- in case of search result transmission and during DHT transfer.- </td>- </tr>- <tr valign="top" class="TableCellDark">- <td>Words in RAM cache:<br />(Size in KBytes)</td>- <td>#[wordCacheWSize]#<br />(#[wordCacheWSizeKBytes]# KB)</td>- <td>#[wordCacheKSize]#<br />(#[wordCacheKSizeKBytes]# KB)</td>- <td>- This is the current size of the word caches.- The indexing cache speeds up the indexing process, the DHT cache holds indexes temporary for approval.- The maximum of this caches can be set below.- </td>- </tr>- <tr valign="top" class="TableCellDark">- <td>Maximum URLs currently assigned<br />to one cached word:</td>- <td>#[maxURLinWCache]#</td>- <td>#[maxURLinKCache]#</td>- <td>- This is the maximum size of URLs assigned to a single word cache entry.- If this is a big number, it shows that the caching works efficiently.- </td>- </tr>- <tr valign="top" class="TableCellDark">- <td>Maximum age of a word:</td>- <td>#[maxAgeOfWCache]#</td>- <td>#[maxAgeOfKCache]#</td>- <td>- This is the maximum age of a word in an index in minutes.- </td>- </tr>- <tr valign="top" class="TableCellDark">- <td>Minimum age of a word:</td>- <td>#[minAgeOfWCache]#</td>- <td>#[minAgeOfKCache]#</td>- <td>- This is the minimum age of a word in an index in minutes.- </td>- </tr>- <tr valign="top" class="TableCellDark">- <td>Maximum number of words in cache:</td>- <td colspan="2">- <input name="wordCacheMaxCount" type="text" size="10" maxlength="100" value="#[wordCacheMaxCount]#" />- </td>- <td>- This is is the number of word indexes that shall be held in the- ram cache during indexing. When YaCy is shut down, this cache must be- flushed to disc; this may last some minutes.- </td>- </tr>- <tr valign="top" class="TableCellDark">- <td>Initial space of words in cache:</td>- <td colspan="2">- <input name="wordCacheInitCount" type="text" size="10" maxlength="100" value="#[wordCacheInitCount]#" />- </td>- <td>- This is is the init size of space for words in cache.- </td>- </tr>- <tr valign="top" class="TableCellLight">- <td colspan="4">- <input type="submit" name="cacheSizeSubmit" value="Enter New Cache Size" />- Changes take effect immediately</td>- </tr>- </table>+ <fieldset><legend>Cache Settings:</legend>+ <table border="0" cellpadding="5" cellspacing="1">+ <tr valign="top" class="TableHeader">+ <td>Cache Type</td>+ <td>DHT-Out</td>+ <td>DHT-In</td>+ <td>Description</td>+ </tr>+ <tr valign="top" class="TableCellDark">+ <td>URLs in RAM buffer:</td>+ <td colspan="2" align="center">#[urlCacheSize]#</td>+ <td>+ This is the size of the URL write buffer. Its purpose is to buffer incoming URLs+ in case of search result transmission and during DHT transfer.+ </td>+ </tr>+ <tr valign="top" class="TableCellDark">+ <td>Words in RAM cache:<br />(Size in KBytes)</td>+ <td>#[wordCacheWSize]#<br />(#[wordCacheWSizeKBytes]# KB)</td>+ <td>#[wordCacheKSize]#<br />(#[wordCacheKSizeKBytes]# KB)</td>+ <td>+ This is the current size of the word caches.+ The indexing cache speeds up the indexing process, the DHT cache holds indexes temporary for approval.+ The maximum of this caches can be set below.+ </td>+ </tr>+ <tr valign="top" class="TableCellDark">+ <td>Maximum URLs currently assigned<br />to one cached word:</td>+ <td>#[maxURLinWCache]#</td>+ <td>#[maxURLinKCache]#</td>+ <td>+ This is the maximum size of URLs assigned to a single word cache entry.+ If this is a big number, it shows that the caching works efficiently.+ </td>+ </tr>+ <tr valign="top" class="TableCellDark">+ <td>Maximum age of a word:</td>+ <td>#[maxAgeOfWCache]#</td>+ <td>#[maxAgeOfKCache]#</td>+ <td>+ This is the maximum age of a word in an index in minutes.+ </td>+ </tr>+ <tr valign="top" class="TableCellDark">+ <td>Minimum age of a word:</td>+ <td>#[minAgeOfWCache]#</td>+ <td>#[minAgeOfKCache]#</td>+ <td>+ This is the minimum age of a word in an index in minutes.+ </td>+ </tr>+ <tr valign="top" class="TableCellDark">+ <td>Maximum number of words in cache:</td>+ <td colspan="2">+ <input name="wordCacheMaxCount" type="text" size="10" maxlength="100" value="#[wordCacheMaxCount]#" />+ </td>+ <td>+ This is is the number of word indexes that shall be held in the+ ram cache during indexing. When YaCy is shut down, this cache must be+ flushed to disc; this may last some minutes.+ </td>+ </tr>+ <tr valign="top" class="TableCellDark">+ <td>Initial space of words in cache:</td>+ <td colspan="2">+ <input name="wordCacheInitCount" type="text" size="10" maxlength="100" value="#[wordCacheInitCount]#" />+ </td>+ <td>+ This is is the init size of space for words in cache.+ </td>+ </tr>+ <tr valign="top" class="TableCellLight">+ <td colspan="4">+ <input type="submit" name="cacheSizeSubmit" value="Enter New Cache Size" />+ Changes take effect immediately</td>+ </tr>+ </table>+ </fieldset></form>- <p>- <strong>Balancer Settings:</strong>- </p>- <p>- This is the time delta between accessing of the same domain during a crawl. The crawl balancer tries to avoid that domains are- accessed too often, but if the balancer fails (i.e. if there are only links left from the same domain), then these minimum- delta times are ensured.- </p><form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">- <table border="0" cellpadding="2" cellspacing="1">- <tr class="TableHeader" valign="bottom">- <td>Crawler Domain</td>- <td>Minimum Access Time Delta</td>- </tr>- <tr class="TableCellDark">- <td>local (intranet) crawls</td>- <td align="right"><input id="minimumLocalDelta" name="minimumLocalDelta" type="text" size="20" maxlength="100" value="#[minimumLocalDelta]#" /></td>- </tr>- <tr class="TableCellDark">- <td>global (internet) crawls</td>- <td align="right"><input id="minimumGlobalDelta" name="minimumGlobalDelta" type="text" size="20" maxlength="100" value="#[minimumGlobalDelta]#" /></td>- </tr>- <tr class="TableCellLight">- <td align="left" colspan="2"><input type="submit" name="minimumDeltaSubmit" value="Enter New Parameters" />- Changes take effect immediately</td>- </tr>- </table>+ <fieldset><legend>Balancer Settings:</legend>+ <p>+ This is the time delta between accessing of the same domain during a crawl. The crawl balancer tries to avoid that domains are+ accessed too often, but if the balancer fails (i.e. if there are only links left from the same domain), then these minimum+ delta times are ensured.+ </p>+ <table border="0" cellpadding="2" cellspacing="1">+ <tr class="TableHeader" valign="bottom">+ <td>Crawler Domain</td>+ <td>Minimum Access Time Delta</td>+ </tr>+ <tr class="TableCellDark">+ <td>local (intranet) crawls</td>+ <td align="right"><input id="minimumLocalDelta" name="minimumLocalDelta" type="text" size="20" maxlength="100" value="#[minimumLocalDelta]#" /></td>+ </tr>+ <tr class="TableCellDark">+ <td>global (internet) crawls</td>+ <td align="right"><input id="minimumGlobalDelta" name="minimumGlobalDelta" type="text" size="20" maxlength="100" value="#[minimumGlobalDelta]#" /></td>+ </tr>+ <tr class="TableCellLight">+ <td align="left" colspan="2"><input type="submit" name="minimumDeltaSubmit" value="Enter New Parameters" />+ Changes take effect immediately</td>+ </tr>+ </table>+ </fieldset></form>- <p>- <strong>Thread Pool Settings:</strong>- </p><form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">- <table border="0" cellpadding="2" cellspacing="1">- <tr class="TableHeader" valign="bottom">- <td>Thread Pool</td>- <td>maximum Active</td>- <td>current Active</td>- </tr>- #{pool}#- <tr class="TableCellDark">- <td align="left">#[name]#</td>- <td align="right"><input name="#[name]#_maxActive" type="text" size="8" maxlength="8" value="#[maxActive]#" /></td>- <td align="right">#[numActive]#</td>- </tr>- #{/pool}#- <tr class="TableCellLight">- <td align="left" colspan="7">- <input type="submit" name="poolConfig" value="Enter new Threadpool Configuration" />- Changes take effect immediately</td>- </tr>- </table>+ <fieldset><legend>Thread Pool Settings:</legend>+ <table border="0" cellpadding="2" cellspacing="1">+ <tr class="TableHeader" valign="bottom">+ <td>Thread Pool</td>+ <td>maximum Active</td>+ <td>current Active</td>+ </tr>+ #{pool}#+ <tr class="TableCellDark">+ <td align="left">#[name]#</td>+ <td align="right"><input name="#[name]#_maxActive" type="text" size="8" maxlength="8" value="#[maxActive]#" /></td>+ <td align="right">#[numActive]#</td>+ </tr>+ #{/pool}#+ <tr class="TableCellLight">+ <td align="left" colspan="7">+ <input type="submit" name="poolConfig" value="Enter new Threadpool Configuration" />+ Changes take effect immediately</td>+ </tr>+ </table>+ </fieldset></form>+ </div> <!-- /expert_settings -->- <p>- <strong>Online Caution Settings:</strong><br />- This is the time that the crawler idles when the proxy is accessed, or a local or remote search is done.- The delay is extended by this time each time the proxy is accessed afterwards.- This shall improve performance of the affected process (proxy or search).- (current delta is #[crawlPauseProxyCurrent]#/#[crawlPauseLocalsearchCurrent]#/#[crawlPauseRemotesearchCurrent]#- seconds since last proxy/local-search/remote-search access.)- </p><form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">- <table border="0" cellpadding="2" cellspacing="1">- <tr class="TableHeader" valign="bottom">- <td>Online Caution Case</td>- <td>indexer delay (milliseconds) after case occurency</td>- </tr>- <tr class="TableCellDark">- <td>Proxy:</td>- <td align="right"><input id="crawlPauseProxy" name="crawlPauseProxy" type="text" size="20" maxlength="100" value="#[crawlPauseProxy]#" /></td>- </tr>- <tr class="TableCellDark">- <td>Local Search:</td>- <td align="right"><input id="crawlPauseLocalsearch" name="crawlPauseLocalsearch" type="text" size="20" maxlength="100" value="#[crawlPauseLocalsearch]#" /></td>- </tr>- <tr class="TableCellDark">- <td>Remote Search:</td>- <td align="right"><input id="crawlPauseRemotesearch" name="crawlPauseRemotesearch" type="text" size="20" maxlength="100" value="#[crawlPauseRemotesearch]#" /></td>- </tr>- <tr class="TableCellLight">- <td align="left" colspan="2"><input type="submit" name="onlineCautionSubmit" value="Enter New Parameters" />- Changes take effect immediately</td>- </tr>- </table>+ <fieldset><legend>Online Caution Settings:</legend>+ <p>+ This is the time that the crawler idles when the proxy is accessed, or a local or remote search is done.+ The delay is extended by this time each time the proxy is accessed afterwards.+ This shall improve performance of the affected process (proxy or search).+ (current delta is #[crawlPauseProxyCurrent]#/#[crawlPauseLocalsearchCurrent]#/#[crawlPauseRemotesearchCurrent]#+ seconds since last proxy/local-search/remote-search access.)+ </p>+ <table border="0" cellpadding="2" cellspacing="1">+ <tr class="TableHeader" valign="bottom">+ <td>Online Caution Case</td>+ <td>indexer delay (milliseconds) after case occurency</td>+ </tr>+ <tr class="TableCellDark">+ <td>Proxy:</td>+ <td align="right"><input id="crawlPauseProxy" name="crawlPauseProxy" type="text" size="20" maxlength="100" value="#[crawlPauseProxy]#" /></td>+ </tr>+ <tr class="TableCellDark">+ <td>Local Search:</td>+ <td align="right"><input id="crawlPauseLocalsearch" name="crawlPauseLocalsearch" type="text" size="20" maxlength="100" value="#[crawlPauseLocalsearch]#" /></td>+ </tr>+ <tr class="TableCellDark">+ <td>Remote Search:</td>+ <td align="right"><input id="crawlPauseRemotesearch" name="crawlPauseRemotesearch" type="text" size="20" maxlength="100" value="#[crawlPauseRemotesearch]#" /></td>+ </tr>+ <tr class="TableCellLight">+ <td align="left" colspan="2"><input type="submit" name="onlineCautionSubmit" value="Enter New Parameters" />+ Changes take effect immediately</td>+ </tr>+ </table>+ </fieldset></form><form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.javaindex 2e9b80689..598b50c2b 100644--- a/htroot/PerformanceQueues_p.java+++ b/htroot/PerformanceQueues_p.java@@ -95,6 +95,9 @@ public class PerformanceQueues_p {final double multiplier = (post != null) && post.containsKey("multiplier") ? post.getDouble("multiplier", 1) : 1;final boolean setProfile = (post != null && post.containsKey("submitdefault"));final boolean setDelay = (post != null) && (post.containsKey("submitdelay"));+ // save used settings file to config+ if (setProfile) switchboard.setConfig("performanceProfile", post.get("defaultFile", "defaults/yacy.init"));+while (threads.hasNext()) {threadName = threads.next();thread = switchboard.getThread(threadName);@@ -178,9 +181,11 @@ public class PerformanceQueues_p {// performance profilesc = 0;+ final String usedfile = switchboard.getConfig("performanceProfile", "defaults/yacy.init");for(String filename: performanceProfiles.keySet()) {prop.put("profile_" + c + "_filename", filename);prop.put("profile_" + c + "_description", performanceProfiles.get(filename));+ prop.put("profile_" + c + "_used", usedfile.equalsIgnoreCase(filename) ? "1" : "0");c++;}prop.put("profile", c);diff --git a/locales/de.lng b/locales/de.lngindex bac9a2910..cf00da5cd 100644--- a/locales/de.lng+++ b/locales/de.lng@@ -1390,7 +1390,8 @@ Short Mem<br />Cycles==Durchl.<br />ohne ausr. SpeicherMinimum of<br />Required Memory==Mindestens<br />benötigter SpeicherFull Description==vollständige BeschreibungSubmit New Delay Values==Neue Verzögerungswerte speichern-"Use Default Profile:"=="Standard Profil benutzen:"+Use Default Profile:==Standard Profil benutzen:+Save==Speichern> and use==> und nutze> of the defiend performance.==> der vorgegebenen Geschwindigkeit.Changes take effect immediately==Änderungen werden sofort wirksam