Date: Mon, 14 Apr 1997 03:40:16 -0700 (PDT) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: freebsd-bugs Subject: Re: kern/3278: MFS chews up all swap space Message-ID: <199704141040.DAA02624@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR kern/3278; it has been noted by GNATS.
From: Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To: jlemon@americantv.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/3278: MFS chews up all swap space
Date: Mon, 14 Apr 1997 11:46:25 +0200 (MET DST)
> >Environment:
>
> FreeBSD 3.0-CURRENT #0: Sun Apr 13 21:55:38 CDT 1997
>
> Machine with 32M memory, 71M swap
>
> >Description:
>
> Mounting MFS filesystem causes roughly 2x physical memory to
> be allocated in swap partition, even though almost nothing
...
> update that ususally looks like:
>
> # grep swap /etc/fstab
> /dev/sd3s2b none swap sw 0 0
>
> # swapinfo
> Device 1K-blocks Used Avail Capacity Type
> /dev/sd3s2b 73728 0 73664 0% Interleaved
>
> # mount -t mfs /dev/sd3s2b /tmp
hmmm... don't you have to specify the size of the file system you want
to create ? Otherwise the code tries to infer the size from the info it
has available (swap partition size, or some other thing).
This works perfectly for me:
mount -t mfs -o "-s 20480" /dev/wd0s1b /tmp/aa
BTW the manpage for mount_mfs contains a mistake in the EXAMPLES
section, the size must be specified without the equal sign
WRONG: mount_mfs -s=20480 -o nosuid,nodev /dev/sd0b /tmp
RIGHT: mount_mfs -s 20480 -o nosuid,nodev /dev/sd0b /tmp
If one really wants to make things smoother, probably newfs.c should
be modified (around line 431) so that the default value for mfs
file systems is just a fraction (say 1/3 .. 1/2) of the partition
size (that's a default so it can be easily overridden). As an
example (in pseudo diff -u):
newfs.c from 2.2.1-RELEASE, line 431:
if (fssize == 0)
- fssize = pp->p_size;
+ fssize = mfs ? pp->p_size / 2 : pp->p_size ;
if (fssize > pp->p_size && !mfs)
Cheers
Luigi
-----------------------------+--------------------------------------
Luigi Rizzo | Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it | Universita' di Pisa
tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704141040.DAA02624>
