[
https://issues.apache.org/jira/browse/IMAP-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008935#comment-13008935
]
Wojtek Strzalka commented on IMAP-265:
--------------------------------------
So - it looks like not memory leak but rather specific way netty works (and how
we are using it).
The batching algorithm we have doesn't really works as Netty is accepting any
data we are writing and keeps it in the underlying buffers. So our batches
executes one ofter another - and when having like large fetches (my test case)
it all sits in the memory when sent to the client having relatively poor
bandwith.
http://www.jboss.org/netty/community.html#nabble-td3712846
Maybe we can use this ??
http://docs.jboss.org/netty/3.2/api/org/jboss/netty/handler/stream/ChunkedWriteHandler.html
> Memory leakeage problem
> -----------------------
>
> Key: IMAP-265
> URL: https://issues.apache.org/jira/browse/IMAP-265
> Project: JAMES Imap
> Issue Type: Bug
> Reporter: Wojtek Strzalka
>
> There is constant memory leakage while heavy testing.
> I was experiencing OOM while testing huge mailboxes with even single client
> (greedy one - it open many simultanous connections).
> So I'd increased memory for James and then did a memory dump after testing
> session (all clients were disconnected > 10 minutes at the time) and checked
> what's sitting there.
> ------------
> 66323 instances of class org.jboss.netty.buffer.BigEndianHeapChannelBuffer
> 66299 instances of class
> org.jboss.netty.util.internal.LinkedTransferQueue$Node
> 66250 instances of class org.jboss.netty.channel.DefaultChannelFuture
> 66250 instances of class org.jboss.netty.channel.DownstreamMessageEvent
> 7853 instances of class org.jboss.netty.buffer.TruncatedChannelBuffer
> 2048 instances of class
> org.jboss.netty.util.internal.ConcurrentIdentityHashMap$Segment
> 2048 instances of class
> [Lorg.jboss.netty.util.internal.ConcurrentIdentityHashMap$HashEntry;
> 512 instances of class org.jboss.netty.util.MapBackedSet
> 512 instances of class org.jboss.netty.util.internal.ConcurrentIdentityHashMap
> 512 instances of class
> org.jboss.netty.util.internal.ConcurrentIdentityHashMap$KeyIterator
> 512 instances of class
> org.jboss.netty.util.internal.ConcurrentIdentityHashMap$KeySet
> 512 instances of class
> [Lorg.jboss.netty.util.internal.ConcurrentIdentityHashMap$Segment;
> 204 instances of class javax.mail.util.SharedFileInputStream
> 201 instances of class org.apache.james.imap.main.ResponseEncoder
> 197 instances of class
> org.apache.james.imap.processor.IdleProcessor$IdleMailboxListener
> 174 instances of class
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext
> 147 instances of class org.apache.james.mime4j.util.CharsetUtil$Charset
> 118 instances of class org.apache.log4j.CategoryKey
> ---------------------------
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]