On 11/6/07, Ronny Standtke <[EMAIL PROTECTED]> wrote:
> Trustin Lee wrote:
> >
> > I'm not sure you configured the Echo server properly.  Setting the
> > receiveBufferSize to 3000 instantly boosted the throughput to 50MB/s.
> > I don't know why, but it seems like the receiveBufferSize is affecting
> > the performance seriously.
> >
> This is very strange. Today I run some tests with different
> receiveBufferSize values and up to a size of EXACTLY 10837 Byte I only get
> 86 KByte/s. Starting from 10838 I get around 50 MByte/s.
>
> My system is a P4 running Debian testing with Java 1.6.0_05-ea (Yes, the
> early access release because 1.6.0u3 still has a serious NIO bug I run into,
> see here:  http://forum.java.sun.com/thread.jspa?threadID=5135128 Sun
> Developer Forum )
>
> After enlarging the receiveBufferSize a little more (30k) I suddenly get the
> following exception on the MINA side:
>
> java.lang.OutOfMemoryError: Direct buffer memory
>                 at java.nio.Bits.reserveMemory(Bits.java:633)
>                 at
> java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
>                 at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
>                 at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:57)
>                 at sun.nio.ch.IOUtil.read(IOUtil.java:205)
>                 at
> sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
>                 at
> org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:208)
>                 at
> org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:188)
>                 at
> org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:44)
>                 at
> org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:464)
>                 at
> org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
>                 at java.lang.Thread.run(Thread.java:619)
>
> Ouch! Do I have to turn another knob somewhere in MINA to prevent this
> Exception?

It seems like the echo server example in 1.x is somewhat broken.
Today, I was able to get 190MiB/s with the latest snapshot though.
Thank you again for your help.  BenchmarkClient was very helpful to
me.

> Trustin Lee wrote:
> >
> > I was able to fix a bug thanks to your report.  Thank you so much!  If
> > you have some free time, you could check out the latest MINA from our
> > source code repository and try the test again.
> >
>
> Thank you very much for this offer. I will take a look for sure.
> Unfortunately my time is very limited right now, so this may take a while...

No problem.  Please take your time.

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

Reply via email to