[ 
https://issues.apache.org/jira/browse/ARTEMIS-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15959421#comment-15959421
 ] 

Justin Bertram commented on ARTEMIS-1096:
-----------------------------------------

The default {{<address-full-policy>}} is {{PAGE}}, but the default 
{{<max-size-bytes>}} is {{-1}} (i.e. infinite) so the address is never 
considered full and hence the full-policy is never applied.  There is a 
{{WARN}} in place to notify users of potential OOME given their address 
configuration, but the logic is flawed in that it simply adds up the 
{{<max-size-byte>}} values for each address and doesn't consider {{-1}} to be a 
special case.  That should be fixed.

In any event, this is not a default configuration so a user would have to 
explicitly create this configuration (i.e. removing the default 
{{<address-settings>}} and {{<global-max-size>}}).  My assumption (perhaps 
naively) is that the user knows what they're doing.  The default 
{{<global-max-size>}} is {{-1}} (i.e. infinite).  If we detected this value and 
applied some kind of automatic override then {{-1}} is no longer a valid option 
which means we are forcing the user to use a global-max whether they want to or 
not.  At first blush, this seems wrong although I'm certainly open to further 
discussion.

> Load tests exhaust memory if global-max-size is not set
> -------------------------------------------------------
>
>                 Key: ARTEMIS-1096
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1096
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>         Environment: Fedora 25 x86-64, 16G memory
>            Reporter: Justin Ross
>            Priority: Minor
>
> With the following config (note commented out global-max-size), testq doesn't 
> page or block.  Under load tests, the broker eventually dies with an OOME.  I 
> propose that there be some fallback code-level default for global-max-size. 
> {noformat}
> <?xml version='1.0'?>
> <configuration xmlns="urn:activemq" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
>   <core xmlns="urn:activemq:core" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="urn:activemq:core ">
>     <!-- <global-max-size>100Mb</global-max-size> -->
>     <acceptors>
>       <acceptor 
> name="artemis">tcp://localhost:5672?protocols=AMQP,CORE,OPENWIRE</acceptor>
>     </acceptors>
>     <addresses>
>       <address name="testq">
>         <anycast>
>           <queue name="testq">
>             <durable>false</durable>
>           </queue>
>         </anycast>
>       </address>
>     </addresses>
>     <security-settings>
>       <security-setting match="#">
>         <permission type="consume" roles="admin"/>
>         <permission type="browse" roles="admin"/>
>         <permission type="send" roles="admin"/>
>       </security-setting>
>     </security-settings>
>   </core>
> </configuration>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to