From a7bc130e2703033b8106c82bb5e52f0d18a74cc6 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Thu, 27 Mar 2014 22:00:57 +0100 Subject: [PATCH] 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 --- defaults/performance_dht.profile | 32 ----------------------------- defaults/solr.collection.schema | 6 +++--- htroot/PerformanceQueues_p.java | 31 ---------------------------- htroot/Performance_p.html | 35 -------------------------------- 4 files changed, 3 insertions(+), 101 deletions(-) delete mode 100644 defaults/performance_dht.profile diff --git a/defaults/performance_dht.profile b/defaults/performance_dht.profile deleted file mode 100644 index b24e6197e..000000000 --- a/defaults/performance_dht.profile +++ /dev/null @@ -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 - diff --git a/defaults/solr.collection.schema b/defaults/solr.collection.schema index a72ed8901..dc5e66e67 100644 --- a/defaults/solr.collection.schema +++ b/defaults/solr.collection.schema @@ -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 diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java index dea0ecc75..982d97b04 100644 --- a/htroot/PerformanceQueues_p.java +++ b/htroot/PerformanceQueues_p.java @@ -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 performanceProfiles = new HashMap(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)); diff --git a/htroot/Performance_p.html b/htroot/Performance_p.html index ba88ae0ac..85e0528be 100644 --- a/htroot/Performance_p.html +++ b/htroot/Performance_p.html @@ -51,41 +51,6 @@ - -
-
Use Default Profile: -

- - and use - - of the defined performance. -

-

Changes take effect immediately

-
-
- -
-
YaCy Priority Settings -
-
:
-
-
-
Changes take effect after restart of YaCy
-
-
-
Online Caution Settings: