*Sizing paging space

- hd6 is created at installation time: The recommended paging space formula is long standing, but it will likely result in having more space than is needed. Total paging space = 512M + ( memory size - 256M ) * 1.25

- However, the amount needed is dependent on applications and system usage.

- Paging space should be continually monitored, using:

# lsps -a

Page Space      Physical Volume   Volume Group Size %Used Active  Auto  Type Chksum

hd6             hdisk0            rootvg       21504MB     1   yes   yes    lv     0

# lsps -s

Total Paging Space   Percent Used

      21504MB               1%

# svmon

               size       inuse        free         pin     virtual   mmode

memory      4034560     3559958      474602      315690     2262424     Ded

pg space    5505024        8355

 

               work        pers        clnt       other

pin          192858           0           0      122832

in use      2262424           0     1297534

 

PageSize   PoolSize       inuse        pgsp         pin     virtual

s    4 KB         -     1922230        8355      168730      624696

m   64 KB         -      102358           0        9185      102358

- Running low on paging space is bad. New processes will not start and the system may start killing processes.

- Paging space can be dynamically increased or decreased in size.

 

*Paging space placement

- Paging spaces roughly the same size

- Only one paging space per physical disk

- Use disks with the least activity

- Do not extend "a paging space" over multiple physical volumes

- Place on SAN disks for better performance

 

*Adding paging space

mkps [-a] [-n] [-t Type] -s NumLPs Vgname [Pvname]

-s NumLPs : Sets the size of the new paging space in logical partitions

-a : Activate the paging space at the next restart (adds it to /etc/swapspaces)

-n : Activate the paging space immediately.

-t Type : Specifies the type of paging space (lv or nfs)

# mkps -s 10 -n -a rootvg hdisk1       (or)

# smitty mkps

                            Add Another Paging Space

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

 

                                                        [Entry Fields]

  Volume group name                                   rootvg

  SIZE of paging space (in logical partitions)       [10]                     #

  PHYSICAL VOLUME name                                hdisk1                 +

  Start using this paging space NOW?                  yes                    +

  Use this paging space each time the system is       yes                    +

          RESTARTED?

  Checksum Size                                      []                      +#

 

*Change paging space

-- Delete one logical partition from the paging00 paging space:

# chps -d 1 paging00

-- Add one logical partition to the paging00 paging space:

# chps -s 1 paging00

(or)

# smitty chps

                Change / Show Characteristics of a Paging Space

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

 

                                                        [Entry Fields]

  Paging space name                                   paging00

  Volume group name                                   rootvg

  Physical volume name                                hdisk1

  NUMBER of additional logical partitions            []                       #

  Or NUMBER of logical partitions to remove          [5]                      #

  Use this paging space each time the system is       yes                    +

          RESTARTED?

  Checksum Size                                      [0]                     +#

 

*Removing paging space

(1) First, deactivate the paging space.

# swapoff /dev/paging00

(2) remove the paging space.

# rmps /dev/paging00

(or)

# smitty rmps

                             Remove a Paging Space

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

 

                                                        [Entry Fields]

  PAGING SPACE name                                   paging00               +

 

*Problems with paging space

(1) Monitor the system carefully

-- If paging space is running low or gets to 100% full, the system will panic. Errors will be seen on the console, such as INIT: Paging space is low!

-- The kernel will randomly start to kill processes. UNIX version 7 manual, quote: "Absolute mayhem guaranteed"

(2) Paging space too small:

-- Dynamically increase the size by allocating more partitions.

OR

-- Add an additional paging space definition to another physical disk.

(3) Paging space too large:

-- Dynamically decrease the size by deallocating partitions.

OR

-- Remove a paging space definition.

 

*Documenting paging space setup

(1) Run the lsps command.

(2) Have a hardcopy of the /etc/swapspaces file.

# cat /etc/swapspaces

* /etc/swapspaces

*

* This file lists all the paging spaces that are automatically put into

* service on each system restart (the 'swapon -a' command executed from

* /etc/rc swaps on every device listed here).

*

* WARNING: Only paging space devices should be listed here.

*

* This file is modified by the chps, mkps and rmps commands and referenced

* by the lsps and swapon commands.

 

hd6:

        dev = /dev/hd6

        auto = yes

        checksum_size = 0