*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> squeeze (1)              
Title
Content
Arch
Section
 

Contents


SQUEEZE(1)							    SQUEEZE(1)


NAME    [Toc]    [Back]

     squeeze - squeeze memory from the system

SYNOPSIS    [Toc]    [Back]

     squeeze [flag] amount

DESCRIPTION    [Toc]    [Back]

     squeeze will allocate a region of its virtual memory of a size given by
     its arguments, and	lock that virtual memory down into real	memory,	thus
     making it unavailable to other processes.	It can only be used by the
     superuser.

     The amount	of memory locked is specified as an integer argument, in units
     given by the flag argument.  By default it	is in megabytes	(-m flag).  A
     flag of -p, implies that the amount is in pages; a	flag of	-k implies
     that the amount in	kilobytes; and a flag of -% implies a percentage of
     the installed memory.

     Once the memory is	locked down, squeeze prints a message on stdout	saying
     how much is locked, and sleeps indefinitely.  It 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 printed before doing any
     experiments.

USAGE    [Toc]    [Back]

     squeeze can be used to determine the approximate working set of a
     program.  To do so, use a machine which has enough	physical memory	to
     allow your	target application to run without any paging (other than
     startup).	This can be determined by using	the command ssusage to spawn
     your application.	When the application exits, its	resource usage is
     printed; the value	labeled	majf gives the number of major page faults,
     that is the number	of faults that required	a physical read	to satisfy.
     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.

     Then run squeeze to lock down varying amounts of memory, and rerun	the
     program.  The major-fault number will remain low at first,	but as you
     squeeze out more and more memory, it will rise.  The amount of physical
     memory in 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 done this on a program
     whose paging behavior is well understood, you can determine the working
     set of the	kernel and your	normal 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.




									Page 1






SQUEEZE(1)							    SQUEEZE(1)


SEE ALSO    [Toc]    [Back]

      
      
     ssusage(1), thrash(1)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
mem Linux system memory, kernel memory and system ports
dxsysinfo Tru64 Monitors system information such as CPU activity, memory, swap space, and file system usage
shmmni HP-UX number of System V shared memory segment identifiers in the system
memstats FreeBSD memory allocation/deallocation system
memcluster FreeBSD memory allocation/deallocation system
memget FreeBSD memory allocation/deallocation system
memput FreeBSD memory allocation/deallocation system
uvm_km_valloc_wait OpenBSD virtual memory system external interface
memleak IRIX IRIX system memory leak utility
uvm_km_valloc OpenBSD virtual memory system external interface
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service