SUMMARY: Swap space and filesystem details...

From: Cenon B.C. Marana Jr. <bonn_at_durian.usc.edu.ph>
Date: Sat, 6 Jan 1996 16:47:15 +0800 (HKT)

Thanks goes to the follwing people:

Michael Matthews <matthewm_at_sgate.com>
Alan Rollow <alan_at_nabeth.cxo.dec.com>
Frank Nick Riley <nick_at_alldata.com>
Ross Alexander <rwa_at_cs.athabascau.ca>
SSL_at_ALPHA.SUNQUEST.COM
Andrew Sheaff <sheaff_at_eece.maine.edu>
Jim Belonis <belonis_at_dirac.phys.washington.edu>
Akihito 'ycos' Yakoshi <yakoshi_at_osa.dec.com>
MR.OMAR <rosley_at_tsi.com.my>
Benoit Maillard <maillard_at_fgt.dec.com>


My original questions:

> 1.) Is it alright to have a swap space more than 2.5 - 3 times the memory
> size? What might be the implications (advantages and disadvantages) if
> such setup is implemented?


Swap space size decision depends of your application memory hungryness and
the way one want one's system to react. There is no standard answer. As a
rule of thumb, 2 to 3 times the memory size is usualy OK (if real memory
has been adequately configured with your application requirements.)


One can have as much page/swap as one is willing to aside the disk space
for. The disadvantage is that if one doesn't use it then it is potentially
wasting the space for it can't be used for anything else, other than swap.
Thus, implying a decrease in disk space that might be allocated for
user/system files..


The advantage is that it allows one to run processes that require more
virtual memory. This in turn has the disadvantage is that there will be
more paging and swapping which will a detrimental affect on performance.


An advantage of having more page/swap space on different devices is that,
once allocated, the space will be distributed evenly among the devices as
though they were a stripe set, which can improve performance.


The implications having a large swap/RAM ratio implies that one should
really install more RAM, as rotating memory is VERY slow, and if one
really needs that much memory to support the system's operation, paging
in/out of swap space is not the way to do it.


> These are currently my disk space settings/layout:
>
> Filesystem 512-blocks Used Avail Capacity Mounted on
> /dev/rz3a 126334 88956 24744 78% /
> /proc 0 0 0 100% /proc
> /dev/rz3g 1732204 1371234 187748 88% /usr
> /dev/rz3h 1734396 1149344 411612 74% /u1

> 2.) What is the use of the /proc filesystem and why is it always full?


Using the online system manual, "man 4 proc" explained a bit about proc
and its uses/functions..


Allan Rollow has this to say:
-----------------------------

Each file in the /proc file system represents a running process. It is
possible to open these files and use I/O controls to get information about
the process. I think ps(1) uses the interface, when available. The
debugger may use it by opening the process for read/write and actually do
reads and writes to the address space. There is a manual page in either
Section 4 or 7 that describes the I/O control interface. I suspect it is
full because it doesn't make sense to limit it to a particular capacity
and to calculate the percent "full" from that.


> 3.) With the setup above, can the swap space be allocated other than in
> the /dev/rzXb, and aside from /dev/rzXg and /dev/rzXh filesystems?


Swap space can be place on any FREE partition that one prefers. It is
however best to break large swap spaces into several smaller chunks and
distribute them over several disks and controllers. This will maximize
throughput, as multiple swap partitions will fill concurrently.


Digital UNIX however doesn't support swapping to files and to try and use
one of the file systems for additional page/swap would cause the file
system to be overwriten, destroying the data. If one needs additional
page/swap it is recommended that one should get more disks and use space
from them.


> 4.) Can AdvFS be implemented also in the swap space filesystem? What might
> be the consequences of such?

No. Swap is entirely separate from a filesystem -- it's part of virtual
memory. It is added without creating any kind of a file system on the
partition.


Advfs needs a block device for domain creation. This block device should
be free as the mkfdmn command will destroy any data on the partition.
Digital Unix doesnt swap on a file, only on a device, so no possibility to
use AdvFS for swap.


Allan Rollow sez:
----------------

The page/swap space isn't a file system. The paging code uses raw devices
that allocates as it see fit. To try and put an advanced file system in a
partition used for paging would have the same affect as #3; destroyed
data. In both of these cases there are check in the appropriate programs
to prevent use of one by the other. Advfs won't let you create a file
system on the a page/swap device and swapon won't let you add a device
that already has a mounted file system on it. If the file system isn't
mounted, swapon will let you use it for page/swap space, so some care has
to be taken.


Bonn
:)
Received on Sat Jan 06 1996 - 10:11:46 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT