General
cancel
Showing results for 
Search instead for 
Did you mean: 

System Unable to use the allocated swap memory

Abhijit_10
Occasional Advisor

System Unable to use the allocated swap memory

We have HP Proliant ML 350 G4 with 2 processors and 2 GB RAM.

We have allocated 2GB swaparea.

But when we run any process and check in "TOP" the allocated swap area is not used at all.
It has Redhat AS 2.1 as OS,Oracle 8.1.7 database and application.
6 REPLIES
Vitaly Karasik_1
Honored Contributor

Re: System Unable to use the allocated swap memory

you're lucky - so far all your processes run in RAM and don't use swap area.
Again - it's OK!
Abhijit_10
Occasional Advisor

Re: System Unable to use the allocated swap memory

The problem we are facing currently is as the application is webbased and lots of java processess are running.
During the compilation or ant build the processes utilize 100% of the CPU
and even after the process are over the system does not release the java processess.

Due to this the load avarage on the server is increasing.
The linux guy had tried to add more swap and check if the system is using the swap area but it is still not.
We are trying upload the latest version of our application . The same application has been loaded successfully on the other systems.
Vitaly Karasik_1
Honored Contributor

Re: System Unable to use the allocated swap memory

IMHO, it's still OK - may be CPU is your bottle-neck and 2GB RAM is enough.
Vernon Brown_4
Trusted Contributor

Re: System Unable to use the allocated swap memory

The problem is more likely that the java processes are not closing after their work is done. Swap wouldn't be needed until all 2 GB of ram is busy, so no swap is a good thing :)
dirk dierickx
Honored Contributor

Re: System Unable to use the allocated swap memory

ok, so the cpu is at 100%, that doesn't mean there is a memory problem. did you check the actual use of memory when the problem occurs (use 'free')?
Andrew Cowan
Honored Contributor

Re: System Unable to use the allocated swap memory

Your problem is most likely with Java Garbage Collection. Every JVM runs an internal housekeeping process that looks for Java Objects that are no longer required for the Java App/Servlet to keep running. In Unix terms the process would be paged-out, then after a further delay, deleted from the paging-area(s). This purging is controlled by several Kernel parameters, and the control process is known as the page-stealing daemon. In Java pretty much the same thing happens, the Java memory space is divided into several areas, of active(young) processes, inactive(old), and a futher special memory area that Java calls (nirvana). As Java programs run, the Garbage Collection process combs memory in order to find code fragments that can be moved between areas in order to maximse memory and process efficiency. Unfortunately early versions of Java are very bad at this, and coupled with the fact that developers do not write memory efficient code, a JVM quickly gobbles up pretty much all the resources that a machine can throw at it.

The solution to this is:
1. Upgrade to the latest Java VM.
2. Have the developers review their code with a view to making it more memory efficient.
3. Try experimenting with the MAXVM and MINVM parameters on the Java command line, to see if you can increase the amount of memory available to the VM.

Remember that if a VM is larger you have fewer Garbage Collections, but this can result in jerky application response, whereas many small ones can make your environment run very slowly for no apparent reason.