Dmitry Konstantinov created CASSANDRA-19976:
-----------------------------------------------

             Summary: Consider setting -Djdk.nio.MaxCachedBufferSize by default
                 Key: CASSANDRA-19976
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19976
             Project: Cassandra
          Issue Type: Improvement
          Components: Local/Config
            Reporter: Dmitry Konstantinov


Long time ago CASSANDRA-8670 added a fix of native memory leaking through 
JDK-level thread-local caches for direct buffers. 
>From one side since that time there were a lot of changes in Cassandra IO and 
>networking logic. From another side 
>https://bugs.openjdk.org/browse/JDK-8147468 - a JDK-level fix for the issue 
>(by adding of -Djdk.nio.MaxCachedBufferSize option) was implemented some time 
>after CASSANDRA-8670 and backported to JDK8.

Since that time there were many places where the JDK option has been mentioned 
in a similar context as a possible way to protect against direct byte buffer 
memory leakage:
- CASSANDRA-10689
- CASSANDRA-13931
- CASSANDRA-15006
- CASSANDRA-15400
- 
https://support.datastax.com/s/article/JVM-OOM-direct-buffer-errors-affected-by-unlimited-javanio-cache
 (DSE currently sets it by default to 1Mb)
- 
https://github.com/k8ssandra/cass-operator/blob/19ed28196f2549a763ec7d3794328565f6d4b127/docs/user/jvm_server_configuration.md?plain=1#L207

I have created the ticket to consider if it makes sense to add 
-Djdk.nio.MaxCachedBufferSize by default to Cassandra jvm-server.options.




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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to