This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes Is iAS memory intensive ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Is iAS memory intensive ?" Watch "Is iAS memory intensive ?" New topic
Author

Is iAS memory intensive ?

raj sekhar
Ranch Hand

Joined: Oct 16, 2001
Posts: 117
We have a 6 X 12 HP machine with 6 kjs running. At little higher loads, all the processes(kjs) limps even though when we have lot of RAM available. We re-start it if the response from kjs is not received for a particular period of time. As you guessed , we are experiencing lot of re-starts at higher loads in recent times. Are there any known issues or memory leaks in ias6.0 sp1 ? Any workarounds ?
Also I have observed that it does not re-claim the memory even after the sessions have expired or no usage on the server. For ex it starts with xGB memory usage in the morning and reaches x+10GB at peak times. Whats frustrating is that it stays x+10GB utilized at late in the night even as all our users generally stay away after 6:00pm. We got around that problem by bouncing the server every morning. But with increased usage we are experiencing such problems very early and are looking for any parmeter changes that will change all this ?
I hope such problems are eliminated in S1AS !
Thanks
Raj
David Ogren
Author
Ranch Hand

Joined: Jul 19, 2002
Posts: 66
There are probably at least three factors at play here.
Firstly, memory leaks are perhaps the most misunderstood thing in IT. Write a C program that allocates 1 GB of memory in a loop. Then free that memory. There is no memory leak: you've released all the memory. But if you take a look at the memory statistics of the box, you will see that your process still has 1GB of memory. OS's generally do not reclaim memory until the process ends. (There are exceptions, but the general rule is that processes will _never_ decrease in memory size.) This doesn't mean that there is a memory leak, just that the OS still has a space in the virtual memory table allocated for that program's heap.
Second, the appserver maintains its own memory pool. The appserver will generally not decrease the size of its pool. So again, there is no memory leak. The appserver is just reserving memory for future use in this case.
Thirdly, there may indeed be a memory leak. 6.0sp1B is almost three years old now. (I hope you are running sp1B and not sp1. sp1 was only around for about 24 hours because of an error in the distribution.) It wouldn't surprise me if someone had fixed a memory leak in that time.
Try to move to a more recent release. Also, check your heap size for the KJS JVM. (You might just be allocating more than your system can handle. You your total heap size should be less around 40% of the total physical system memory.)


David F. Ogren
Author of iAS : Designing and Building J2EE Solutions
sridhar satuloori
Ranch Hand

Joined: Nov 05, 2001
Posts: 144
Normally all the application servers use caching of objects and connection pools for performance reasons at the cost of the memory. Make all these pools as minimum as possible to get the real memory usage.
David Ogren
Author
Ranch Hand

Joined: Jul 19, 2002
Posts: 66
While iAS (and other application servers) do cache some object types (such as EJBs) and database connection pools, I don't think that this is likely the cause of Raj's problem. More likely is a misconfiguration (heap size for example), a bona fide memory leak, or just a misunderstanding about process size.
raj sekhar
Ranch Hand

Joined: Oct 16, 2001
Posts: 117
David
In that case, is it true that the process does not consume more memory than what is specified by the Java args param(heap size) even when more physical mem is available ? we have a total of 6 kjs running and the total max heap size of all 6 process should not exceed 40% of physical mem ? Can you let me know why is it preferred to keep to less than 40%(the rest 60% for other processes seems too high which we dont have many anyway !) ?
The below are the settings from the kjs script. I guess this is the right spot to change the heap sizes.
$JAVA_HOME/bin/java -XdoCloseWithReadPending -ss256k -mx256m com.kivasoft.hpCppRTinit.hpCppRTinit com.kivasoft.engine.Engine $opts
With the above settings does it mean that not more than 1.5G will be consumed by all the 6 processes together ?
suggestions?
Thanks
Raj
David Ogren
Author
Ranch Hand

Joined: Jul 19, 2002
Posts: 66
The heap size (-Xmx256m) only controls the Java heap, and does not include other things that are part of the KJS like the DSYNC cache and the appserver C++ infrastructure. As a rule of thumb, I usually suggest that you should give the KJS room to grow to about twice the size of the heap. (The more heap you have, the larger the amount of infrastructure and cache).
(By the way, are you using the option -Xmx256m or -mx256m? Looks like a possible typo. I don't really know the HP JVM, but the docs say that -Xmx256m is the correct flag.)
So, in your case I'd expect to see the following at steady state:
6 KJS processes @ around 0.5 GB each.
A KXS processes @ around 0.75 GB. This is widely variable, however, based on your session usage.
A bunch of other processes (SLAPD, KAS, etc.) that should remain relatively small in comparison to the KJS and KXS proceses. Total : 0.25-0.5 GB ?
So I wouldn't expect you to need more than 4-5 GB of phyiscal memory for this type of system. You mention that the system is using significantly more memory than that. Where is the memory being used? KJS processes? KXS processes? SLAPD?
David
Edit: 9:01, fixed typo in JVM arguments, grammar
[ September 12, 2002: Message edited by: David Ogren ]
 
GeeCON Prague 2014
 
subject: Is iAS memory intensive ?