directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Directory Wiki] Update of "MinaPerformance" by TrustinLee
Date Sat, 06 May 2006 11:54:13 GMT
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:

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 [
our web site] periodically.

View raw message