Saturday, May 21, 2011

PAGING SPACE IN AIX

               INTRODUCTION           

A paging space  also called as swap space is a logical volume with the attribute type set to paging.

when the amount of free space in the system is low ,programs or data that have not been user recently are moved from real memory to paging space to release real memory for other activities.

A page is a unit of virtual memory that holds 4kb of data and can be transferred between real and auxillary storage.

In AIX,  all the paging space is controlled by the virtual memory manager(VMM)

The VMM  is always scanning the memory for the oldest and least used processes in memory.

When real memory runs low,the VMM will page out this least used memory page to the paging space on disk. when the page frame is needed again,it is paged in by the VMM to run again.

ADDING A PAGING SPACE

to list the real memory in your system.

#lsattr -El sys0 | grep realmem
or
#bootinfo -r
or 

# prtconf -m

For adding paging space to the system you can use

#smit mkps

or
#mkps -a -n -s8 rootvg hdisk1

here,following command will create paging space on hdisk1  that is of 8LP'S in rootvg  and will be actvated immediately and on all subsequent system restart.

here options
-a = paging is configured at subsequent restarts.
-n= activates the paging space immediately.

for creating the NFS paging space
#mkps -t nfs <nfs-server hostname>   <server-file name>

this command creates an NFS paging space on the nfsserver where the server has the <server file name> exported.

DISPLAYING PAGING SPACE USAGE

#lsps -a
it displays characterstics of all paging spaces.here sizes are in mb.
#lsps -c = to list in  colon format.
#lsps -S = summary characterstics of all paging space.


ACTIVATING AND DEACTIVATING PAGING SPACES

for paging spaces to be user,it must be activated.

All paging spaces`are defined in /etc/swapspaces

#swapon -a = for activating all paging space once
#swapon /dev/paging00 = for activating paging /dev/paging00 only

#swapoff  /dev/paging01 = to deactivate the  /dev/paging01


REMOVING THE ACTIVE PAGING SPACE

before removing the paging space from the system,it should be de-activated

#swapoff /dev/paging03
#rmps paging 03


INCREASING PAGING SPACE

#chps -s 3 hd6 

increases`the size by 3 lp's

REDUCING THE PAGING SPACE

you can dynamically reduce the size of  a paging space,including hd6

if you decrease the size of the primary paging space, a temporary boot image and a temporary /sbin/rc.boot poinitng to the temporary primary paging space will be created to make sure the system is always in a state where it can be safely rebooted.

#chps -d 1 hd6

reduces`the size of hd6 by 1 lp


MOVING THE PAGING SPACE WITHIN SAME  VG

moving a paging space (including hd6) from the default location to a different disk within the same VG doesn't require reboot.

#migratepv -l hd6 hdisk0 hdisk1
this command moves the hd6 from hdisk0 to hdisk1 with the same vg.

No comments:

Post a Comment