I have found a problem on my AIX 5.1 server. day by day the paging size is increasing,what is the reason behind it and if percentage is at 100 what will happen. Oracle 9i is running on my server.
On my AIX 6.1 boxes, after DLPARing more memory to the LPAR, I like to have the paging space shrunk back down so I can see if it continues to page more. Instead of taking an outage and rebooting the box to shrink the paging space, assuming there is only one paging space on the box named hd6, I do it like this:
First find how many LPs are being used by your current paging space:
Turn off the primary paging space. All the necessary paging space entries will be moved to the new paging space previous created:
swapoff /dev/hd6
Turn the original paging space back on:
swapon /dev/hd6
Turn off the temporary paging space. It should have been named "paging00" by default (verify the name with "lsps -a"):
swapoff /dev/paging00
Remove the temporary paging space
rmps paging00
Run the "lsps -a" afterward to see the new size. This usually drops my paging space back down to around 3%-ish. I'm not 100% sure this will work on an AIX 5.1 box though.
Indeed, rebooting will only help temporary but adding another paging space is also just temporary.
To get rid of the problem you usually have to tune the box and try again and if this is still not working, additional memory could be helpful.
Another problem could be a memory leak that is filling up memory over time, but this would have to be examined closer. Funken's hint with the svmon -P to check which processes are using how much paging space might help in a first step.
If the paging space is increasing day on day then it's usually an error in the way one of your applications is coded. Look for processes that have multiple day run times and see if you can restart them.
If ts a self-written c program then things like malloc are often the problem. Not clearing up pointers in other languages can also be he problem. It is possible that the problem is cause by a spiralling data set but that's fairly unusual.
So first step - what apps are the the system is question running and which processes are wasting the memory.
ross.mather is of course correct. The bottom line of all this is:
Watch the swap consumption over time. If it is rather static you simply have not enough physical memory and your system needs virtual memory (aka swapspace) to compensate for this.
If the swap consumption increases over time one (or several) of your running processes are likely to have a memory leak. That is: they allocate memory without giving it back once they don't use it any more. Giving the system more memory (or swapspace or both) will only increase the time until which the memory is exhausted.
To find out which process(es) use how much memory do the following:
ps -Alo vsz,pcpu,pid,args | sort -rn
This lists all processes, sorted by their allocated memory, their CPU comsumption, PID and commandline used to invoke them. Repeat this in intervals and compare the output to find the memory hogs.