System Administration Guide, Volume 2

How to Check Page-Out and Memory (sar -g)

Use the sar -g option reports page-out and memory freeing activities (in averages).


$ sar -g
00:00:00  pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf
01:00:00     0.00     0.00     0.00     0.00     0.00

The output displayed by sar -g is a good indicator of whether more memory may be needed. Use the ps -elf command to show the number of cycles used by the page daemon. A high number of cycles, combined with high values for pgfree/s and pgscan/s indicates a memory shortage.

The sar -g command also shows whether inodes are being recycled too quickly, causing a loss of reusable pages.

Output from the -g option is described in the following table.

Table 36-11 Output From the sar -g Command

Field Name 

Description 

pgout/s

The number of page-out requests per second. 

ppgout/s

The actual number of pages that are paged-out, per second. (A single page-out request may involve paging-out multiple pages.) 

pgfree/s

The number of pages, per second, that are placed on the free list. 

pgscan/s

The number of pages, per second, scanned by the page daemon. If this value is high, the page daemon is spending a lot of time checking for free memory. This implies that more memory may be needed.  

%ufs_ipf

The percentage of ufs inodes taken off the free list by iget that had reusable pages associated with them. These pages are flushed and cannot be reclaimed by processes. Thus, this is the percentage of igets with page flushes. A high value indicates that the free list of inodes is page-bound and the number of ufs inodes may need to be increased.

Example--Checking Page-Out and Memory

The following abbreviated example shows output from the sar -g command.


$ sar -g
SunOS venus 5.8 Generic sun4u    09/07/99

00:00:00  pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf
01:00:00     0.00     0.00     0.00     0.00     0.00
02:00:02     0.00     0.00     0.00     0.00     0.00
03:00:00     0.00     0.01     0.01     0.00     0.00
04:00:00     0.00     0.00     0.00     0.00     0.00
05:00:01     0.00     0.00     0.00     0.00     0.00
06:00:00     0.00     0.00     0.00     0.00     0.00

Average      0.01     0.12     0.21     0.66     0.00