Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3A761200BF6 for ; Tue, 10 Jan 2017 14:22:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 38F33160B52; Tue, 10 Jan 2017 13:22:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 80A76160B3D for ; Tue, 10 Jan 2017 14:22:00 +0100 (CET) Received: (qmail 61637 invoked by uid 500); 10 Jan 2017 13:21:58 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 61623 invoked by uid 99); 10 Jan 2017 13:21:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2017 13:21:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9FFAD2C03DC for ; Tue, 10 Jan 2017 13:21:58 +0000 (UTC) Date: Tue, 10 Jan 2017 13:21:58 +0000 (UTC) From: "Gary Tully (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQ-4467) Memory usage percent can be exceeded much if PFC is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 10 Jan 2017 13:22:01 -0000 [ https://issues.apache.org/jira/browse/AMQ-4467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15814953#comment-15814953 ] Gary Tully commented on AMQ-4467: --------------------------------- Thanks for the feedback @Christopher L], It can stop dispatch which is a little worrying alright. The reasoning is more from the intent of the linked issue: AMQ-4494, it there is no room for dispatch (due to bad configuration) then rather than OOM the vm, the limits are enforced and some in-memory messages need to be consumed before more can be paged in. To have a better solution in this scenario - having a mechanism to purge the cache for inactive destinations would be needed. I guess gcInactiveDestinations would do it with a variant that just purged the cursor rather than deleted the messages. Peek at the additional test - it failed due to not being able to page in at 50% ( its high water mark) of the system limit. Now it will fail at 100% of the shared limit. Note: hasSpace is queried by the cursor prior to pageIn: https://github.com/apache/activemq/blob/activemq-5.14.3/activemq-broker/src/main/java/org/apache/activemq/broker/region/cursors/QueueStorePrefetch.java#L118 Topics use only the shared limit to gate pageIn for subscriptions. > Memory usage percent can be exceeded much if PFC is disabled > ------------------------------------------------------------ > > Key: AMQ-4467 > URL: https://issues.apache.org/jira/browse/AMQ-4467 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.x > Reporter: SuoNayi > Assignee: Gary Tully > Fix For: 5.15.0 > > Attachments: AMQ-4467.patch > > > If PFC is disabled, when the store cursor checks limits, it checks only the memory percentage of its own MemoryUsage and compares it to the high water mark. Otherwise if PFC is enabled, it checks whether the MemoryUsage is "full" but the "isFull" method also checks its parents. > This issue arrises when you have memory limits set on queues higher than the overall system limit, as well as if you have multiple queues who's memory limits combined are higher than the overall system limit. These settings must be taken into account. > The original form can be found at > http://activemq.2283324.n4.nabble.com/What-can-be-reason-of-460-memory-usage-limit-td4665651.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)