SQUEEZE(1)SQUEEZE(1)


NAME
     squeeze - Squeezes memory from the system

SYNOPSIS
     squeeze [unit] amount

IMPLEMENTATION
     IRIX systems

DESCRIPTION
     The squeeze utility allocates a region of virtual memory and locks
     down the virtual memory into real memory, thus making it unavailable
     to other processes.  squeeze can only be invoked by the superuser.

     This command accepts the following options:

     unit      Specifies the unit value in which amount is measured, as
               follows:

               unit      Meaning

               -m        Specifies that amount is in megabytes.  Default.

               -p        Specifies that amount is in pages.

               -k        Specifies that amount is in kilobytes.

               -%        Specifies that amount is a percentage of memory.

     amount    An integer value that specifies the amount of memory locked.
               The unit value for amount is specified in unit. If no unit
               flag is present, the unit value will be megabytes.

     After the memory is locked, squeeze writes a message to stdout that
     indicates the amount that is locked.  It then sleeps indefinitely.
     squeeze can be interrupted by SIGINT or SIGTERM, at which time it
     frees up the memory and exits.  The user should wait until after this
     message is generated before doing any experiments.

USAGE
     squeeze can be used to determine the approximate working set of a
     program, as follows:

     1. Select a machine with enough physical memory to allow the target
        application to run without any paging (other than startup).  This
        can be determined by using the ssusage(1) command to spawn your
        application.  When the application exits, the ssusage(1) utility
        writes resource usage statistics to stdout.  The ssusage(1) output
        field called majf indicates the number of major page faults (this
        is the number of faults that required a physical read).  When run
        on a machine with a large amount of physical memory, this value is
        the number of faults needed to start the program, which is the
        minimum number for any run.

     2. Run squeeze to lock varying amounts of memory.

     3. Rerun the program.  The number of major page faults will remain low
        at first, but as you squeeze out more and more memory, the number
        of major page faults will rise.  The amount of physical memory on
        the system minus the amount of memory squeezed at point at which
        your application begins to page-fault tells you the combined
        working set of your program, the kernel, and all other applications
        you normally have running.

     If you have previously performed these tasks on a program with paging
     behavior that is well understood, you can determine the working set of
     the kernel, your typical environment, and (by subtraction) the working
     set of the application you are studying.

     One program that can be used for this purpose is thrash(1).  It
     allocates a large block of memory and then sequentially accesses each
     page in the block.  For all practical purposes, the working set of
     this program is the size of the memory allocated.

SEE ALSO
     ssusage(1), thrash(1)