THRASH(1)THRASH(1)


NAME
     thrash - Explores paging behavior

SYNOPSIS
     thrash -m n | -p n | -k n [-n count] [-s] [-w time]

IMPLEMENTATION
     IRIX systems

DESCRIPTION
     The thrash utility allocates a region of virtual memory and accesses
     that memory in order to explore the system's paging behavior.  thrash
     allocates memory, writes a message to stdout saying how much it is
     using, and thrashes over the memory.

     This command accepts the following options:

     -k n      Specifies the amount of memory to access in kilobytes, where
               n is the number of kilobytes.

     -m n      Specifies the amount of memory in megabytes, where n is the
               number of megabytes.

     -p n      Specifies the amount of memory to access in pages, where n
               is the number of pages.

     -s        Requests sequential thrashing.  The default is random.

     -n count  Specifies the number of references to make before exiting.
               The default is 10000.

     -w time   Specifies a sleep interval.  Directs thrash to sleep for
               time seconds after thrashing but before exiting.

EXAMPLES
     The thrash utility can be used in conjunction with cvusage(1) and
     squeeze(1) to determine the approximate available working memory on a
     system.

     NOTE:  you must be logged in as superuser in order to use squeeze(1).

     Start by entering the following command, which tells thrash to use 4
     MB of memory:

          ssusage thrash -m 4

     When the command completes, the resource usage of thrash(1) is written
     to stderr.  The value labeled majf is the number of major page faults
     it took (that is, the number of faults that required a physical read).
     When run on a system 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.

     In a separate window, while logged in as superuser, run squeeze to
     lock down varying amounts of memory.

     Last, rerun the ssusage thrash -m 4 command.  The major-fault number
     will remain low at first, but as you squeeze out more and more memory,
     it will rise.

     The amount of available memory reported by squeeze at point at which
     thrash begins to page-fault tells you the combined working set of
     thrash (about 4 MB), the kernel, and any other applications you have
     running.

SEE ALSO
     squeeze(1), ssusage(1)