9.2.2.1 Data
Analysis
Paging space requirements are unique for each system depending upon the kind
of applications running and/or the number of active users.
If any of the following messages appear on the console
or in response to a command on any terminal, it indicates a low paging space.
"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"
The following tips, in general, will help in creating
or increasing the paging space.
- Do not allocate more than one paging space logical volume on a physical
volume. All processes started during the boot process are allocated paging
space on the default paging space logical volume (hd6). After the additional
paging space logical volumes are activated, paging space is allocated in a
round robin manner in 4 KB blocks. If you have paging space on multiple
physical volumes and have more than one paging space on one physical volume,
you are no longer spreading paging activity over multiple physical volumes.
- Avoid putting a paging space logical volume on a heavily active logical
volume. For example a volume that is being 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 you have
paging spaces of different sizes, and the smaller ones become full, you will no
longer be spreading your paging activity across all of the physical volumes.
- Do not extend a paging space logical volume onto multiple physical
volumes. If a paging space logical volume is spread over multiple physical
volumes, you will not be spreading paging activity across all the physical
volumes. If you want to allocate space for paging on a physical volume that
does not already have a paging space logical volume, create a new paging space
logical volume on that physical volume.
- For the best performance on a system having multiple disk controllers,
allocate paging space logical volumes on physical volumes that are each
attached to a different disk controller.
The AIX installation defaults to a paging logical volume (hd6) on drive
hdisk0, that contains part or all of the busy / (root) and /usr file systems.
A special procedure is required for removing the default paging space (hd6).
These paging spaces 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.
The following example shows the steps involved in
reducing the size of hd6 paging space from 160 MB to 120 MB.The steps in the
following procedures are all necessary, even those not directly related to the
hd6 paging space. The additional steps are needed because a paging space cannot
be deactivated while the system is running
Note |
---|
- AIX Version 4.2.1 and later does not support reducing the size of hd6 below
32 MB or the system will not boot.
- If you decide to reduce hd6, you must leave enough space for the
software in rootvg. A rule of thumb for reducing hd6 paging space is to leave
enough space to match physical memory. To find out the amount of physical
memory, use the following command:
lsattr -E -l sys0 -a realmem
|
- Create a temporary paging space on rootvg by executing
the following command:
mkps -a -n -s 30 rootvg hdisk0
This command outputs the name of the paging space (paging00 if no others
exist).
- Use the following command to deactivate the hd6 paging spaces in
preparation for the reboot later in the procedure:
chps -a n hd6
- Change the paging space entry in the /sbin/rc.boot file from:
swapon /dev/hd6
to
swapon /dev/paging00.
- Execute the following command to check the primary
dump device designation:
# sysdumpdev -l
primary /dev/hd6
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
- If the primary dump device is hd6, change it to
some other paging space. The following command shows how to change the primary
dump device to paging00:
# sysdumpdev -P -p /dev/paging00
primary /dev/paging00
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
- Create a bootable image with the bosboot
command for a hard disk image:
bosboot -d /dev/hdisk0 -a
- Put
the system key (if present) in the normal position and use
the following command, which will both shutdown the operating system and reboot
it:
shutdown -r
- After the system reboots, remove the hd6 paging space:
rmps hd6
- Create
a new paging space logical volume of the size 120 MB for the hd6 paging space:
mklv -t paging -y hd6 rootvg 30
- Change the primary dump device designation back to be the paging space
hd6:
sysdumpdev -P -p /dev/hd6
- Change
the paging space entry in the /sbin/rc.boot file from
swapon /dev/paging00 to swapon /dev/hd6.
- Create a bootable image with the bosboot
command for a hard disk image;
bosboot -d /dev/hdisk0 -a
- Execute the following command to make the new hd6 paging space
automatically activated when the system reboots:
chps -a y hd6
- Execute the following command to change the attribute of temporary
paging space, paging00, so that it does not automatically activate after next
reboot:
chps -a n paging00
- Put the system key (if present) in the normal position and use the
following command, to shutdown and reboot the system:
shutdown -r
- After the system reboots, remove the temporary paging space:
rmps paging00
Use the lsps -a command to verify the reduced size of default
paging space (hd6).
Moving a paging space with the name hd6 from rootvg to another volume group
is not recommended because the name is hard-coded in several places.
Only the paging spaces in rootvg will be 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.
Moving the default paging space from hdisk0 to a
different disk within the same volume group does not require system reboot.
The following example shows the command used to move the default (hd6)
paging space from hdisk0 to hdisk1:
migratepv -l hd6 hdisk0 hdisk1
This may take a few minutes depending upon the size of
paging space.
The following publications contains more information about system
performance tools.
9.4 Quiz