Memtrim V2.1 30-May-1991 Source Language: C, MACRO Built: VMS V5.4 I aquired this program from DECUS or the Internet (I can't remember which), and modified for VMS V5 and added the qualifiers. I think Bruce Ellis wrote the original, but am unsure. VMS can quickly boost a processes working set up to WSEXTENT if pagefaults exceed a certain limit. This can be a problem since the pages are never given back, unless the system gets really low on memory. MEMTRIM is a program which cycles every 30 minutes (user modifiable). It looks at interactive and batch processes and determines which processes are hogging memory, but are not actually using it. Note that the "tuning" that Memtrim does is a major part of what some of the commercial tuners do, although it has less intelligence. We do not "blast" a process if; o It has more than 200 faults/minuts o It was recently blasted or is using little physical memory (< 210 pages) "Blasting" a process is done by issuing a kernel mode AST, which runs in the context of the target process, and purges their working set to approx. half its current size. Each "blasted" process is logged in SYS$OUTPUT:. Although Memtrim has run well on our systems, there may be software out there that does not take well to having it's working set trimmed occasionally. Master_blaster uses less that .03% CPU time, although may incurr some CPU usage in the target processes. Note also that once every 30 minutes or so your system will experience a large number of pagefaults as the working sets are purged, but these should mostly be soft faults. To use master_blaster; - Define memtrim as a foreign symbol. - $ memtrim [-s sleep-time] [-f fault-threshold] [-d delay] [-p pid] [-h] s = Time to sleep in minutes between cycles f = Faults / minute threshold for trimming d = Delay between trimming processes in seconds [15]. p = PID of process to trim, and exit. o = Test and trim all processes once only. h = help The delay between trimming processes is to stop the page faulting mechanism from having a heart attack. Modifications :- V2.0 30-May-1991 Changed trimming algorithm to halve working set instead of cut back to 200 pages. Thanks to Chuck Parsons for the modification to the trimming algorithm. V2.1 A. Grant 21-Jun-1991 Check for dangerous processes. Try trimming back the SWAPPER process and see how fast your VAX reboots! Added -o option (see above). Log Process Name instead of User Name. Alistair Grant Internet: alistair@mits.com.au PSI Mail: psi%0505238730004::alistair Alternate: alistair%mits.com.au@ucsvc.ucs.unimelb.edu.au grant@decus.com.au