Reducing disk activity caused by swapping and paging
To estimate the impact that
paging in
from filesystems has on disk activity, multiply the
value of pgfil/s reported by sar -p
(or mpsar -p for SMP) by 8 to convert
from 4KB pages to the number of 512-byte disk blocks read or
written per second:
Disk activity due to paging in = 8 * pgfil/s
The amount of disk activity caused by swapping and paging out
to the swap areas can be estimated from the values of bswin/s and
bswot/s reported by sar -w (or mpsar -w
for SMP):
Disk activity due to swapping = 8 * (bswin/s + bswot/s)
These values can be compared with
the total number number of blocks per second being transferred
to and from the disks containing the filesystems and swap areas.
Use sar -d (or mpsar -p for SMP)
to report the number of blocks transferred per second
(blks/s).
See
``Viewing disk and other block I/O activity''
for more information about monitoring hard disk activity.
If a high proportion of disk activity is caused by paging in, and this is causing a disk bottleneck, see ``Tuning disk I/O-bound systems'' for suggested ways to cure this.
If swapping and paging out is causing a disk bottleneck,
you could create swap areas on several
disks to relieve the load on a single disk.
If possible, you should try to reduce the memory shortage.