You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by 38797715 <38...@qq.com> on 2021/05/12 06:39:35 UTC
when persistence enabled,MaxDirectMemorySize = walSegmentSize * 4
hello team,
doc says:
If you use Ignite native persistence, we recommend that you set the
MaxDirectMemorySize JVM parameter to walSegmentSize * 4
why?
In addition, for the following configuration and code:
"vmArgs": "-XX:+PrintGCDetails -XX:MaxDirectMemorySize=5m"
ByteBuffer bb = ByteBuffer.allocateDirect(6 * 1024 * 1024);
This code throws the following error:
Caused by: java.lang.OutOfMemoryError: Direct buffer memory
Why isn't ignite affected by the MaxDirectMemorySize parameter?
Re: when persistence enabled,MaxDirectMemorySize = walSegmentSize *
4
Posted by akorensh <al...@gmail.com>.
Hi,
Make sure that -XX:+DisableExplicitGC is not used to avoid facing
https://bugs.openjdk.java.net/browse/JDK-8142537.
Also use
-XX:-HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=..
to take a heap dump and see where memory is being consumed.
see:
https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/clopts001.html
Ignite uses a memory mapped file for WAL operations, which is the likely
place where this direct byte buffer memory allocation is taking place.
see:
https://ignite.apache.org/docs/latest/persistence/native-persistence#wal-modes
from doc:
The memory-mapped file approach is used by default and can be switched off
by setting the IGNITE_WAL_MMAP system property to false.
Thanks, Alex
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/