Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 1998 19:41:06 +0200
From:      Stefan Eggers <seggers@semyam.dinoco.de>
To:        Edwin de Graaf <graaf@surf.IAE.nl>
Cc:        freebsd-hackers@FreeBSD.ORG, seggers@semyam.dinoco.de
Subject:   Re: How do I measure swap activity? 
Message-ID:  <199807241741.TAA21786@semyam.dinoco.de>
In-Reply-To: Your message of "Fri, 24 Jul 1998 14:49:40 %2B0200." <199807241249.OAA04892@surf.IAE.nl> 

next in thread | previous in thread | raw e-mail | index | archive | help
> there are two kinds of pagers, the VN pager and the SWAP pager. Do both of
> these cause a disk access? What is the difference between the two?

As far as I understand the internals now the VN pager is the one used
for vnodes - used with mmap'ed files.  The other is for swap space use
- the pages the system throws out of main memory.

> On the other hand I have vmstat which shows the number of page faults, is
> this the sum of the VN and SWAP pagers? Does each page fault cause a fixed

I think it should be the sum of both but would have to get at the
source to make sure it is so.  If it is not I think it is a bug and
should either have a different calcuation or two separate figures.

> this the sum of the VN and SWAP pagers? Does each page fault cause a fixed
> block (4096 bytes?) to be read from disk?

The code says that it tries to read up to 7 pages before the requested
one and 8 pages after it so it reads up to 16 pages at once.  The
handling of multiple swap partitions sometimes requires to reduce this
to stay within one of them so this can be smaller.

As to behavior in the case of a program saying it is accessing pages
at random (with madvice) I am not sure.  I didn't read it often
enough, yet to remember every detail but I think then it should read
just the requested one as the others are most likely wasted effort and
only consume physical memory.

> Pointers to documents describing these would also be most welcome.

The source is the documentation until someone sits down and writes
something more.  I never saw a good documentation on this.  I was
quite puzzled as to what "chached" in the top display means.  Now I
know after reading the source.

I am not a good writer so I don't think am the right person to do it.
But maybe you want to do it.  As to knowing what to write: Just ask if
you don't want to read the source yourself.  At least I am willing to
help with information gained from -current sources.

Stefan.
-- 
Stefan Eggers                 Lu4 yao2 zhi1 ma3 li4,
Max-Slevogt-Str. 1            ri4 jiu3 jian4 ren2 xin1.
51109 Koeln
Federal Republic of Germany

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807241741.TAA21786>