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