From 8738336408c6a08dbe0ddb3d0076a6d0548cd16f Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Tue, 19 Jun 2012 08:45:49 +0200 Subject: [PATCH] set Xms lower than Xmx --- defaults/yacy.init | 2 +- htroot/PerformanceQueues_p.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/defaults/yacy.init b/defaults/yacy.init index d94671b43..b09bed54f 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -621,7 +621,7 @@ cleanup.failedSearchURLtimeout = 86400000 # if a high performance for large search indexes is wanted, then setting the values to equal number is recommended # if YaCy shall be nice in not-only-yacy environments, then the Xms value may be lower javastart_Xmx=Xmx600m -javastart_Xms=Xms600m +javastart_Xms=Xms90m # YaCy is able to use RAM copies of database tables. This needs a lot of RAM. # To switch on copying of file tables int RAM, there must be enough memory diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java index aa71f767b..ce90ff105 100644 --- a/htroot/PerformanceQueues_p.java +++ b/htroot/PerformanceQueues_p.java @@ -84,9 +84,9 @@ public class PerformanceQueues_p { } } if (post.containsKey("Xmx")) { - int xmx = post.getInt("Xmx", 500); // default maximum heap size + int xmx = post.getInt("Xmx", 600); // default maximum heap size if (OS.isWin32) xmx = Math.min(2000, xmx); - int xms = xmx; // take all.. if this is not used the os will manage that. if not reserved at the beginning the OS may reject to give away more memory + int xms = Math.min(xmx, Math.max(90, xmx / 10)); sb.setConfig("javastart_Xmx", "Xmx" + xmx + "m"); sb.setConfig("javastart_Xms", "Xms" + xms + "m"); prop.put("setStartupCommit", "1"); @@ -342,9 +342,9 @@ public class PerformanceQueues_p { prop.put("priority_low",(curr_prio == 20) ? "1" : "0"); // parse initialization memory settings - final String Xmx = sb.getConfig("javastart_Xmx", "Xmx500m").substring(3); + final String Xmx = sb.getConfig("javastart_Xmx", "Xmx600m").substring(3); prop.put("Xmx", Xmx.substring(0, Xmx.length() - 1)); - final String Xms = sb.getConfig("javastart_Xms", "Xms500m").substring(3); + final String Xms = sb.getConfig("javastart_Xms", "Xms90m").substring(3); prop.put("Xms", Xms.substring(0, Xms.length() - 1)); final long diskFree = sb.getConfigLong(SwitchboardConstants.DISK_FREE, 3000L);