Installation guide
RAM Swap SPace
1GB - 2GB 1.5 * total RAM
2GB - 4GB 1 * total RAM
> 4GB 4GB
Checking Swap Space Size and Usage
The size and current usage of swap space can be obtained using any of the following commands:
grep SwapTotal /proc/meminfo
cat /proc/swaps
free
Swap usage may slowly increase as shown above but should stop increasing at some point. If swap usage con-
tinues to grow steadily or is already large, then one of the following options may need to be considered:
– Add RAM or reduce the size of the SGA (unless using huge pages)
– Increase the size of the swap space
Constant swapping is harmful to system performance . Check current swap activity using the following com-
mands:
$ vmstat 3 100
procs memory swap io system cpu
r b swpd free buff cache si so bi bo in cs us sy id wa
1 0 0 972488 7148 20848 0 0 856 6 138 53 0 0 99 0
0 1 0 962204 9388 20848 0 0 747 0 4389 8859 23 24 11 41
0 1 0 959500 10728 20848 0 0 440 313 1496 2345 4 7 0 89
0 1 0 956912 12216 20848 0 0 496 0 2294 4224 10 13 0 77
1 1 0 951600 15228 20848 0 0 997 264 2241 3945 6 13 0 81
0 1 0 947860 17188 20848 0 0 647 280 2386 3985 9 9 1 80
0 1 0 944932 19304 20848 0 0 705 0 1501 2580 4 9 0 87
The fields si and so show the amount of memory paged in from disk and paged out to disk, respectively.
To check the history of swap activity, use the sar command. For example, to check swap activity from Sep
19:
# ls -al /var/log/sa | grep "Sep 19"
-rw-r--r-- 1 root root 4769520 Sep 19 23:59 /var/log/sa/sa19
# sar -W -f /var/log/sa/sa19
Linux 2.6.18-92.1.10.el5 (rac01prd) 09/19/2008
12:00:01 AM pswpin/s pswpout/s
12:01:01 AM 0.00 0.00
12:02:01 AM 0.00 0.00
12:03:01 AM 0.00 0.00
The fields pswpin and pswpout show the total number of pages brought in and out per second, respectively.
www.redhat.com | 13