Search code examples
javaout-of-memorywebsphereshared-memoryibm-jvm

Resizing Direct Buffer Memory


I have an application running on Websphere 8.5, I know that the Heap Memory Size of this particular JVM was increased in the past. The committed memory now is 5.6GB but we are having memory issues related to Direct Buffer Memory and now we need to resize it as well. I can see this problem happening through a monitoring toll, so I can't see the size of the direct memory.

My questions are: Is there a correct sizing for the direct memory according to the Java Heap Memory size? Lets say, at least X MB for each X GB.

What is the default value of the XX:MaxDirectMemorySize option?

What else should I consider before changing this option?


Solution

  • The doc (for IBM Java 7) says it's unbounded by default: https://www.ibm.com/support/knowledgecenter/SSYKE2_7.0.0/com.ibm.java.win.70.doc/diag/appendixes/cmdline/xxmaxdirectmemorysize.html

    I think you should consider whether you are willing to let the application that is using the direct memory fail, while allowing other work to continue in the server. Setting the direct memory size will only cause the application to fail faster, since the default is unbounded.