PAGING SPACE
Paging space is
configured for additional system performance i.e. if real memory is occupies
some system process, that time further process is moved to paging space
temporary. If real memory getting free, then process moved from paging space to
real memory. This paging space is assigned from HDD space.
Normally paging space is configured double size of the real memory
If system has 512MB RAM, then paging space size will be 1BG.
In this paging space we can do following things
- List paging space
- Create paging space
- Change paging space
- Activate paging space
- Deactivate paging space
- Remove paging space
1. List paging space
Using lsps command we can view the paging space details
#lsps –a (It will
display the paging space details)
2. Create Paging
space
Using mkps command we can create the paging space
#mkps –s 10 rootvg hdisk2
s- size
10 – no of PP size
Rootvg – specifying the VG
Hdisk2 – paging space created in PV hdisk2 (PP allocated from hdisk2)
Then paging space has created and name will be paging00
Using mklv command we can create paging space using different name.
Generally paging name will be paging00, paging01, paging02,
#mklv –y newpaging –t
paging rootvg 10 hdisk2
#lsps –a
Paging00 , newpaging
3. Change paging space
Using chps command we
can increase, decrease, auto on, and auto off the paging space.
#chps –s 5 newpaging
(5 LP’s added with newpaging) – To increase
#chps –d 3 newpaging
(3 LP’s reduced from newpaging – To Decrease
#chps -ay newpaging
(To start the paging space at startup)
#chps –an newpaging
(To stop the paging space automatic startup at boot)
4. Activate paging
space
Using swapon command we can activate the paging space
#swapon
/dev/newpaging (To activate paging space)
The paging space is
active stage, and then one entry will be available in /etc/swapspaces file.
5. Deactivate paging
space
Using swapoff command we can deactivate the paging space
#swapon
/dev/newpaging (To deactivate paging space)
The paging space is
deactivated, then that paging space entry is removed from /etc/swapspaces
6. Remove paging
space
Using rmps command we can remove the paging space
#rmps newpaging
NOTE:
Before removing the
paging space, paging space should be offline, then we can remove the paging
space, otherwise it will give some errors
Paging space concepts
A paging space is a type of
logical volume with allocated disk space that stores information which is resident
in virtual memory but is not currently being accessed.
This logical volume has an attribute type
equal to paging, and is usually simply referred to as paging space or swap
space. When the amount of free RAM in the system is low, programs or data
that have not been used recently are moved from memory to paging space to
release memory for other activities.
Another type of paging space is available
that can be accessed through a device that uses an NFS server for paging-space
storage. For an NFS client to access this paging space, the NFS server must
have a file created and exported to that client. The file size represents the
paging space size for the client.
The amount of paging space required depends
on the type of activities performed on the system. If paging space runs low,
processes can be lost, and if paging space runs out, the system can panic. When
a paging-space low condition is detected, define additional paging space.
The logical volume paging space is defined by
making a new paging-space logical volume or by increasing the size of existing
paging-space logical volumes. To increase the size of an NFS paging space, the
file that resides on the server must be increased by the correct actions on the
server.
The total space available to the system for
paging is the sum of the sizes of all active paging-space logical volumes.
Paging space default size
The default paging space size is determined
during the system customization phase of AIX® installation
according to the following standards.
·
Paging space can use no less than 16 MB, except for hd6
which can use no less than 64 MB in AIX 4.3 and
later.
·
Paging space can use no more than 20% of total disk space.
·
If real memory is less than 256 MB, paging space is two
times real memory.
·
If real memory is greater than or equal to 256 MB, paging
space is 512 MB.
Paging space file, commands, and options
The /etc/swapspaces file specifies the paging spaces and
the attributes of the paging spaces.
A paging space is added to the /etc/swapspaces file
when it is created by the mkps command, and a paging space is removed
from the/etc/swapspaces file when it is deleted by the rmps command. The paging space attributes
in the file are modified by the chps -acommand
or the chps -c command. This is a change from AIX® 5.3 and earlier, when only automatically
swapped-on devices, as specified by the mkps -a command or the chps -acommand, were kept in
the /etc/swapspaces file. Files using a previous format
(where there are no attributes for checksum size and automatic swap-on in the
stanzas) continue to be supported. If the paging space size is too large, you
can subtract logical partitions from the paging space without rebooting using
the chps -dcommand.
The paging type option is required for all logical
volume paging spaces.
The following options are used to maximize
paging performance with a logical volume:
·
Allocate in the middle of the disk to reduce disk arm
travel
·
Use multiple paging spaces, each allocated from a separate
physical volume.
Setting the paging space on an AIX system
For parallel jobs that process large amounts of data, your
system must have the minimum settings for the paging space.
Attention: Only a
system administrator with root privileges should reset the system paging space.
Procedure
To set the paging space on an AIX® system:
- Run
the following command on each node or workstation in your system to
determine the current paging size for a node or workstation.
node: $ lsps -a
Page Space
|
Physical Volume
|
Volume
|
Group Size
|
% Used
|
Active
|
Auto
|
Type
|
paging01
|
hdisk1
|
pagevg
|
2000MB
|
1
|
yes
|
yes
|
lv
|
paging00
|
hdisk0
|
rootvg
|
192MB
|
5
|
yes
|
yes
|
lv
|
hd6
|
hdisk0
|
rootvg
|
64MB
|
23
|
yes
|
yes
|
lv
|
The Group Size
column lists the paging size for each disk drive. In this case, the total for
the node is 2000 + 192 + 64 MB = 2256 MB (approximately 2.2 GB).
You can also run
the following dsh command from the control workstation of an AIX
RS/6000® SP™ to display paging size information about all
nodes: control: $ dsh -a lsps -a
If you need more Paging space command, click the following
link,