Resizing Direct Buffer Memory

1.1k Views Asked by At

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?

2

There are 2 best solutions below

2
On BEST ANSWER

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.

0
On

According to the Oracle documentation

http://docs.oracle.com/cd/E15289_01/doc.40/e15062/optionxx.htm#BABGCFFB

by default there is no limit

According to the IBM documentation

https://www.ibm.com/support/knowledgecenter/SSYKE2_7.0.0/com.ibm.java.win.70.doc/diag/appendixes/cmdline/xxmaxdirectmemorysize.html

it starts small and slowly grows.

It is more likely you have a memory leak that should be investigated.