YourKit shows the Class list as follows:
- java.nio.HeapByteBuffer
 - org.apache.mina.common.SimpleByteBufferAllocator$SimpleByteBuffer
  - org.apache.mina.filter.codec.ProtocolCodecFilter$HiddenByteBuffer
   - org.apache.mina.common.IoFilter$WriteRequest
    - java.util.concurrent.ConcurrentLinkedQueue$Node

Note the above contributes 99%+ for the byte[] allocations, and the byte[] 
allocations are causing the OOM.

> -----Original Message-----
> From: Gerrit Grobbelaar <[EMAIL PROTECTED]>
> Sent: Saturday 26 July 2008 09:48
> To: [email protected]
> CC: 
> Subject: Re: byte[] usage - not GCd
>
>
> Another symptom:
>  - 100 Java client bots connected, sending NO messages.
>  - 1 Flash client, typing in a message every 2 seconds
>  - memory consumption (byte[] allocations) increases and a Mark Sweep with
> JConsole doesn't do anything (stays on 100s of MBs).
>  - kill off all bots
>  - Mark sweep
>  - Heap mem usage drops to about 2 - 5MB
>
> > -----Original Message-----
> > From: Gerrit Grobbelaar <[EMAIL PROTECTED]>
> > Sent: Saturday 26 July 2008 09:33
> > To: [email protected]
> > CC:
> > Subject: byte[] usage - not GCd
> >
> >
> > Hi,
> >
> > I'm having an issue with OOM - here is my story:
> >
> > Criteria:
> > --------
> >  - concurrent clients connecting to a chatserver, need to broadcast the
> > messages
> >  - clients keep same connection (each one having its own IoSession during
> > lifetime)
> >
> >
> > Symptoms:
> > --------
> >  - massive amounts of byte[] allocations that just grows and grows, until
> > OOM. - still OOM even if i have 100 bots connected, sending one message
> > each every 5 minutes
> >
> > When I have 1 - 5 clients connected (all simulated with bots) that send
> > one message per bot every 2 - 5 seconds, heap space stays under control
> > with GC.
> >
> >
> > Configs/Tools:
> > -------------
> >  - JVM:  1.6u7
> >  - VM arguments:  -Xms128m -Xmx384m
> >  - Operating System:  Linux 2.6.15.7
> >  - Architecture:  i386
> >  - Number of processors:  2
> >  - Model:  Intel(R) Pentium(R) 4 CPU 2.80GHz
> >  - Committed virtual memory:  681,564 kbytes
> >  - Heap buffer allocation (Direct is very insufficient)
> >  - SimpleByteBufferAllocator (do note I have same result with
> > PooledByteBufferAllocator)
> >  - YourKit and JProfiler
> >
> > Both YourKit and JProfiler point fingers at:
> > byte[] allocation due to org.apache.mina.common.IoSession.write() calls
> >
> >
> > What could I possibly be doing wrong that I will have the above scenario
> > where the byte[] allocations never GC properly?
> >
> > Thanks,
> > Gerrit

Reply via email to