AIX Tip of the Week

Sizing Page Space in AIX

Audience: All

Date: March 28, 2002

You may be wasting disk and I/O capacity if you have a large paging space. Starting with AIX 4.3.2, the rules for sizing page space changed**.

Previous to AIX 4.3.2, paging space needed to be large, typically 2-3 times the size of real memory. This is because page space was preallocated when a program started.....whether it used the page space or not.

Starting with AIX 4.3.2, paging space is not allocated until needed ("deferred paging"). In this environment, the system uses page space only if it runs out of real memory. If the memory is sized correctly, there is no paging and the page space can be small.

For example, I successfully ran a benchmark last summer on a p680 with 64 GB memory and a 32 MB page space. The application used less than 64 GB of real memory and it never touched the page space.

So my rule of thumb is to size page space proportional to the probability of paging. The lower the probability, the smaller the page space.

Here are a couple useful ways to determine how much memory and page space is being used by the system.

  1. "lsps -a" command lists the amount of page disk that is currently allocated. (This is not to be confused with paging rate. It's only the amount of disk being used. It does not indicate whether the system is paging. See "vmstat").

  2. "vmstat": shows the paging rate. The system is paging when the PI or PO columns are greater than 0.

  3. "svmon -G" command reports overall memory use. The output is listen in 4k pages, so multiply by 0.004 to convert to MBytes.

  4. "wlmstat" to determine the amount of memory used by application, group, or user. For more information, see

** The following URL lists the AIX functional enhancements by release:


We already run with less paging space than main memory and in the last two weeks we ran into a HUGE gottcha. By setting the environment variable PSALLOC=early, a user forces AIX to pre-alloc paging space to his/her processes with each malloc system call. Once s/he's used up all the paging space....fork system calls fail for everybody (I makes it hard to troubleshoot ). I speculate that it's because some part of the kernel necessary to the fork call requires (or sometimes requires) paging space also. The /usr/samples/kernel/vmtune parameters didn't prevent this because, apparently, AIX VMM doesn't check for the case where free paging space =0 but free memory greater than X GBs.

Who knows who else on Bruce's list might, too? We still haven't convinced them that they don't need to PSALLOC=early, but by a slight of hand, we've disabled their setting of the PSALLOC variable and the indicated processes still run correctly, we have oodles of paging space, and their code improved in performance by a factor of 3!!!!

Bruce Spencer,