[Sauers04] 8.10. Sizing Memory and the Swap Area

来源:百度文库 编辑:神马文学网 时间:2024/04/28 15:01:24

8.10. Sizing Memory and the Swap Area

Choosingthe right memory size and configuring the right swap area size cancontribute to good memory performance. Only experience can determinethe right values for any particular installation, but some initialguidelines are provided in the next paragraphs.

8.10.1. Sizing the Swap Area

Forthe swap area, the old rule of thumb was to use two to three times thesize of physical memory, with a minimum of one times the size ofphysical memory. However, this may not always be realistic. For largememory configurations, the use of pseudo-swapin addition to normal swap allows up to 75% of available memory to beused once the swap devices are full, without the need to reservephysical swap space. Pseudo-swap is enabled by setting the kerneltuneable parameter swapmem_on to 1.

Whenphysical memory size is greater than 16 GB, a more realistic guidelineis to use 25% of physical memory as a minimum, plus the following:

  • The sum of all shared memory requirements (not including text, memory-mapped files, and shared libraries) minus the amount of locked memory. (Note: if the shared memory segment is locked into memory, do not count it.)

  • “N” times the private virtual memory requirements for each application (private VSS) where “N” = the number of users; use glance (Memory Regions screen) to calculate this for each process.

  • The sum of shared text VSS requirements when accessing remotely with the sticky bit set.

  • 10% overhead for a fudge factor.

Beyond this, pseudo-swap should allow for peak periods. Note that using pseudo-swap limits the amount of lockablememory on the system to seven-eighths of the total size of memory,compared to almost all of it when not using pseudo-swap. For largedatabase configurations that push the memory to the limits, usingpseudo-swap may artificially limit the amount of memory that can belocked and therefore, the rule of thumb of equivalent swap as physicalmemory should be used.

8.10.2. Sizing Memory

The following determine physical memory size:

  • The sum of all resident shared memory requirements (text, shared libraries, shared memory, memory-mapped files), including the amount of locked memory (shared RSS).

  • “N” times the private resident memory requirements for each application (private RSS) where “N”= the number of users.

  • 10% of physical memory for the kernel and static tables.

  • The size of the fixed-buffer cache, if applicable.

  • Initial allocation for the dynamic buffer cache, if applicable (a minimum of 10% of physical memory is required; 20% is recommended).

  • An estimate for networking needs (10% of physical memory).

  • Additional memory for NFS.

  • Create Bookmark (Key: b)Create Bookmark
  • Create Note or Tag (Key: t)Create Note or Tag
  • Download (Key: d)Download
  • PrintPrint
  • Html View (Key: h)Html View
  • Zoom Out (Key: -)Zoom Out
  • Zoom In (Key: +)Zoom In
  • Toggle to Full Screen (Key: f)
  • Previous (Key: p)Previous
  • Next (Key: n)Next

Related Content

Managing Memory
From: Essential System Administration, Third Edition

Gauging Memory Performance and Capacity
From: Unix® System Management Primer Plus

Terminology
From: The Design and Implementation of the 4.4BSD Operating System

Terminology
From: Design and Implementation of the FreeBSD Operating System, The

Tuning Memory
From: Pro Ubuntu Server Administration

Monitoring Performance
From: Insider Power Techniques for Microsoft® Windows® XP

Memory-bound system
From: IBM eServer Certification Study Guide - AIX 5L Problem Determination Tools and Techniques

Introduction to the Memory Manager
From: Microsoft® Windows® Internals: Microsoft Windows Server™ 2003, Windows XP, and Windows 2000, Fourth Edition

Page Replacement
From: The Design and Implementation of the 4.4BSD Operating System

Monitoring Performance
From: Microsoft® Windows XP Unleashed