[ 
https://issues.apache.org/jira/browse/RATIS-2189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17898218#comment-17898218
 ] 

Ivan Andika commented on RATIS-2189:
------------------------------------

Currently we are doing a large scale write benchmark on the datanodes which 
causes "java.lang.OutOfMemoryError: Direct buffer memory". We tried to use the 
heap buffer, but we found that after we set noPreferDirect, 
java.nio.DirectByteBuffer instances are still getting created.

We found that it might be due to NettyDataStreamUtils using 
ByteBufAllocator#directBuffer instead of ByteBufAllocator#ioBuffer.

> Use ByteBufAllocator#ioBuffer in NettyDataStreamUtils
> -----------------------------------------------------
>
>                 Key: RATIS-2189
>                 URL: https://issues.apache.org/jira/browse/RATIS-2189
>             Project: Ratis
>          Issue Type: Improvement
>          Components: Streaming
>            Reporter: Ivan Andika
>            Priority: Minor
>
> Currently, NettyDataStreamUtils uses ByteBufAllocator#directBuffer which 
> forces all ByteBufAllocator to allocate direct buffer even forĀ 
> PreferHeapByteBufAllocator (e.g. when we set 
> -Dorg.apache.ratis.thirdparty.io.netty.noPreferDirect=true).
> It's better to use ioBuffer and delegates to the actual ByteBufAllocator to 
> the type of memory it will use.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to