From 5bdcc19693627af0c1fd155d61e016aab283cfef Mon Sep 17 00:00:00 2001 From: gtully Date: Thu, 10 Oct 2013 13:52:53 +0100 Subject: [PATCH] simplify default config, remove vmcursor refs and default memory limits to 70% heap. hardcoded default 1g --- .../apache/activemq/broker/BrokerService.java | 8 ++-- .../src/main/resources/activemq.xml | 7 +-- assembly/src/release/conf/activemq.xml | 46 ++----------------- 3 files changed, 10 insertions(+), 51 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java index 168db4c1ea..07295c4a86 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -1038,10 +1038,10 @@ public class BrokerService implements Service { systemUsage = new SystemUsage("Main", getPersistenceAdapter(), getTempDataStore(), getJobSchedulerStore()); systemUsage.setExecutor(getExecutor()); - systemUsage.getMemoryUsage().setLimit(1024 * 1024 * 64); // 64 MB + systemUsage.getMemoryUsage().setLimit(1024L * 1024 * 1024 * 1); // 1 GB systemUsage.getTempUsage().setLimit(1024L * 1024 * 1024 * 50); // 50 GB systemUsage.getStoreUsage().setLimit(1024L * 1024 * 1024 * 100); // 100 GB - systemUsage.getJobSchedulerUsage().setLimit(1024L * 1024 * 1000 * 50); // 50 // Gb + systemUsage.getJobSchedulerUsage().setLimit(1024L * 1024 * 1024 * 50); // 50 GB addService(this.systemUsage); } return systemUsage; @@ -1888,10 +1888,10 @@ public class BrokerService implements Service { long jvmLimit = Runtime.getRuntime().maxMemory(); if (memLimit > jvmLimit) { + usage.getMemoryUsage().setPercentOfJvmHeap(70); LOG.error("Memory Usage for the Broker (" + memLimit / (1024 * 1024) + " mb) is more than the maximum available for the JVM: " + - jvmLimit / (1024 * 1024) + " mb - resetting to maximum available: " + jvmLimit / (1024 * 1024) + " mb"); - usage.getMemoryUsage().setLimit(jvmLimit); + jvmLimit / (1024 * 1024) + " mb - resetting to 70% of maximum available: " + (usage.getMemoryUsage().getLimit() / (1024 * 1024)) + " mb"); } if (getPersistenceAdapter() != null) { diff --git a/activemq-karaf/src/main/resources/activemq.xml b/activemq-karaf/src/main/resources/activemq.xml index 1d9c826b03..82b05c4548 100644 --- a/activemq-karaf/src/main/resources/activemq.xml +++ b/activemq-karaf/src/main/resources/activemq.xml @@ -19,7 +19,6 @@ @@ -33,13 +32,11 @@ - + - - @@ -59,7 +56,7 @@ - + diff --git a/assembly/src/release/conf/activemq.xml b/assembly/src/release/conf/activemq.xml index d9edd975dd..91a87401be 100755 --- a/assembly/src/release/conf/activemq.xml +++ b/assembly/src/release/conf/activemq.xml @@ -17,7 +17,6 @@ @@ -40,21 +39,10 @@ --> - - - + - @@ -108,28 +85,13 @@ + --> - +