*BSD News Article 60067


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!gatech!newsfeed.internetmci.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!lerc.nasa.gov!purdue!haven.umd.edu!news.umbc.edu!cs.umd.edu!not-for-mail
From: torek@elf.bsdi.com (Chris Torek)
Newsgroups: comp.unix.admin,comp.unix.bsd.bsdi.misc
Subject: Re: mystery page faults
Date: 19 Jan 1996 18:23:40 -0800
Organization: Berkeley Software Design, Inc.
Lines: 75
Message-ID: <4dpjnc$al5@elf.bsdi.com>
References: <4dmmpt$g0k@sleipnir.iaccess.com.au>
Reply-To: torek@bsdi.com
NNTP-Posting-Host: elf.bsdi.com
Xref: euryale.cc.adfa.oz.au comp.unix.admin:37578 comp.unix.bsd.bsdi.misc:2213

In article <4dmmpt$g0k@sleipnir.iaccess.com.au> <phil@iaccess.com.au> writes:
>I have these mysterious page faults showing up.

None of the faults here seem mysterious to me...

>bash# vmstat -w 5
> procs   memory     page                    disks     faults      cpu
> r b w   avm   fre  flt  re  pi  po  fr  sr wd0 wd1   in   sy  cs us sy id
> 0 0 0     0 12964  112  13   0   0   0   0   3   0  158  124  15  4  3 93

This shows 112 page faults, 13 of them being `reclaims'.

A bit of explanation from vmstat(1):

     page    Information about page faults and paging activity.  These are av-
	     eraged each five seconds, and given in units per second.
                   re   page reclaims (simulating reference bits)

This is not quite right.  On the VAX, reclaims were used to simulate
reference bits; now, reclaims are simply reclaims, i.e., we took
access to the page away because you had not used it (or had released
it, e.g., the binary exited), and then you used it again anyway
(e.g., ran the binary again) while it was still valid.

                   at   pages attached (found in free list)

The number under `re' is more or less this statistic (i.e., the man page
is wrong).

                   pi   pages paged in
                   po   pages paged out
                   fr   pages freed per second
                   de   anticipated short term memory shortfall
                   sr   pages scanned by clock algorithm, per-second

The `de' parameter does not exist in the current VM system, which
has no swap-in (nor swap-out) code.  Some of the other statistics
(well, really just `fr') are also not recorded since the VM is
really still mostly just the old Mach 2.5 VM.

Under `faults', we have:

     faults  Trap/interrupt rate averages per second over last 5 seconds.
                   in   device interrupts per interval (including clock inter-
                        rupts)
                   sy   system calls per interval
                   cs   cpu context switch rate (switches/interval)

Hence this shows 158 device interrupts, 124 system calls (open, stat,
read, etc.), and 15 context switches.  The system is mostly idle:

     cpu     Breakdown of percentage usage of CPU time.
                   us   user time for normal and low priority processes
                   sy   system time
                   id   cpu idle

A total of 7% of the available CPU cycles were spent on useful work
and/or overhead, 4% in user mode and 3% in system (kernel) mode;
the remaining 93% of the cycles were spent in the idle loop.

The only other number that shows up is here:

> procs   memory     page                    disks     faults      cpu
> r b w   avm   fre  flt  re  pi  po  fr  sr wd0 wd1   in   sy  cs us sy id
> 0 0 0     0 13684  117   6   4   0   0   0   5   0  191  440  17  1  4 95

This time we had four pages paged in, probably when a process ran and
referred to its pages for the first time.

In no case did the available free pages (memory `fre') fall below about
12 megabytes.  This means there was never any need to push anything to
swap space.
-- 
In-Real-Life: Chris Torek, Berkeley Software Design Inc
El Cerrito, CA	Domain:	torek@bsdi.com	+1 510 234 3167