activemq-issues mailing list archives

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


ASF GitHub Bot commented on ARTEMIS-1248:

Github user franz1981 commented on the issue:
    @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
    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:
>             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

This message was sent by Atlassian JIRA

View raw message