[ https://issues.apache.org/jira/browse/ARTEMIS-496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15258286#comment-15258286 ]
Justin Bertram commented on ARTEMIS-496: ---------------------------------------- Can you test this on HEAD rather than 1.2? I seem to remember some fixes for something like this were committed since 1.2 was released. Thanks! > 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)