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