Datacentre Support Reference Guides

AIX:  Virtual Memory Manager

 

 
 

    After checking into the information on the logical volume striping, I'm now examining the info on virtual memory management. There's quite a bit more there than you would thing...

    To wit: Please see the InfoExplorer: "Performance overview of VMM" for specifics. I've cut out the more interesting sections here.

    Virtual memory is both real memory and "memory" stored on disk. This memory is divided into 4096 byte "pages". The role of the VMM is to manage the allocation of real-memory page frames and to resolve references by the program to virtual-memory pages that are not currently in real memory or do not yet exist (for example, when a process makes the first reference to a page of its data segment). (info explorer: Performance overview of VMM)

    From the performance standpoint, the VMM has two, somewhat opposed, objectives:

  1. Minimize the overall processor-time and disk-bandwidth cost of the use of virtual memory.
  2. Minimize the response-time cost of page faults.
    The following are terms used in the discussion/tuning of the VMM:
 
  • Free list: Memory pages that are free for use to satisfy a page fault.
  • Persistant segment: Pages that have permanent storage on disk, such as file data or executable programs. When these pages are read out of memory, presupposing they're changed, they'll get written back to the original file.
  • Working segment: Transitory pages such as program data segments or process stacks. These pages are written to the disk paging section (rootvg:hd6 by default)
  • Computational memory: Computational memory consists of the pages that belong to working-storage segments or program text segments.
  • File memory: File memory consists of any pages that aren't computational memory.
  • New page fault: Reference to a page that hasn't been called recently such as when a program is being loaded for the first time.
  • Repage fault: Reference to a page that's been called recently; however, the page isn't in memory because the page has been replaced.
  • minfree: Minimum acceptable number of real-memory pages in the free list. If the free list falls below this number, the VMM will start paging until the number of pages reaches maxfree. (ref'ed above).
  • minperm: If the percentage of real memory occupied by file pages falls below this level, the page-replacement algorithm steals both file and computational pages, regardless of repage rates
  • maxperm: If the percentage of real memory occupied by file pages rises above this level, the page-replacement algorithm steals only file pages.
  • maxfree = (minfree + maxpgahead): maxfree is the number of pages at which page stealing stops. minfree is the number of pages at which page stealing starts. Since these pages are used for the disk I/O, we need to have sufficient pages in the list in order to prevent paging as soon as disk I/O starts.
    The InfoExplorer section "Tuning VMM Page Replacement" goes over how to modify these variable using vmtune (virtual memory perhaps? Gee, I'm so clever...). It never does give a really valid way of determining minfree other than using vmstat. The fr and sr colums list the number of pages freed and the number of pages scanned. It says "use these columns to identify a valid minfree setting." Cool. How? I'm figuring on using the average of the sr column over the space of a day. Maxfree is the addition of minfree and maxpgahead (64K for best sequential file access). This should, theoretically, help both systems

    The vmtune command can be found in the following places:

AIX 3.2.5: /usr/lpp/bos/samples/vmtune

AIX 4.1.4: /usr/samples/kernel/vmtune