*BSD News Article 20059


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!spool.mu.edu!news.clark.edu!netnews.nwnet.net!ns1.nodak.edu!plains.NoDak.edu!tinguely
From: tinguely@plains.NoDak.edu (Mark Tinguely)
Subject: Re: swap space, X server for syscons-0.2
Sender: usenet@ns1.nodak.edu (Usenet login)
Message-ID: <CCDGpz.5JK@ns1.nodak.edu>
Date: Thu, 26 Aug 1993 15:08:23 GMT
References: <CCBL2A.IyH@latcs1.lat.oz.au>
Nntp-Posting-Host: plains.nodak.edu
Organization: North Dakota State University
Lines: 42

In article <CCBL2A.IyH@latcs1.lat.oz.au> wongm@latcs1.lat.oz.au (M.C. Wong) writes:
> [deleted]  But there is one thing I do not quite understand
>the way 386bsd does virtual memory  management. I have tried running some
>applications (like xfig, ghostview, etc) and did swapinfo before, during and 
>after those app. execution. Initially, my system is not fully loaded to need
>any swapping, when those app are loaded, swapinfo reveals about 80% - 100% of
>swap space used (varied depending on which app.). But when I quit those new
>app, and did swapinfo again, it reveals that the the swap space in use it still
>the same as last revealed while the app was running. [delete] ...

 386bsd uses the Mach 2.? VM. This VM pages program text from the
 filesystem and uses the backstore for dirty pages and only when all of the
 available physical pages are used. This is paging not swapping, in fact
 386bsd does not swap out processes (at this time the user pages are not
 swapped, and swapout() does not even force out the physical pages for that
 process.  although swapout() does remove the process from the runtime queue).
 
 once the page has been put on the backstore, it will keep that page until 
 the process exits (which makes sense).

 This VM allows a person to allocate more modified pages than can be backstored
 (causing the infamous thrashing and eventually hanging system). It will be
 interesting to see what has changed in the BSD 4.4 VM, and 386bsd 0.2 VM.
 I know that there are a few good ideas out there in fixing some shortfalls
 in the existing VM.

>  One last question, I remember reading some general guidelines/formula for
>allocate swap space from the book "Unix Administration Handbook", but can't
>remember exactly what it is, and I don't have access to that book anymore, I
>wonder if someone can let me know ?

 the old BSD Unix copied the entire program into swap and paged from there.
 those formulas will result in more swap than you need. I would say you need
 at least as much swap as RAM (for core analysis). 
 
>is that feasible ? Has anyone done it before ? How about if I use the extra
>hole to augment an existing file system ?

 if you decide to leave a hole, you might as well use it as a filesystem until
 you need it as backstore.

--mark.