CHAPTER18

Monitoring Paging and Swap Space

Every Systems Administrator loves paging and swap space because they are the magic bullets to fix a system that does not have enough real physical memory — right? Wrong! This misconception is thought to be true by many people, at various levels, in a lot of organizations. The fact is that if your system does not have enough real memory to run your applications, adding more paging/swap space is not going to help. Depending on the system's hardware and the application(s) running on your system, swap space should start at least 1.5 times physical memory. Many high-performance applications such as SAP, Oracle, and DB2 require 4 to 10 GB of real memory, plus at least 2 times real memory in swap/paging space. Did you notice I said GB of real memory? At a minimum we need 8 GB of paging space, and it could be as high as 20 GB; so the actual amount of paging and swap space is variable, but 1.5 times is a good place to start. Use the application's recommended requirement, if one is suggested, as a starting point. Just be sure to take into account any other applications that are also running on the system.

Some of you may be asking, What is the difference between paging space and swap space? It depends on the UNIX flavor whether your system does swapping or paging, but both swap space and paging space are disk storage that makes up virtual memory along with real, or physical, memory. A page fault happens when a memory segment, or page, is needed ...

Get Mastering UNIX® Shell Scripting: Bash, Bourne, and Korn Shell Scripting for Programmers, System Administrators, and UNIX Gurus, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.