Wednesday, October 16, 2013

Debug Paging Space issue IBM AIX

We would have faced issues that paging space is more and need to find which process is using more page space.

Let's start by understanding what is Paging Space.
All process will require memory and that will be taken from RAM .In unix 4kb blocks of memory will be allocated.So in a case if there is no memory in our RAM for the new process then process wont be completed.To nullify this OS has paging space in the disk which will be used by the inactive process in the RAM and the new active process will get space in RAM for processing.This is called Page Out .If the inactive process in hard disk once got active will  move again to RAM.This process is called Page In.So this will be a continuous process in the operating system.

.
lsps -a  command is used to find on which disk paging space is alloted.
Page Space  Physical Volume       Size   %Used  
hd6         hdisk0              768MB      47   

lsps -s will give the  percentage of paging space used.
If percentage is less then no issue.

svmon -G to find free memory.
               size      inuse       free        pin    virtual
memory      1048576     417374     631202      66533     151468
pg space     262144      31993

If free memory is very less then we can increase the RAM size if its less .It seems like application issue please follow the below steps:
Use topas command to find which process is using more paging.
Click here for complete topas explanation .The link has very good explanation.Once spotted the most used process you can use the below two commands .

ps -mo THREAD -p <PID>|sort -nk6.This command be used to know which application is causing more paging .
svmon -P <PID>
In detail svmon commands are explained here.Hope this post will help to spot the bottleneck with paging