You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/28 20:13:00 UTC
[jira] [Commented] (ARTEMIS-2062) AMQP: Reduce lock contention and
allocations on message processing
[ https://issues.apache.org/jira/browse/ARTEMIS-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16595541#comment-16595541 ]
ASF GitHub Bot commented on ARTEMIS-2062:
-----------------------------------------
GitHub user tabish121 opened a pull request:
https://github.com/apache/activemq-artemis/pull/2277
ARTEMIS-2062 Only attempt to refill credit when needed
Avoid firing the offerProducerCredit code when we know that the credit
is low enough that a refill is needed which avoids lock contention and
garbage creation as each inbound message is processed.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tabish121/activemq-artemis ARTEMIS-2062
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/2277.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2277
----
commit 04657c323f2f3235320aa5b14130acb07fc13c01
Author: Timothy Bish <ta...@...>
Date: 2018-08-28T20:11:14Z
ARTEMIS-2062 Only attempt to refill credit when needed
Avoid firing the offerProducerCredit code when we know that the credit
is low enough that a refill is needed which avoids lock contention and
garbage creation as each inbound message is processed.
----
> AMQP: Reduce lock contention and allocations on message processing
> -------------------------------------------------------------------
>
> Key: ARTEMIS-2062
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2062
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: AMQP
> Affects Versions: 2.6.2
> Reporter: Timothy Bish
> Assignee: Timothy Bish
> Priority: Minor
> Fix For: 2.7.0
>
>
> On each inbound message the current AMQP handler attempts to top off credit for the receiver which results in a new runnable being created to hand off to the PagingManager or PagingStore and that code will result in a lock / unlock on the connection lock regardless of credit needing to be offered. The handler can tell if the credit is below the min credits threshold before ever needing to fire this action and can avoid that work for each message by only firing off the credit offering code when the credit is known to be low.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)