You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "gtully (via GitHub)" <gi...@apache.org> on 2025/02/27 14:54:22 UTC

[PR] ARTEMIS-5333 add config for global-max-size-percent-of-jvm-max-memory… [activemq-artemis]

gtully opened a new pull request, #5537:
URL: https://github.com/apache/activemq-artemis/pull/5537

   … to simplify setting the global memory limit


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5333 add config for global-max-size-percent-of-jvm-max-memory… [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #5537:
URL: https://github.com/apache/activemq-artemis/pull/5537#issuecomment-2698141198

   a test validating the properties (broker properties) would be nice


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5333 add config for global-max-size-percent-of-jvm-max-memory… [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on code in PR #5537:
URL: https://github.com/apache/activemq-artemis/pull/5537#discussion_r1979748492


##########
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java:
##########
@@ -775,6 +776,7 @@ public void testMaxSize() throws Exception {
 
       assertEquals(10 * 1024 * 1024, configuration.getGlobalMaxSize());
       assertEquals(1000, configuration.getGlobalMaxMessages());
+      assertEquals(30, configuration.getGlobalMaxSizePercentOfJvmMaxMemory());

Review Comment:
   actually when I wrote this I thought this was the place where you would validate broker properties.
   
   
   shouldn't you also configure this by the properties on ConfigurationimplTest, just in case.. on that case you should use a different constant other than 30.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5333 add config for global-max-size-percent-of-jvm-max-memory… [activemq-artemis]

Posted by "gtully (via GitHub)" <gi...@apache.org>.
gtully commented on PR #5537:
URL: https://github.com/apache/activemq-artemis/pull/5537#issuecomment-2698282560

   > a test validating the properties (broker properties) would be nice
   
   we get that for free with my other per that verifies export/import see: https://github.com/apache/activemq-artemis/pull/5533/files#diff-ab6dc3e25c4f07694286ccb6d128e61c311dd3ff89fdb91167923d82bc99ac15R1028


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5333 add config for global-max-size-percent-of-jvm-max-memory… [activemq-artemis]

Posted by "tabish121 (via GitHub)" <gi...@apache.org>.
tabish121 commented on code in PR #5537:
URL: https://github.com/apache/activemq-artemis/pull/5537#discussion_r1974407033


##########
docs/user-manual/paging.adoc:
##########
@@ -158,7 +158,7 @@ You can also specify `global-max-messages` on the main configuration, specifying
 
 When you have more messages than what is configured `global-max-size` any new produced message will make that destination to go through its paging policy.
 
-`global-max-size` is calculated as half of the max memory available to the Java Virtual Machine, unless specified on the `broker.xml` configuration.
+`global-max-size` is calculated as `global-max-size-percent-of-jvm-max-memory` of the max memory available to the Java Virtual Machine, unless specified on the `broker.xml` configuration. The default value of `global-max-size-percent-of-jvm-max-memory` is 50% or half.

Review Comment:
   Wondering if a rewording here would help as I needed to read this a few times before I figured out what it was saying. 
   
   `global-max-size` is calculated as a percentage of the max memory available to the Java Virtual Machine, unless specified in the `broker.xml` configuration directly. The percentage value used is configurable using the option `global-max-size-percent-of-jvm-max-memory` in the XML configuration and if not specified the default value of `global-max-size-percent-of-jvm-max-memory` is 50% or half the max available memory.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5333 add config for global-max-size-percent-of-jvm-max-memory… [activemq-artemis]

Posted by "gtully (via GitHub)" <gi...@apache.org>.
gtully merged PR #5537:
URL: https://github.com/apache/activemq-artemis/pull/5537


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5333 add config for global-max-size-percent-of-jvm-max-memory… [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #5537:
URL: https://github.com/apache/activemq-artemis/pull/5537#issuecomment-2698004977

   LGTM: just asked a very tiny change on the test.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5333 add config for global-max-size-percent-of-jvm-max-memory… [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on code in PR #5537:
URL: https://github.com/apache/activemq-artemis/pull/5537#discussion_r1979675865


##########
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java:
##########
@@ -775,6 +776,7 @@ public void testMaxSize() throws Exception {
 
       assertEquals(10 * 1024 * 1024, configuration.getGlobalMaxSize());
       assertEquals(1000, configuration.getGlobalMaxMessages());
+      assertEquals(30, configuration.getGlobalMaxSizePercentOfJvmMaxMemory());

Review Comment:
   I would use a different number from the one you used on the XML.. in case the XML gets parsed by accident.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact



Re: [PR] ARTEMIS-5333 add config for global-max-size-percent-of-jvm-max-memory… [activemq-artemis]

Posted by "gtully (via GitHub)" <gi...@apache.org>.
gtully commented on code in PR #5537:
URL: https://github.com/apache/activemq-artemis/pull/5537#discussion_r1976029496


##########
docs/user-manual/paging.adoc:
##########
@@ -158,7 +158,7 @@ You can also specify `global-max-messages` on the main configuration, specifying
 
 When you have more messages than what is configured `global-max-size` any new produced message will make that destination to go through its paging policy.
 
-`global-max-size` is calculated as half of the max memory available to the Java Virtual Machine, unless specified on the `broker.xml` configuration.
+`global-max-size` is calculated as `global-max-size-percent-of-jvm-max-memory` of the max memory available to the Java Virtual Machine, unless specified on the `broker.xml` configuration. The default value of `global-max-size-percent-of-jvm-max-memory` is 50% or half.

Review Comment:
   thanks, yes, that is indeed better. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact