ehrlich@cs.psu.edu (Dan Ehrlich) (03/19/91)
I have a question about vmstat. What does the 'at' field represent? The man page says that 'at' is the number of 'attaches'. What are 'attaches'? Here is a sample vmstat output: guardian:50> vmstat 5 procs memory page disk faults cpu r b w avm fre re at pi po fr de sr i0 i1 i1 s0 in sy cs us sy id 8 1 0 0 5048 0 5 2 0 0 0 0 14 0 0 0 57 86 40 85 4 10 Here is an extract from vmstat(1): page Report information about page faults and paging activity. The information on each of the following activities is averaged each five seconds, and given in units per second. re page reclaims - but see the -S option for how this field is modified. at number of attaches - but see the -S option for how this field is modified. pi kilobytes per second paged in po kilobytes per second paged out fr kilobytes freed per second de anticipated short term memory shortfall in Kbytes sr pages scanned by clock algorithm, per-second Dan Ehrlich - Sr. Systems Programmer - Penn State Computer Science <ehrlich@cs.psu.edu>/Voice: +1 814 863 1142/FAX: +1 814 865 3176
ozalp@dm.unibo.it (Ozalp Babaoglu) (03/23/91)
In article <1962@brchh104.bnr.ca> ehrlich@cs.psu.edu (Dan Ehrlich) writes: >I have a question about vmstat. What does the 'at' field represent? The >man page says that 'at' is the number of 'attaches'. What are 'attaches'? Being the guilty party that added virtual memory support to bsd unix, I feel compelled to respond. The field in question reports on the vm system's ability to find missing pages without having to do any IO. 'at' is the rate (pages/sec) at which this is happening. The attached pages are typically text (code) pages left behind by an exited process that was executing the same program. It has been a while (over 10 years) since I did this work along with Bill Joy and I hope I am remembering correctly. Ozalp Babaoglu E-mail: ozalp@dm.unibo.it University of Bologna, Dept. of Mathematics Piazza di Porta S. Donato, 5 TEL: +39 51 354430 40127 Bologna (ITALY) FAX: +39 51 354490
guy@uunet.uu.net (Guy Harris) (04/02/91)
>The field in question reports on the vm system's ability to find missing >pages without having to do any IO. 'at' is the rate (pages/sec) at which >this is happening. Yup. >The attached pages are typically text (code) pages left behind by an >exited process that was executing the same program. It's more general in SunOS 4.x; the pages may also have come from a shared object such as a shared library, or from some other flavor of "mmap()"ped file, or from a file that was temporarily mapped into kernel virtual address space for I/O (i.e., the moral equivalent of a buffer cache hit for a data block is a attach - or, at least, a reclaim; see below). From a quick look at the code, it seems to be the case that a "reclaim" is a page fault resolved by finding the page in memory, while an "attach" is a "reclaim" where the page was in the free list (i.e., it wasn't mapped into anybody's address space).