- performance settings refactoring: made headlines to fieldsets

- show performance profiles more prominent for easier configuration

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5026 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
lotus 17 years ago
parent 6952b13c08
commit cafa1a952f

@ -542,6 +542,7 @@ filterOutStopwordsFromTopwords=true
# the prereq-value is a memory pre-requisite: that much bytes must # the prereq-value is a memory pre-requisite: that much bytes must
# be available/free in the heap; othervise the loop is not executed # be available/free in the heap; othervise the loop is not executed
# and another idlesleep is performed # and another idlesleep is performed
performanceProfile=defaults/yacy.init
20_dhtdistribution_idlesleep=30000 20_dhtdistribution_idlesleep=30000
20_dhtdistribution_busysleep=10000 20_dhtdistribution_busysleep=10000
20_dhtdistribution_memprereq=6291456 20_dhtdistribution_memprereq=6291456

@ -3,16 +3,30 @@
<head> <head>
<title>YaCy '#[clientname]#': Performance Settings of Queues and Processes</title> <title>YaCy '#[clientname]#': Performance Settings of Queues and Processes</title>
#%env/templates/metas.template%# #%env/templates/metas.template%#
<script type="text/javascript" src="js/html.js"></script>
</head> </head>
<body id="PerformanceQueues"> <body id="PerformanceQueues" onload="hide('expert_settings')">
#%env/templates/header.template%# #%env/templates/header.template%#
#%env/templates/submenuConfig.template%# #%env/templates/submenuConfig.template%#
<h2>Performance Settings of Queues and Processes</h2> <h2>Performance Settings of Queues and Processes</h2>
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Use Default Profile:</legend>
<p> <p>
<strong>Scheduled tasks overview and waiting time settings:</strong> <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>
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data"> <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"> <table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom"> <tr class="TableHeader" valign="bottom">
<td>Thread</td> <td>Thread</td>
@ -57,23 +71,16 @@
#{/table}# #{/table}#
<tr class="TableCellLight"> <tr class="TableCellLight">
<td align="left" colspan="19"> <td align="left" colspan="19">
<input type="submit" name="submitdelay" value="Submit New Delay Values" />&nbsp;&nbsp;&nbsp; <input type="submit" name="submitdelay" value="Submit New Delay Values" />
Changes take effect immediately<br/> 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> </td>
</tr> </tr>
</table> </table>
</fieldset>
</form> </form>
<p>
<strong>Cache Settings:</strong>
</p>
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data"> <form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Cache Settings:</legend>
<table border="0" cellpadding="5" cellspacing="1"> <table border="0" cellpadding="5" cellspacing="1">
<tr valign="top" class="TableHeader"> <tr valign="top" class="TableHeader">
<td>Cache Type</td> <td>Cache Type</td>
@ -150,17 +157,16 @@
Changes take effect immediately</td> Changes take effect immediately</td>
</tr> </tr>
</table> </table>
</fieldset>
</form> </form>
<p> <form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<strong>Balancer Settings:</strong> <fieldset><legend>Balancer Settings:</legend>
</p>
<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 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 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. delta times are ensured.
</p> </p>
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<table border="0" cellpadding="2" cellspacing="1"> <table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom"> <tr class="TableHeader" valign="bottom">
<td>Crawler Domain</td> <td>Crawler Domain</td>
@ -179,12 +185,11 @@
Changes take effect immediately</td> Changes take effect immediately</td>
</tr> </tr>
</table> </table>
</fieldset>
</form> </form>
<p>
<strong>Thread Pool Settings:</strong>
</p>
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data"> <form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Thread Pool Settings:</legend>
<table border="0" cellpadding="2" cellspacing="1"> <table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom"> <tr class="TableHeader" valign="bottom">
<td>Thread Pool</td> <td>Thread Pool</td>
@ -204,18 +209,20 @@
Changes take effect immediately</td> Changes take effect immediately</td>
</tr> </tr>
</table> </table>
</fieldset>
</form> </form>
</div> <!-- /expert_settings -->
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Online Caution Settings:</legend>
<p> <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. 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. 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). This shall improve performance of the affected process (proxy or search).
(current delta is #[crawlPauseProxyCurrent]#/#[crawlPauseLocalsearchCurrent]#/#[crawlPauseRemotesearchCurrent]# (current delta is #[crawlPauseProxyCurrent]#/#[crawlPauseLocalsearchCurrent]#/#[crawlPauseRemotesearchCurrent]#
seconds since last proxy/local-search/remote-search access.) seconds since last proxy/local-search/remote-search access.)
</p> </p>
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">
<table border="0" cellpadding="2" cellspacing="1"> <table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom"> <tr class="TableHeader" valign="bottom">
<td>Online Caution Case</td> <td>Online Caution Case</td>
@ -238,6 +245,7 @@
Changes take effect immediately</td> Changes take effect immediately</td>
</tr> </tr>
</table> </table>
</fieldset>
</form> </form>
<form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data"> <form action="PerformanceQueues_p.html" method="post" enctype="multipart/form-data">

@ -95,6 +95,9 @@ public class PerformanceQueues_p {
final double multiplier = (post != null) && post.containsKey("multiplier") ? post.getDouble("multiplier", 1) : 1; final double multiplier = (post != null) && post.containsKey("multiplier") ? post.getDouble("multiplier", 1) : 1;
final boolean setProfile = (post != null && post.containsKey("submitdefault")); final boolean setProfile = (post != null && post.containsKey("submitdefault"));
final boolean setDelay = (post != null) && (post.containsKey("submitdelay")); 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()) { while (threads.hasNext()) {
threadName = threads.next(); threadName = threads.next();
thread = switchboard.getThread(threadName); thread = switchboard.getThread(threadName);
@ -178,9 +181,11 @@ public class PerformanceQueues_p {
// performance profiles // performance profiles
c = 0; c = 0;
final String usedfile = switchboard.getConfig("performanceProfile", "defaults/yacy.init");
for(String filename: performanceProfiles.keySet()) { for(String filename: performanceProfiles.keySet()) {
prop.put("profile_" + c + "_filename", filename); prop.put("profile_" + c + "_filename", filename);
prop.put("profile_" + c + "_description", performanceProfiles.get(filename)); prop.put("profile_" + c + "_description", performanceProfiles.get(filename));
prop.put("profile_" + c + "_used", usedfile.equalsIgnoreCase(filename) ? "1" : "0");
c++; c++;
} }
prop.put("profile", c); prop.put("profile", c);

@ -1390,7 +1390,8 @@ Short Mem<br />Cycles==Durchl.<br />ohne ausr. Speicher
Minimum of<br />Required Memory==Mindestens<br />ben&ouml;tigter Speicher Minimum of<br />Required Memory==Mindestens<br />ben&ouml;tigter Speicher
Full Description==vollst&auml;ndige Beschreibung Full Description==vollst&auml;ndige Beschreibung
Submit New Delay Values==Neue Verz&ouml;gerungswerte speichern Submit New Delay Values==Neue Verz&ouml;gerungswerte speichern
"Use Default Profile:"=="Standard Profil benutzen:" Use Default Profile:==Standard Profil benutzen:
Save==Speichern
> and use==> und nutze > and use==> und nutze
> of the defiend performance.==> der vorgegebenen Geschwindigkeit. > of the defiend performance.==> der vorgegebenen Geschwindigkeit.
Changes take effect immediately==&Auml;nderungen werden sofort wirksam Changes take effect immediately==&Auml;nderungen werden sofort wirksam

Loading…
Cancel
Save