From 229f2248b800082e263eb5da5431e7be1517d6f5 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Wed, 30 Apr 2014 13:26:32 +0200 Subject: [PATCH] added configuration option for maxmimum load and minimum ram for postprocessing --- defaults/yacy.init | 4 ++++ source/net/yacy/search/Switchboard.java | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/defaults/yacy.init b/defaults/yacy.init index 17098d70d..02e540d88 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -1231,3 +1231,7 @@ browser.load4everyone = false # with some heuristics like: loading linked documents and adding a twitter search. # When the learning mode is finished, the user may switch on individual heuristics by himself. greedylearning.active = true + +# postprocessing steering +postprocessing.maximum_load = 2.5 +postprocessing.minimum_ram = 536870912 diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index 5fe44bcd3..e0466b219 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -2307,8 +2307,8 @@ public final class Switchboard extends serverSwitch { boolean postprocessing = collection1Configuration.contains(CollectionSchema.process_sxt) && (index.connectedCitation() || fulltext.useWebgraph()) && - MemoryControl.available() > 512L * 1024L * 1024L && - Memory.load() < 2.5f; + MemoryControl.available() > getConfigLong("postprocessing.minimum_ram", 0) && + Memory.load() < getConfigFloat("postprocessing.maximum_load", 0); if (allCrawlsFinished) { if (postprocessing) {