activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1248) Reduce garbage while Paging
Date Fri, 23 Jun 2017 06:04:00 GMT

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

ASF GitHub Bot commented on ARTEMIS-1248:
-----------------------------------------

Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1361
  
    @clebertsuconic There is no need to use a ThreadLocal or a pooled buffer there because:
    1) the method (write/read) is synchronized and it is safe to reuse the same ByteBuf wrapper
between different threads (note: is only a wrapper on the ByteBuffer provided by the file
factory)
    2) the file factory already provides a (thread local) pooled direct ByteBuffer (on NIO)
    In the old version the most of the garbage was already avoided due to the fileFactory
ByteBuffer thread local pooling, but I've measured after multiple Page writes lots of minor
GCs due to many short living ActiveMQBuffer instances. This change aims reduce that instances
to be only 1 per Page: it is not optimal but is a big improvement.
    With 100 bytes messages and a Page of 10 MB it avoids about 104856 instances of garbage.


> Reduce garbage while Paging
> ---------------------------
>
>                 Key: ARTEMIS-1248
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1248
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>            Priority: Minor
>
> While Paging It reuse the ActiveMQBuffer used to perform operations on the underlying
SequentialFile.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message