Page 1 of 1

Websphere JVM Heap Size

Posted: Mon Nov 06, 2017 3:14 pm
by gsbrown
Is there a general rule of thumb when it comes to setting JVM "initial heap size" and "maximum heap size" in Websphere Console?

We have 64-bit with 32MB memory and currently have "initial" set to 1280MB and "maximum" set to 2048MB.
We've recently run into two cases where dsjob command failed with "'java::lang::OutOfMemoryError'".
Currently when I check "free -m" on the server it's showing 4MB free.

Curious if anyone can help determine if our settings could be tweaked a little better? I keep finding conflicting articles that suggest we could either have too little allocated or too much allocated.

Posted: Mon Nov 06, 2017 3:49 pm
by qt_ky
I assume you mean you've got 32 GB of memory, not MB.

We have some servers with 50+ GB of memory, initial size heap size of 1280 MB and max heap size of 8192 MB. Unfortunately I don't recall how we arrived at that number.

It's going to depend on which products you run. I would recommend you work with product Support on it. Could you also post the links to these conflicting articles?

Also I am not sure that WAS setting is directly related to your dsjob error or not. Over the years, we have run across many commands and server scripts that need to have their default java -Xmx values increased due to the 'java::lang::OutOfMemoryError' error.

Posted: Mon Nov 06, 2017 4:24 pm
by chulett
... did you mean "decreased" in that last sentence?

Posted: Tue Nov 07, 2017 8:32 am
by qt_ky
No, I meant increased, because the various scripts you execute on the server didn't always allocate enough memory to begin with (via the -Xmx argument), leading to the out of memory error. That was a common problem back in version 8.5 and less so in 8.7. We skipped 9.x and I haven't really run into it much in 11.3.

Xmx specifies the maximum memory allocation pool for a Java Virtual Machine (JVM). Hope that helps.

Posted: Tue Nov 07, 2017 10:00 am
by chulett
Gotcha... sorry I was thinking that if you were running out of heap memory that you might have needed to decrease some, if they were allocating more than they really needed to so others had access to it. Thanks for the clarification.