You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@directmemory.apache.org by Chetan Mehrotra <ch...@gmail.com> on 2014/01/14 17:22:07 UTC
Which MemoryService to use
In the codebase I can see various MemoryManagerService
1. MemoryManagerServiceImpl - Uses MergingByteBufferAllocator.
2. UnsafeMemoryManagerServiceImpl - Uses LazyUnsafeAllocator
3. One which can potentially use Partion Buffer [1]
Of the above #1 is used by default
Given that one is running on Oracle JDK and Unsafe is accessible which
one should be used?
Also any recommendation on what values should be used for
* numberOfBuffers
* size of buffer
Should one create few big buffers e.g. 1 GB each or more number of large buffers
Chetan Mehrotra
[1] https://github.com/noctarius/directmemory/blob/buffer/directmemory-buffer
Re: Which MemoryService to use
Posted by "Raffaele P. Guidi" <ra...@gmail.com>.
Buffers size should ideally be 2gb (maximum allowed) and their number
depends on your total memory availability and needs - remember to set the
JVM parameter xx:maxdirectmemorysize accordingly.
The default implementation should be the more stable and overall efficient
but feel free to experiment with the others.
Ciao,
R
Il 14/gen/2014 17:22 "Chetan Mehrotra" <ch...@gmail.com> ha
scritto:
> In the codebase I can see various MemoryManagerService
>
> 1. MemoryManagerServiceImpl - Uses MergingByteBufferAllocator.
> 2. UnsafeMemoryManagerServiceImpl - Uses LazyUnsafeAllocator
> 3. One which can potentially use Partion Buffer [1]
>
> Of the above #1 is used by default
>
> Given that one is running on Oracle JDK and Unsafe is accessible which
> one should be used?
>
> Also any recommendation on what values should be used for
> * numberOfBuffers
> * size of buffer
>
> Should one create few big buffers e.g. 1 GB each or more number of large
> buffers
>
> Chetan Mehrotra
> [1]
> https://github.com/noctarius/directmemory/blob/buffer/directmemory-buffer
>