Re: [Q] How to stop swapping/paging under SunOS 4.x (Summary)

From: Thomas Kofler (kofler@ubilab.ubs.ch)
Date: Fri Jun 03 1994 - 08:50:16 CDT


    How to stop paging/swapping under SunOS 4.x (Summary)

1a) Is there a way to stop paging or swaping under SunOS 4.x?
No, not really. The assumption that paging is always used is hard-wired
into all BSD-ish kernels. The SunOS 4.x kernels are BSD-ish.

1b) What are the reasons to switch off paging or swapping?
Kernels booted from CD or tape cannot page/swap onto the media they are
read from, and there might be no swap device at all (disk defect, disk
not formatted, etc.)

Another reason is that processes of interactive applications are
swapped out. When the user clicks, say into a window of such an
application, it takes some time to reactivate the process by swapping
it into main memory. Idle processes are swapped out after 20 seconds by
default. This value can be set or looked using an appropriate debugger
(eg, adb). The symbolic name of the memory location is 'maxslp'.

Another good example are disk-less machines used as a X-Terminal only.
It makes not much sense to let them swap/page over the network.

1c) How do kernels page/swap booted from a CD or tape?
The SunOS 4.x kernels found on, say, CD-ROMS (MUNIX, miniroot), use a
special device 'ns0b' where 'ns' stans for no-swap. This device is not
part, however, of the standard distribution.

The need for switching off paging/swapping had the consequence that the
Xkernel package available from ftp.ctr.columbia.edu contains a cloned
ns-device driver.

Peter Koch mentioned in a mail that he made positive and negative
experience with the cloned ns-device. He said that building it into a
kernel for a Sun3/260 worked. For Sun4 models, nobody reported on
positive experience with the cloned ns-device with normal kernels.
This is also the case for the ns-device written by W. Walter Ferguson.

2a) How do the swap space size and the amount of available main memory
relate under SunOS 4.x?
If the size of the swap space is smaller than the size of the main
memory, the kernel uses that many pages as pages are present on the
swap space. Running SunOS 4.x with, say, 128 MB main memory, and 64 MB
swap space that the amount of available main memory is 64 MB. Such a
configuration makes no sense under SunOS 4.x.

2b) How is it handled under Solaris 2.x?
Under Solaris 2.x, the amount of available virtual memory is
    swap_space + main_memory.
This implies that paging/swapping can be switched off.
-----------------------------------------------------------------------
Please not that this is a summary of the mail received by the author
and of the postings to comp.sys.sun.admin. The author did not check the
information for correctness, or whatsoever.

Acknowledgements:

Thanks to the following contributors:
    - Vartan Narinian <vsn@ic.ac.uk>
    - (Casper H.S. Dik) <casper@fwi.uva.nl>
    - Martin.Cracauer@wavehh.hanse.de
    - (Mike Miller Jr.) <mke@netcom.com>
    - Philippe Michel <michel@thomson-lcr.fr>
    - Robert Bonomi <bonomi@delta.eecs.nwu.edu>
    - Peter Koch <koch@informatik.uni-kl.de>
    - (W. Walter Fergusson) <walter@peanuts.ocunix.on.ca>
        Walter sent me an other implementation of a ns-device. I can mail it
        to those who are interested.
    - somebody who wanted to stay anoymous

Thomas Kofler, Thu Jun 2 19:07:14 MET DST 1994
----------------------------------------------------------
Thomas Kofler |Email: kofler@ubilab.ubs.ch
Union Bank of Switzerland |Tel: +41-1-236 4567
Bahnhofstr. 45 |Fax: +41-1-236 4671
CH-8021 Zurich, Switzerland |
----------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:02 CDT