SQZPAGE(8)

NAME
sqzpage - synchronize with sqz to reduce real memory

SYNOPSIS
sqzpage pages-to-hold

DESCRIPTION

sqzpage forks a sqz(8) command with the request to make pages-to-hold physical pages unavailable. sqzpage then monitors the progress of the request. After the request has been satisfied, sqzpage emits the process ID of the forked sqz process on the standard out, and exits. Since the sqz request can take a while, and sqzpage waits for the request to be satisfied, sqzpage is useful for running a series of tests while varying the available memory. After the tests are run, the sqz process can be killed, which will make the pages available again.

OPTIONS

pages-to-hold
    Specify the number of pages to withhold from the system.

EXAMPLE

The following example shows the effect removing 100 and then 200 pages from the system will have on the VM cache and a file intensive process, for example, sum(1). sum is run more than once to involve the VM cache. This example was run on a 4MB machine with about 270 pages in the VM cache. Note: the real time increased when 200 pages were made unavailable.

    example% cat demosqzpage
    #! /bin/sh -ue
    for hold in 0 100 200
    do
    	pid=`sqzpage $hold`
    	sqz status
    	for repeat in 1 2 3 4
    	do
    		echo "  "`/bin/time sum /vmunix 2>&1`
    	done
    	kill $pid
    done
    example% demosqzpage
    holding 0 pages (0K) here; 0 pages (0K) total
    	59466 662 5.0 real 4.0 user 0.6 sys
    	59466 662 4.3 real 4.0 user 0.3 sys
    	59466 662 4.4 real 4.0 user 0.2 sys
    	59466 662 4.4 real 4.0 user 0.3 sys
    holding 0 pages (0K) here; 100 pages (800K) total
    	59466 662 4.7 real 4.2 user 0.2 sys
    	59466 662 4.3 real 4.0 user 0.2 sys
    	59466 662 4.3 real 3.9 user 0.3 sys
    	59466 662 4.4 real 4.1 user 0.2 sys
    holding 0 pages (0K) here; 200 pages (1600K) total
    	59466 662 5.7 real 4.3 user 0.5 sys
    	59466 662 5.5 real 4.2 user 0.5 sys
    	59466 662 5.5 real 4.1 user 0.6 sys
    	59466 662 6.0 real 4.1 user 0.6 sys

FILES
/dev/sqz*

SEE ALSO
sqz(4S), sqz(8)

BUGS

sqzpage expects to be the only process using sqz(4S), as it always uses /dev/sqz0 and /dev/sqz1, and only checks the total memory reserved by all sqz(4S) devices.