You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by Apache Wiki <wi...@apache.org> on 2006/05/06 13:54:13 UTC
[Directory Wiki] Update of "MinaPerformance" by TrustinLee
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Directory Wiki" for change notification.
The following page has been changed by TrustinLee:
http://wiki.apache.org/directory/MinaPerformance
The comment on the change is:
Added some performance tips
New page:
== Performance Tips ==
Strangely, some modern JVMs seem to perform better with heap buffers than with direct buffers. Try to set the buffers to be allocated as heap buffers by default:
{{{
ByteBuffer.setUseDirectBuffers( false );
}}}
If you decided to use heap buffers by default, you'd better change the default {{{ByteBufferAllocator}}} to {{{SimpleByteBufferAllocator}}} for even higher performance. The default allocator, {{{PooledByteBufferAllocator}}}, was created because allocating a direct buffer takes a lot of time comparing to the case of a heap buffer.
{{{
ByteBuffer.setAllocator(new SimpleByteBufferAllocator());
}}}
Additionally, you can adjust the size of the eden (the heap area for young objects in a JVM). It is known that about 30% of the maximum heap size will be OK in general. For example:
{{{
java -Xmx1024m -XX:NewSize=300m
}}}
== Impressive Performance Stories ==
Please post your success story on performance. We'll move your testimonials here to [http://directory.apache.org/subprojects/mina/testimonials.html our web site] periodically.