[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

System Management Guide:
Operating System and Devices

Paging Space Maintenance Tasks

After paging space is created and activated, use the tasks in this section to maintain or remove it. This section is divided depending on the type of paging space you want to affect:

Changing or Removing a Paging Space

Changing the characteristics of a paging space can be done with Web-based System Manager, or you can type the following SMIT fast path on the command line: smit chps.

The procedure to remove a paging space is more risky, especially if the paging space you want to remove is a default paging space, such as hd6. A special procedure is required for removing the default paging spaces, because they are activated during boot time by shell scripts that configure the system. To remove one of the default paging spaces, these scripts must be altered and a new boot image must be created.

Attention: Removing default paging spaces incorrectly can prevent the system from restarting. The following procedure is for experienced system managers only.

To remove an existing paging space, use the following procedure:

  1. With root authority, deactivate the paging space by typing the following SMIT fast path on the command line: smit swapoff.
  2. If the paging space you are removing is the default dump device, you must change the default dump device to another paging space or logical volume before removing the paging space. To change the default dump device, type the following command:
    sysdumpdev -P -p /dev/new_dump_device
  3. Remove the paging space by typing the following fast path: smit rmps.

Resizing or Moving the hd6 Paging Space

You might want to reduce or move the default paging space in order to accomplish the following:

Whether moving the paging space or reducing its size, the rationale is the same: move paging space activity to disks that are less busy. The installation default creates a paging logical volume (hd6) on drive hdisk0, that contains part or all of the busy / (root) and /usr file systems. If the minimum inter-disk allocation policy is chosen, meaning that all of / and a large amount of /usr are on hdisk0, moving the paging space to a disk that is less busy can significantly improve performance. Even if the maximum inter-disk allocation policy is implemented and both / and /usr are distributed across multiple physical volumes, your hdisk2 (assuming three disks) likely contains fewer logical partitions belonging to the busiest file systems. (For more information on inter-disk allocation policies, see Choosing an Inter-Disk Allocation Policy for Your System in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices.

The following procedures describe how to make the hd6 paging space smaller and how to move the hd6 paging space within the same volume group.

Making the hd6 Paging Space Smaller

The following procedure uses the chps command to shrink existing paging spaces, including the primary paging space and the primary and secondary dump device. This command calls the shrinkps script, which safely shrinks the paging space without leaving the system in an unbootable state. Specifically, the script does the following:

  1. Creates a temporary paging space in the same volume
  2. Moves information to that temporary space
  3. Creates a new, smaller paging space in the same volume
  4. Removes the old paging space

For the chps command to complete successfully, enough free disk space (space not allocated to any logical volume) must exist to create a temporary paging space. The size of the temporary paging space is equal to amount of space needed to hold all the paged out pages in the old paging space. The minimum size for a primary paging space is 32 MB. The minimum size for any other paging space is 16 MB.

Note
If the following procedure encounters an I/O error, the system might require immediate shutdown and rebooting.
  1. Check your logical volume and file system distribution across physical volumes by typing the following command:
    lspv -l hdiskX
    Where hdiskX is the name of your physical volume.
  2. To shrink the paging space size, type the following on the command line:
    smit chps
Note
The primary paging space is hardcoded in the boot record. Therefore, the primary paging space will always be activated when the system is restarted. The chps command cannot deactivate the primary paging space.

Priority is given to maintaining an operational configuration. System checks can lead to immediate refusal to shrink the paging space. Errors occurring while the temporary paging space is being created cause the procedure to exit, and the system will revert to the original settings. Other problems are likely to provoke situations that will require intervention by the system administrator or possibly an immediate reboot. Some errors may prevent removal of the temporary paging space. This would normally require non-urgent attention from the administrator.

Attention: If an I/O error is detected on system backing pages or user backing pages by the swapoff command within the shrinkps script, an immediate shutdown is advised to avoid a possible system crash. At reboot, the temporary paging space is active and an attempt can be made to stop and restart the applications which encountered the I/O errors. If the attempt is successful and the swapoff command is able to complete deactivation, the shrink procedure can be completed manually using the mkps, swapoff and rmps commands to create a paging space with the required size and to remove the temporary paging space.

Do not attempt to remove (using rmps) or reactivate (using chps) a deactivated paging space that was in the I/O ERROR state before the system restart. There is a risk that the disk space will be reused and may cause additional problems.

Moving the hd6 Paging Space within the Same Volume Group

Moving the default paging space from hdisk0 to a different disk within the same volume group does not require the system to shut down and reboot.

With root authority, type the following command to move the default (hd6) paging space from hdisk0 to hdisk2:

migratepv -l hd6 hdisk0 hdisk2 
Attention: Moving a paging space with the name hd6 from rootvg to another volume group is not recommended because the name is hardcoded in several places, including the second phase of the boot process and the process that accesses the root volume group when booting from removable media. Only the paging spaces in rootvg are active during the second phase of the boot process, and having no paging space in rootvg could severely affect system boot performance. If you want the majority of paging space on other volume groups, it is better to make hd6 as small as possible (the same size as physical memory) and then create larger paging spaces on other volume groups (see Adding and Activating Paging Space ).

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]