Bernd Gutjahr created ARTEMIS-496:
-------------------------------------
Summary: 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)