activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject git commit: simplify default config, remove vmcursor refs and default memory limits to 70% heap. hardcoded default 1g
Date Thu, 10 Oct 2013 12:54:37 GMT
Updated Branches:
  refs/heads/trunk 211f566b5 -> 5bdcc1969


simplify default config, remove vmcursor refs and default memory limits to 70% heap. hardcoded
default 1g


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/5bdcc196
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/5bdcc196
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/5bdcc196

Branch: refs/heads/trunk
Commit: 5bdcc19693627af0c1fd155d61e016aab283cfef
Parents: 211f566
Author: gtully <gary.tully@gmail.com>
Authored: Thu Oct 10 13:52:53 2013 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Thu Oct 10 13:53:39 2013 +0100

----------------------------------------------------------------------
 .../apache/activemq/broker/BrokerService.java   |  8 ++--
 activemq-karaf/src/main/resources/activemq.xml  |  7 +--
 assembly/src/release/conf/activemq.xml          | 46 ++------------------
 3 files changed, 10 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/5bdcc196/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
----------------------------------------------------------------------
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 168db4c..07295c4 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) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/5bdcc196/activemq-karaf/src/main/resources/activemq.xml
----------------------------------------------------------------------
diff --git a/activemq-karaf/src/main/resources/activemq.xml b/activemq-karaf/src/main/resources/activemq.xml
index 1d9c826..82b05c4 100644
--- a/activemq-karaf/src/main/resources/activemq.xml
+++ b/activemq-karaf/src/main/resources/activemq.xml
@@ -19,7 +19,6 @@
 
 <beans
   xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
@@ -33,13 +32,11 @@
         <destinationPolicy>
             <policyMap>
               <policyEntries>
-                <policyEntry topic=">" producerFlowControl="true">
+                <policyEntry topic=">" >
                   <pendingMessageLimitStrategy>
                     <constantPendingMessageLimitStrategy limit="1000"/>
                   </pendingMessageLimitStrategy>
                 </policyEntry>
-                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
-                </policyEntry>
               </policyEntries>
             </policyMap>
         </destinationPolicy>
@@ -59,7 +56,7 @@
         <systemUsage>
             <systemUsage>
                 <memoryUsage>
-                    <memoryUsage limit="64 mb"/>
+                    <memoryUsage percentOfJvmHeap="70"/>
                 </memoryUsage>
                 <storeUsage>
                     <storeUsage limit="100 gb"/>

http://git-wip-us.apache.org/repos/asf/activemq/blob/5bdcc196/assembly/src/release/conf/activemq.xml
----------------------------------------------------------------------
diff --git a/assembly/src/release/conf/activemq.xml b/assembly/src/release/conf/activemq.xml
index d9edd97..91a8740 100755
--- a/assembly/src/release/conf/activemq.xml
+++ b/assembly/src/release/conf/activemq.xml
@@ -17,7 +17,6 @@
 <!-- START SNIPPET: example -->
 <beans
   xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
@@ -40,21 +39,10 @@
     -->
     <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}">
 
-        <!--
-            For better performances use VM cursor and small memory limit.
-            For more information, see:
-
-            http://activemq.apache.org/message-cursors.html
-
-            Also, if your producer is "hanging", it's probably due to producer flow control.
-            For more information, see:
-            http://activemq.apache.org/producer-flow-control.html
-        -->
-
         <destinationPolicy>
             <policyMap>
               <policyEntries>
-                <policyEntry topic=">" producerFlowControl="true">
+                <policyEntry topic=">" >
                     <!-- The constantPendingMessageLimitStrategy is used to prevent
                          slow topic consumers to block producers and affect other consumers
                          by limiting the number of messages that are retained
@@ -67,17 +55,6 @@
                     <constantPendingMessageLimitStrategy limit="1000"/>
                   </pendingMessageLimitStrategy>
                 </policyEntry>
-                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
-                  <!-- Use VM cursor for better latency
-                       For more information, see:
-
-                       http://activemq.apache.org/message-cursors.html
-
-                  <pendingQueuePolicy>
-                    <vmQueueCursor/>
-                  </pendingQueuePolicy>
-                  -->
-                </policyEntry>
               </policyEntries>
             </policyMap>
         </destinationPolicy>
@@ -108,28 +85,13 @@
 
           <!--
             The systemUsage controls the maximum amount of space the broker will
-            use before slowing down producers. For more information, see:
+            use before disabling caching and/or slowing down producers. For more information,
see:
             http://activemq.apache.org/producer-flow-control.html
-            If using ActiveMQ embedded - the following limits could safely be used:
-
-        <systemUsage>
-            <systemUsage>
-                <memoryUsage>
-                    <memoryUsage limit="20 mb"/>
-                </memoryUsage>
-                <storeUsage>
-                    <storeUsage limit="1 gb"/>
-                </storeUsage>
-                <tempUsage>
-                    <tempUsage limit="100 mb"/>
-                </tempUsage>
-            </systemUsage>
-        </systemUsage>
-        -->
+          -->
           <systemUsage>
             <systemUsage>
                 <memoryUsage>
-                    <memoryUsage limit="64 mb"/>
+                    <memoryUsage percentOfJvmHeap="70" />
                 </memoryUsage>
                 <storeUsage>
                     <storeUsage limit="100 gb"/>


Mime
View raw message