[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mina-dev
Subject:    Re: OutOfMemory when using ReadThrottleFilter
From:       Trustin Lee <trustin () gmail ! com>
Date:       2007-02-21 2:19:01
Message-ID: 1172024341.32524.1.camel () localhost
[Download RAW message or body]


2007-02-20 (화), 23:49 +0100, mail@swenmoc.de 쓰시길:
> > 1) Increase max total direct buffer size using 
> > -XX:MaxDirectMemorySizeoption (
> > e.g. -XX:MaxDirectMemorySize=128M)
> 
> That we have already tried, but the error will occure only later.
> 
> > 2) Change the allocator to SimpleByteBufferAllocator (i.e.
> > ByteBuffer.setAllocator(new SimpleByteBufferAllocator());)
> 
> This option solve our problem :-) 
> 
> > 3) Allocate heap buffers instead of direct buffers (i.e.
> > ByteBuffer.setUseDirectBuffers(false);)
> 
> This option only brings an out-of-memory error for the heap.
> 
> > 
> > Please try each step not reverting back the previous step.  I believe
> > OutOfMemoryError will be gone once you reach to the step 3, but please let
> > me know the result.
> 
> Again, the SimpleByteBufferAllocator seems to solve the problem. Thanks a lot for your help! 
> The mina framework help us a lot in the development of our network layer. Thanks to the mina team!

Employing both 2) and 3) will be the best in performance for current
VMs.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic