Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ucbvax.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!ucbvax!info-vax
From: info-vax@ucbvax.ARPA
Newsgroups: fa.info-vax
Subject: Re: Paging [and VT's]
Message-ID: <5278@ucbvax.ARPA>
Date: Wed, 6-Mar-85 09:20:44 EST
Article-I.D.: ucbvax.5278
Posted: Wed Mar  6 09:20:44 1985
Date-Received: Thu, 7-Mar-85 04:52:12 EST
Sender: daemon@ucbvax.ARPA
Organization: University of California at Berkeley
Lines: 75

From: LEICHTER 

    I just brought up and tuned a 785 with 12Mb of memory.  I claim that if
    I tweak it correctly, I should be able to do things and not have it 
    page at all, if I'm the only person logged in [which has so far been
    the case].  No funny servers are running; just OPCOM and ERRFMT and me.
    Yet I rack up page faults at a respectable rate....

There is no way to eliminate paging completely.  An image is demand-paged into
memory as you use it; no amount of available memory can avoid this, since the
data has to get into memory at least once.  BUT, the system will still try to
trim your working set if you don't incur any page faults!

Details:

During the run of a single image, once the whole thing is in memory, you can
avoid any further paging by having a large enough working set.  Maximum WS
size is determined by two parameters, the WS quota and WS extent.  The quota
is the maximum number of pages an image can request explicitly.  The extent is
the maximum number of pages the system will grant an image implicitly if it
has a lot of faults and there is a bunch of free memory available.  Both of
these parameters can be changed for a process with the DCL SET WORKING_SET
command.  In addition, the UAF entry for an account sets absolute maximum
values for these parameters.  Finally, the SYSGEN parameter WSMAX sets an
absolute, system-wide limit to the size of any process working set.

BUT, VMS also has a facility for automatic WS size adjustment.  Two
parameters, PFRATL and PFRATH, define a range within which VMS will try to
keep a process's page fault rate.  If a process's page fault rate is less than
PFRATL, VMS will attempt to take away WSDEC pages.  Similarly, it it's above
PFRATH, VMS will try to give it WSINC more pages.  These four parameters are
settable using SYSGEN.  They are all dynamic parameters, by the way, so you
can do experiments on the fly.

If WSINC is 0, automatic working set adjustment is disabled system-wide.  A
process can disable automatic working set adjustment for itself as well; the
DCL SET WORKING_SET command's /[NO]ADJUST qualifier controls this.

Processes can also control the pager in other ways.  For example, pages can be
locked in the working set ($LKWSET), and the entire process can be locked in
the balance set ($SETSWM); or pages can be locked into memory ($LCKPAG).

Finally, it's also important to note that there are "soft" and "hard" page
faults in VMS.  A soft page fault is one that can be satisfied from a page
that is already in memory, perhaps waiting in some queue or look-aside list.
(For example, the Modified Page List.)  It involves no disk I/O.  (A "hard"
page fault is a fault that really goes to the disk.)

What I would guess that you are seeing is:

	- Automatic working set adjustment enabled, so VMS keeps trimming
		your working set down to maintain a "reasonable" number of
		faults;

	- Since there is plenty of free memory around, just about all your
		page faults are "soft".

Try doing a simple SET WORK/NOADJUST; it will probably do the trick.  If you
really want to, there are, as you can see, tons of parameters to hack with
beyond that.  Be warned, however:  It's much, much easier to screw up a VMS
system by trying to "fine-tune" it than it is to actually improve its
performance!  See the V4 "Guide to VAX/VMS Performance Management" for more
details.  A brief summary of this book is:  First, leave things alone.
Second, get more memory.  Third, get more of something else (like a bigger
CPU.)  Finally, if all else fails, tweak just a bit.  (There are obviously
exceptions to this, but they are fairly rare cases of specialized loads.)

							-- Jerry

PS:  The system itself can page, too.  In fact, the recommended settings for
the relevent parameters - like SYSMWCNT, the quota for the system WS - cause a
low but non-zero rate of system page faults.  Paging is not an absolute evil -
it's a matter of balancing various demands for a given resource (main memory).
							-- J
-------