How to deal with Paging space in AIX?
DAY to DAY operation in aix:
PAGING SPACE TIPS:
Determining if more paging space is needed:
Allocating more paging
space than necessary results in unused paging space that wastes disk space.
However, allocating too little paging space can result in one or more of the
avoidable symptoms listed below.
Use the following
guidelines for determining the necessary paging space:
Enlarge paging space
if any of the following messages are displayed on the console or in response to
a command on any terminal:
ü INIT: Paging space is low
ü ksh: cannot fork no swap space
ü Not enough memory
ü Fork function failed
ü fork () system call failed
ü Unable to fork, too many processes
ü Fork failure - not enough memory available
ü Fork function not allowed. Not enough memory available.
ü Cannot fork: Not enough space
Add a paging space if
the average of the %Used column in the output of the lsps
-a command is greater than 80
Add a paging space if
the %Used column in the output of the lsps -s command is
greater than 80.
Note: Only extend a
paging space as a last option.
Use the following commands to determine if you need to make changes
regarding paging space logical volumes:
Iostat: Check the tm_act field
for the hdisk containing the paging space for a high percentage relative to the
other hdisks
vmstat : Assure fr/sr columns
of the vmstat page field do not consistently exceed the ratio of 1:4.
lsps : Use the -a flag to
list all characteristics of all paging spaces. The size is given in megabytes.
Use the –s flag to list the summary characteristics of all paging spaces. This
information consists of the total paging space in megabytes and the percentage
of paging space currently assigned (used). If the -s flag is specified, all
other flags are ignored.
========================================================================
THINGS TO CONSIDER WHEN CREATING OR ENLARGING PAGING SPACE:
Before
creating a new paging space or enlarging an existing paging space, consider the
following:
Ø If a disk drive
containing an active hd6 paging space logical volume is removed from the
system, the system will crash.
Ø Do
not put more than one paging space logical volume on a physical volume.If you
add more than one paging space to one of the physical volumes, the
paging activity is no longer spread equally across the physical volumes.
Ø All
processes started during the boot process are allocated paging space on the
default paging space logical volume (hd6). When additional paging
space logical volumes are activated, paging space is allocated in a "round
robin" manner, in 4KB chunks.
Ø Avoid
putting a paging space logical volume on the same physical volume as a heavily
active logical volume, such as that used by a database.
Ø It
is not necessary to put a paging space logical volume on each physical volume.
Ø Make
each paging space logical volume roughly equal in size.
Ø If
paging spaces are of different sizes, and the smaller ones become full, paging
activity will no longer be spread across all of the physical volumes.
Ø Do
not extend a paging space logical volume onto multiple physical volumes.
Ø For
best system performance, put paging space logical volumes on physical volumes
that are each attached to a different disk controller.
Ø It
is technically supported to create default paging space (hd6) on ESS, EMC or
RAID array, although it is not recommended, and should be avoided if possible.
Ø NOTE:
If system is paging enough to cause an I/O bottleneck, tuning the location of
the paging space is not the answer.
LIST
How to list out all the paging space details? #lsps –a
How to list out the consolidate paging space size? #lsps –s
CREATE
How to create the paging space
#mkps –s <no of pp> -n –a rootvg mkps –s 8 –n –a rootvg
INCREASE
How to Increase the Paging space?
#chps –s <no of pp> <paging name> chps –s 8 paging00
DECREASE
How to decrease the paging space?
#chps –d <no of pp> <paging name> chps –d 4 pagin00
DELETE
How to delete the paging space?
#swapoff /dev/<paging name> swapoff /dev/paging00
#rmps <paging name> rmps paging00
CONFIGURATION FILE
All the paging space is defined in /etc/swapspaces. # cat /etc/swapspaces
ENABLE
How to enable the paging space? #swapon /dev/pagin00
DISABLE
How to disable the paging space? #swapoff /dev/paging00