directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [mina] Performance issues
Date Wed, 23 Mar 2005 14:59:34 GMT
Hi,

On Wed, 23 Mar 2005 15:05:55 +0100, Jan Andersson <janne@minq.se> wrote:
> Hi,
> 
> > The Connector seems to be working much better now.  Memory consumption
> > is still an issue with the server running out of memory at around 8000
> > concurrent connections.
> >
> > Here's the stack trace -
> >
> > Exception in thread "SocketAcceptor-0" java.lang.OutOfMemoryError:
> > Direct buffer memory
> >         at java.nio.Bits.reserveMemory(Unknown Source)
> >         at java.nio.DirectByteBuffer.<init>(Unknown Source)
> >         at java.nio.ByteBuffer.allocateDirect(Unknown Source)
> >         at
> > org.apache.mina.common.ByteBuffer.allocate(ByteBuffer.java:95)
> >         at
> > org.apache.mina.io.socket.SocketSession.<init>(SocketSession.java:94)
> >         at
> > org.apache.mina.io.socket.SocketAcceptor$Worker.run(SocketAcceptor.java
> > :227)
> >
> >
> > This was using default JVM settings till now.  Tinkering out with
> > different heap sizes now.
> >
> > I'm using JDK 1.5.0_01
> 
> When running out of direct buffer memory, try using the
> -XX:MaxDirectMemorySize
> option. For example:
> 
>  -XX:MaxDirectMemorySize=128M

Thanks for pointing out a good point.  I remember you implemented your
byte buffer pool to allocate non-direct buffer when OutOfMemoryError
is caught.  Would it be OK to modify byte buffer pool like you did? 
WDYT?

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message