이 콘텐츠는 선택한 언어로 제공되지 않습니다.

6.2. Checking Swap Space Size and Usage


You can check the size and current usage of swap space by running the command: grep SwapTotal /proc/meminfo
Swap usage may slowly increase as shown above but should stop at some point. If swap usage continues to grow steadily or is already large, then one of the following choices may need to be considered:
  • Adding more RAM.
  • Reducing the size of the SGA.
  • Increasing the size of the swap space.
If you see constant swapping, then you need to either add more RAM or reduce the size of the SGA. Constant swapping should be avoided at all cost. You can check current swap activity using the following commands:
$ 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
Copy to Clipboard Toggle word wrap
The fields si and so show the amount of memory paged in from disk and paged out to disk, respectively. If the server shows continuous swap activity then more memory should be added or the SGA size should be reduced. To check the history of swap activity, you can use the sar command. For example, to check swap activity from Oct 12th:
# ls -al /var/log/sa | grep "Oct 12"
-rw-r--r--    1 root     root      2333308 Oct 12 23:55 sa12
-rw-r--r--    1 root     root      4354749 Oct 12 23:53 sar12
# sar -W -f /var/log/sa/sa12
Linux 2.4.21-32.0.1.ELhugemem (rac01prd)       10/12/2005

12:00:00 AM  pswpin/s pswpout/s
12:05:00 AM      0.00      0.00
12:10:00 AM      0.00      0.00
12:15:00 AM      0.00      0.00
12:20:00 AM      0.00      0.00
12:25:00 AM      0.00      0.00
12:30:00 AM      0.00      0.00
...
Copy to Clipboard Toggle word wrap
The fields pswpin and pswpout show the total number of pages brought in and out per second, respectively.
If the server shows sporadic swap activity or swap activity for a short period time at certain intervals, then you can either add more swap space or RAM. If swap usage is already very large, do not confuse very large swap usage with constant swapping, then more RAM is recommended.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동