Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0139710968 for ; Tue, 7 May 2013 09:27:24 +0000 (UTC) Received: (qmail 54356 invoked by uid 500); 7 May 2013 09:27:23 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 53794 invoked by uid 500); 7 May 2013 09:27:19 -0000 Mailing-List: contact dev-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 dev@activemq.apache.org Received: (qmail 53711 invoked by uid 99); 7 May 2013 09:27:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 May 2013 09:27:16 +0000 Date: Tue, 7 May 2013 09:27:16 +0000 (UTC) From: "SuoNayi (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMQ-4495) Imporve cursor memory management MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-4495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] SuoNayi updated AMQ-4495: ------------------------- Attachment: FasterDispatchTest.java there is only 2% performance improvement in my observation. > Imporve cursor memory management > -------------------------------- > > Key: AMQ-4495 > URL: https://issues.apache.org/jira/browse/AMQ-4495 > Project: ActiveMQ > Issue Type: Bug > Reporter: Dejan Bosanac > Assignee: Dejan Bosanac > Fix For: 5.9.0 > > Attachments: FasterDispatchTest.java > > > As currently stands, the store queue cursor will cache producer messages until it gets to the 70% (high watermark) of its usage. After that caching stops and messages goes only in store. When consumers comes, messages get dispatched to it, but memory isn't released until they are acked. The problem is with the use case where producer flow control is off and we have a prefetch large enough to get all our messages from the cache. Then, basically the cursor gets empty and as message acks release memory one by one, we go to the store and try to batch one message at the time. You can guess that things start to be really slow at that point. > The solution for this scenario is to wait with batching until we have more space so that store access is optimized. We can do this by adding a new limit (smaller then the high watermark) which will be used as the limit after which we start filling cursor from the store again. > All this led us to the following questions: > 1. Why do we use 70% as the limit (instead of 100%) when we stop caching producer messages? > 2. Would a solution that stop caching producer messages at 100% of usage and then start batching messages from the store when usage drops below high watermark value be enough. Of course, high watermark would be configurable, but 100% by default so we don't alter any behavior for regular use cases. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira