It's all about the answers!

Ask a question

How to setup the heap size using WAS


0
1
Manoj Panda (39336662) | asked Dec 05 '12, 11:32 a.m.
JAZZ DEVELOPER

This is about heap sizes and JVM arguments while setting up with WAS. I have 16GB memory and 64 bit windows OS. So the initial settings could be as below. And

the initial and maximum heap size set to 4096
-Xmx4g -Xms4g -Xmn512m
-Xgcpolicy:gencon -Xcompressedrefs
-Xgc:preferredHeapBase=0x100000000
 The above configuration/settings works fine with me.
 
In case I need more heap size then:--
 Tip: If you need more heap size,
then you can use the following setting, replacing {N} with the amount of memory
to be used and {N/8} with 1/8 of the total memory. For example, if -Xmx is set
to 8g, -Xmn should be set to 1g.
-Xgcpolicy:gencon -Xmx{N} -Xms{N} -Xmn{N/8}
-Xcompressedrefs  -Xgc:preferredHeapBase=0x100000000
 If the above statement is true then following is my configuration.
 -Xmx8g -Xms4g –Xmn 1g
-Xgcpolicy:gencon -Xmx{N} -Xms{N} -Xmn{N/8}
-Xcompressedrefs  -Xgc:preferredHeapBase=0x100000000
And of course the initial and maximum heap size set to 8192
After I have done above settings, the WAS console does not start. Is there anything wrong while increasing the heap size to 8g.?? where is log file and what could be the name of the log file i should read
 

2 answers



permanent link
Kim Soederhamn (1.5k24247) | answered May 12 '14, 7:31 a.m.
there is a space in one of the settings - just in case someone decides use these settings


Comments
Karl Weinert commented May 12 '14, 10:24 a.m.
JAZZ DEVELOPER

Kim,

Could you clarify a bit further?
Thanks 


Kim Soederhamn commented May 12 '14, 11:36 a.m.

In the value:

 -Xmx8g -Xms4g Xmn 1g

there is a space between -xmn and 1g which is wrong - if you don't see it I'm sure your WAS will act pretty weird



permanent link
Karl Weinert (2.0k52736) | answered Dec 05 '12, 12:27 p.m.
JAZZ DEVELOPER
edited Dec 06 '12, 8:56 a.m.
The logs should be in the logs directory  under the WAS profile
...\WebSphere\AppServer\profiles\AppSrv01\logs\server1 is where they are on my system

I suggest stopping the server, deleting  the existing logs, restarting  the server and looking through any of the new logs with data.

I have also seen issues with the -Xgc:preferredHeapBase=0x100000000 setting
That requires the memory to be contiguous which seems to be a frequent problem. Although with 16 gigs of RAM that becomes much less likely. Still might be worth testing without it.

Update:
I have not set up WAS with 8 gigs of memory at least in a while.
I usually go much lower because I am on my personal system and only use it for testing.
I have seen a number of customers set up that way so it should work.
In case there is a problem the settings are contained in the server.xml file.
If you create a backup copy of that before making changes it should be easy enough to revert back to the old settings instead of having to recreate the profile.

It will be located here:
\WebSphere\AppServer\profiles\AppSrv01\config\cells\<servername>Node04Cell\nodes\<servername>Node04\servers\server1\server.xml
where <servername> = the name of my computer

The jvm settings are under the jvmEntries tag in that file as follows:
(Note the heap sizes are in MB)
initialHeapSize="4096"
maximumHeapSize="4096"
-Xgc:preferredHeapBase=0x100000000"

To set the values from the admin console
Log into WebSphere select server->server types -> WebSphere application servers
Choose server1 from the list
On the right column expand "Java and Process Management"
Select "Process Definition"
Under additional properties select "Java Virtual Machine"
Set Initial heap size and Maximum heap size to your desired values (in MB)
the -Xgc:preferredHeapBase setting will be on the same page under Generic JVM arguments if it is set.




Comments
Manoj Panda commented Dec 06 '12, 2:04 a.m.
JAZZ DEVELOPER

Hi Karl,
  I would like to know whether you have increased the heap size from 4g to 8G, if yes how?

Is there any issue. I dont mind to change now, but i am little scared in case WAS does not start after i change the settings.


Karl Weinert commented Dec 06 '12, 8:56 a.m.
JAZZ DEVELOPER

Hi Manoj See my update to my answer above (it was a little long for a comment)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.