This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Websphere and the fly likes WebSphere : JVM Heap size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "WebSphere : JVM Heap size" Watch "WebSphere : JVM Heap size" New topic
Author

WebSphere : JVM Heap size

JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Hi all,

I would like having some recommendations, docs or links to usefull information about Heap size settings within WebSphere 5.x

Actually, I would like to know what is usually the heap size (both min and max) to configure for a websphere server.
I am aware it strongly depends on the applications deployed onto the server, the number of users, blah, blah, blah... but if someone have "real life" experiences with WAS-J2EE applications, maybe you can share indicating the heap size you are using (I'm sure you understand I'm not a sustem admin)

ex :

A - less than 256 Mo
B - 256 to 512
C - 512 to 1024
D - 1024 to 1536
E - 1536 to 2048
F - more than 2048 Mo





Kyle, If you are around, I would appreciate some input from you

TIA,
[ September 28, 2004: Message edited by: Jean-Louis Marechaux ]

/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Minimum requirements for WAS are 768 MB on iSeries and 512 MB on other platforms. If your app is using EJBs it is 1 GB and 768 MB.
Our app has the maximum heap size 2.5 GB. Average memory usage is around 1GB.


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

Hi david ,

is there any releatin between RAM and heap memory .

can you tell other setting related to WAS which may lead to performance improvment .

like thread pool size for web container,Cache size of EJB container


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Thanks for sharing David.

Where did you find this information about the minimum heap size requirements ??
Brian Austin
Greenhorn

Joined: Apr 24, 2003
Posts: 14
I think David's numbers are too high in general. It all depends on your app. We have a bunch of apps running with a max heaps of 128. We even have a very large app with lots of EJBs running with a 512 heap.
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Originally posted by Brian Austin:
I think David's numbers are too high in general. It all depends on your app. We have a bunch of apps running with a max heaps of 128. We even have a very large app with lots of EJBs running with a 512 heap.


Sounds very low !! How many concurrent users do you have on these applications ??
Brian Austin
Greenhorn

Joined: Apr 24, 2003
Posts: 14
The 128 meg heap apps are pretty small, but the large 512 app runs at 400-600 concurrent users at any one time.
Scott Duncan
Ranch Hand

Joined: Nov 01, 2002
Posts: 363
is there any releatin between RAM and heap memory


Yes. They directly effect each other.


No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
I think that 512 megs is too low. I'm looking now in the native_stdout.log and current heap size is 1.7 GB. Currently is running 180 users.
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Here you could find the hardware requirements for WAS.

http://www-306.ibm.com/software/webservers/appserv/doc/v51/prereqs/hardware511.htm
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Originally posted by David Ulicny:
Here you could find the hardware requirements for WAS.

http://www-306.ibm.com/software/webservers/appserv/doc/v51/prereqs/hardware511.htm


Thanks David.
But I don't think the minimum RAM required is enough to be able to set the heap size (min and max).
Brian Austin
Greenhorn

Joined: Apr 24, 2003
Posts: 14
The specs in that link are for the minimum server requirements to install WAS, not minimum heap size requirements for applications running in WAS.

Basically, in my opinion noone can really tell you exactly what you heap size should be. It all depends on your specific app and what you are doing in it. Some apps may only need 128 meg while other need 2 Gig.
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Originally posted by Brian Austin:
The specs in that link are for the minimum server requirements to install WAS, not minimum heap size requirements for applications running in WAS.

Basically, in my opinion noone can really tell you exactly what you heap size should be. It all depends on your specific app and what you are doing in it. Some apps may only need 128 meg while other need 2 Gig.


I fully agree with you Brian.
The objective of my post was to obtain some feedback from JRanchers about the heap size you are using in your applications.
What I can see is that some of you, due to their needs, are setting the heap size up to 2 Mb.
So a heap size of 1 Mb - 1.5 mb(what I am using) is not abnormal
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
I talked with guys from IBM which do support for WAS. They told me about application which alocates 45GB heap. Of course it starts swapping on hard disk. Garbage collector was running on that heap one hour :-).
[ October 07, 2004: Message edited by: David Ulicny ]
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Thanks for this interesting information David.

45 GB heap !! Woooow. We sound like rookies with our 1 GB heap size application
[ October 07, 2004: Message edited by: Jean-Louis Marechaux ]
Brian Austin
Greenhorn

Joined: Apr 24, 2003
Posts: 14
Wow, 45 Gig ..... thats crazy.

No, I would say what you are using is right on par with alot of the heap sizes that apps out there are running.
Mayuri Roi
Greenhorn

Joined: Oct 12, 2004
Posts: 23
Originally posted by David Ulicny:
I think that 512 megs is too low. I'm looking now in the native_stdout.log and current heap size is 1.7 GB. Currently is running 180 users.


Is there anything that i have to configure to capture log info in native_stdout.log?? On my system, it is always empty!!! Is this the file that tells how many concurrent users and current memory usage by the app server??? Or is there anything else that helps?? (I tried enabling PMI, but wasn't successful in accessing it remotely using Tivoli Performance Montior. So trying for alternatives to find out memory usage and concurrent users info).


Thanks.<br />Mayuri
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
If you want to enable native_stdout you should go to
Application Servers > server1 > Process Definition >Java Virtual Machine
and check Verbose garbage collection
If you want to use PMI go to (Runtime)
Application Servers > server1 > Performance Monitoring Service
switch on what you want to monitor.

Native log only tells about memory usage.
Mayuri Roi
Greenhorn

Joined: Oct 12, 2004
Posts: 23
Originally posted by David Ulicny:
If you want to enable native_stdout you should go to
Application Servers > server1 > Process Definition >Java Virtual Machine
and check Verbose garbage collection
If you want to use PMI go to (Runtime)
Application Servers > server1 > Performance Monitoring Service
switch on what you want to monitor.

Native log only tells about memory usage.


I have enabled Performance Monitoring Service. But when tried to view using "Tivoli Performance Viewer", I am always getting this error...

"PMON5002W: The performance monitoring service is disabled for all servers. Enable it for atleast one server, and restart that server to run the performance advisor"

I am not able to figure out what is going wrong. I made sure I have enabled performance monitor services from admin console both in Runtime and Configuration tabs for server1 (Selected Standard, all modules to High H). Restarted the server after enabling. But no luck. I am always getting the same above msg when tried to view.
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Try to check the Startup check box in Configuration. It helps me.
Benny Thomas
Ranch Hand

Joined: Sep 13, 2003
Posts: 44
Hi guys

I was having a problem with an application in WAS 4.
The application was crashing when 4-5 users login on a 1 GB RAM machine.
I tried it on a 4 GB RAM mc, and the memory continiously increases.
I gave an initial heap size of 256 MB and max of 1024 MB.
Pls send me your comments on what i can tune.
All of you have been talking about max heap, how should we determine the minimum heap to use.
And for a 4 GB RAM machine with WAS 4 and SQLServer, what do you think are the heap sizes i can try with.

Cheers

Thanks in advance for the help.


IBM Certified System Administrator - Websphere Application Server 5
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
In the WAS documentation is that minimum heap size is about 512MB on Windows(Unix,Linux) machine and 768MB on iSeries, it also depends on if you are using EJB's or not. If your memory is increasing then you have to check what is happend with garbage collection. Check it with -verboseGC (native_stdout.log). You could also use PMI and Tivoli Performance Viewer.
There could also some bug in application (some kind of memory leak). You could try to use some profiler to check that.

Good luck,
WAS tuning is not easy
david lightman
Ranch Hand

Joined: Nov 03, 2004
Posts: 82
Interesting thread.

From my experience web applications are able to run much lower heap size that transactions that utilize EJB's, have XA enable transactions, and lengthy DB calls from the DAO layer.

alot depends also if you have the application clustered so many jvms can concurrently process your transactions. If your data gets required large buffers, you obviously need more heap.

My question is, where did you get the min values you posted? (512 iseries/ 768 linux/windows) can you provide a link?

And what was the 45gig in reference to? not websphere' jbm heap size.

the limit was 800MB for a very long time in zLinux, Im curious to know the max for each platform.

thanks!
William Janssen
Ranch Hand

Joined: Jan 02, 2007
Posts: 39
Since only the latest versions of WebSphere support a 64bit JDK and 5.x only supports a 32bit jdk it is not possible to get a heap size of 45Gb on WAS 5.x. The maximum size depends on the OS WAS runs on, the memory settings on the OS and the amount of native memory used by the JVM (e.g. prepared statements).The golden rule is to check the GC output to see the amount of memory you need for your setup.
 
Don't get me started about those stupid light bulbs.
 
subject: WebSphere : JVM Heap size
 
Similar Threads
Is it important...
Memory Leaks and OutOfMemory
How do you set mutliple memory parameters in Catalina.bat?
Does the perm size is include in the heap size?
Access System Folder ????