2

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?

ᄂ ᄀ
  • 5,669
  • 6
  • 43
  • 57
dinhokz
  • 895
  • 15
  • 36

2 Answers2

4

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.

kaczyns
  • 216
  • 1
  • 4
  • Maybe someone has changed this option before increasing total Heap Memory size. There is no other work continuing in the server because the monitoring tool that I use can track any asynchronous task started by the application. – dinhokz Mar 17 '16 at 21:02
  • 1
    It could be that it was changed before, perhaps someone did not understand what the effect would be. In any case, if the server does not process any work after the limit is reached, then I don't see any benefit in setting the property at all - might as well let it default to unbounded and let the server run as long as it can until it runs out, while debugging the probable memory leak in parallel. – kaczyns Mar 18 '16 at 09:12
2

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.

BevynQ
  • 8,089
  • 4
  • 25
  • 37