removed performance settings

- they are incomplete and buggy
- it was not easy to explain
- it did not comply with a KISS strategy
- setting a performance of low priority actually caused crashing of a
peer
- there was nobody who would maintain that functionality
pull/1/head
Michael Peter Christen 11 years ago
parent 3290375493
commit a7bc130e27

@ -1,32 +0,0 @@
###
### YaCy Init File
###
# performance-settings
# delay-times for permanent loops (milliseconds)
# the idlesleep is the pause that an process sleeps if the last call to the
# process job was without execution of anything;
# the busysleep is the pause after a full job execution
# 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
20_dhtdistribution_idlesleep=5000
20_dhtdistribution_busysleep=500
20_dhtdistribution_memprereq=12582912
50_localcrawl_idlesleep=2000
50_localcrawl_busysleep=60
50_localcrawl_memprereq=12582912
50_localcrawl_isPaused=false
60_remotecrawlloader_idlesleep=60000
60_remotecrawlloader_busysleep=10000
60_remotecrawlloader_memprereq=12582912
60_remotecrawlloader_isPaused=false
62_remotetriggeredcrawl_idlesleep=10000
62_remotetriggeredcrawl_busysleep=2000
62_remotetriggeredcrawl_memprereq=12582912
62_remotetriggeredcrawl_isPaused=false
80_indexing_idlesleep=1000
80_indexing_busysleep=0
80_indexing_memprereq=12582912

@ -150,13 +150,13 @@ charset_s
## number of words in visible area, int
wordcount_i
## total number of inbound links, int
## number of outgoing inbound links, int
inboundlinkscount_i
## number of inbound links with nofollow tag, int
## number of outgoing inbound links with nofollow tag, int
inboundlinksnofollowcount_i
## external number of inbound links, int
## number of outgoing inbound links, int
outboundlinkscount_i
## number of external links with nofollow tag, int

@ -25,7 +25,6 @@
//if the shell's current path is HTROOT
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@ -46,15 +45,6 @@ import net.yacy.server.serverObjects;
import net.yacy.server.serverSwitch;
public class PerformanceQueues_p {
/**
* list of pre-defined settings: filename -> description
*/
private final static Map<String, String> performanceProfiles = new HashMap<String, String>(4, 0.9f);
static {
// no sorted output!
performanceProfiles.put("defaults/yacy.init", "default (crawl)");
performanceProfiles.put("defaults/performance_dht.profile", "prefer DHT");
}
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
@ -129,7 +119,6 @@ public class PerformanceQueues_p {
final boolean setDelay = (post != null) && (post.containsKey("submitdelay"));
// save used settings file to config
if (setProfile && post != null){
sb.setConfig("performanceProfile", post.get("defaultFile", "defaults/yacy.init"));
sb.setConfig("performanceSpeed", post.getInt("profileSpeed", 100));
}
@ -220,17 +209,6 @@ public class PerformanceQueues_p {
}
prop.put("table", c);
// performance profiles
c = 0;
final String usedfile = sb.getConfig("performanceProfile", "defaults/yacy.init");
for(final 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);
c = 0;
final int[] speedValues = {200,150,100,50,25,10};
final int usedspeed = sb.getConfigInt("performanceSpeed", 100);
@ -277,10 +255,6 @@ public class PerformanceQueues_p {
}
if ((post != null) && (post.containsKey("PrioritySubmit"))) {
sb.setConfig("javastart_priority",post.get("YaCyPriority","0"));
}
if ((post != null) && (post.containsKey("onlineCautionSubmit"))) {
sb.setConfig(SwitchboardConstants.PROXY_ONLINE_CAUTION_DELAY, Integer.toString(post.getInt("crawlPauseProxy", 30000)));
sb.setConfig(SwitchboardConstants.LOCALSEACH_ONLINE_CAUTION_DELAY, Integer.toString(post.getInt("crawlPauseLocalsearch", 30000)));
@ -314,11 +288,6 @@ public class PerformanceQueues_p {
prop.put("pool", "2");
final long curr_prio = sb.getConfigLong("javastart_priority",0);
prop.put("priority_normal",(curr_prio == 0) ? "1" : "0");
prop.put("priority_below",(curr_prio == 10) ? "1" : "0");
prop.put("priority_low",(curr_prio == 20) ? "1" : "0");
// parse initialization memory settings
final String Xmx = sb.getConfig("javastart_Xmx", "Xmx600m").substring(3);
prop.put("Xmx", Xmx.substring(0, Xmx.length() - 1));

@ -51,41 +51,6 @@
</dl>
</fieldset>
</form>
<form action="Performance_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<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="profileSpeed">
#{speed}#
<option value="#[value]#"#(used)#:: selected="selected"#(/used)#>#[label]#</option>
#{/speed}#
</select>
of the defined performance.
</p>
<p><input type="submit" name="submitdefault" value="Save" /> Changes take effect immediately</p>
</fieldset>
</form>
<form action="Performance_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<fieldset><legend>YaCy Priority Settings</legend>
<dl>
<dt><label for="priority">YaCy Process Priority</label>:</dt>
<dd><select id="priority" name="YaCyPriority">
<option value="0"#(priority_normal)#:: selected="selected"#(/priority_normal)#>Normal</option>
<option value="10"#(priority_below)#:: selected="selected"#(/priority_below)#>Below normal</option>
<option value="20"#(priority_low)#:: selected="selected"#(/priority_low)#>Idle</option>
</select></dd>
<dt><input type="submit" name="PrioritySubmit" value="Set new Priority" /></dt>
<dd>Changes take effect after <strong>restart</strong> of YaCy</dd>
</dl>
</fieldset>
</form>
<form action="Performance_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<fieldset><legend>Online Caution Settings:</legend>

Loading…
Cancel
Save