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

Bernd Gutjahr commented on ARTEMIS-496:
---------------------------------------

I tested it with a HEAD version. It looked better in that the amount of 
allocated memory per client thread was smaller than before. This time I got 
~180kB per thread. In conjunction with the new thead pool (ARTEMIS-507), this 
will no longer be an issue for me, since there won't be that many idle client 
threads hanging around infinitely.
It's OK with me to just close this JIRA.

> Client threads allocate a lot of memory
> ---------------------------------------
>
>                 Key: ARTEMIS-496
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-496
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Bernd Gutjahr
>
> Client threads from the global client thread pool have a lot of memory 
> allocated in io.netty.buffer.PoolThreadCache instances. In our application, I 
> have seen cases with 500 kB per client thread. With the thread pool changed 
> to a fixed size pool with 500 threads, this added up to 250 MB.
> It looks this is caused by Netty's byte buffer pooling, since netty uses 
> thread-local caching. So each Artemis client thread gets a separate byte 
> buffer pool.
> To validate this assuption, I changed NettyConnection .createTransportBuffer 
> to use .ioBuffer instead of .directBuffer. With that change, the whole memory 
> allocation issue went away. But I don't know what other impact such a change 
> would have. I guess I real fix would be more complicated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to