As suggested more than once in the lists, drop -M from flags to mfs

for /tmp and /var.  This makes the memory discs swap-backed instead
of malloc-backed.  A swap-backed memory disc should not be worse
than a malloc-backed one in any scenario because it will start
touching swap only when needed.  OTOH, a malloc-backed disc can
starve limited kernel resources and evenually crash the system.

Reflect the change in the rc.conf(5) manpage.  Also stop telling
lies there about softupdates: it does not waste disc space, it
just can delay its freeing.

Suggested by:	many
PR:		kern/87255
MFC after:	1 week
This commit is contained in:
Yaroslav Tykhiy 2007-03-06 13:13:53 +00:00
parent 988d1fde21
commit 15240ba819
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167268
2 changed files with 9 additions and 11 deletions

View File

@ -42,10 +42,10 @@ powerd_enable="NO" # Run powerd to lower our power usage.
powerd_flags="" # Flags to powerd (if enabled).
tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never
tmpsize="20m" # Size of mfs /tmp if created
tmpmfs_flags="-S -M" # Extra mdmfs options for the mfs /tmp
tmpmfs_flags="-S" # Extra mdmfs options for the mfs /tmp
varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never
varsize="32m" # Size of mfs /var if created
varmfs_flags="-S -M" # Extra mount options for the mfs /var
varmfs_flags="-S" # Extra mount options for the mfs /var
populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never
cleanvar_enable="YES" # Clean the /var directory
local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs.

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd February 9, 2007
.Dd March 6, 2007
.Dt RC.CONF 5
.Os
.Sh NAME
@ -244,12 +244,11 @@ utility when the memory file system for
.Pa /tmp
is created.
The default is
.Dq Li "-S -M" ,
.Dq Li "-S" ,
which inhibits the use of softupdates on
.Pa /tmp
to waste as little space as possible
and creates a pure memory backed disk, which will never be swapped out,
for maximum performance and system stability at low memory conditions.
so that file system space is freed without delay
after file truncation or deletion.
See
.Xr mdmfs 8
for other options you can use in
@ -276,12 +275,11 @@ utility when the memory file system for
.Pa /var
is created.
The default is
.Dq Li "-S -M" ,
.Dq Li "-S" ,
which inhibits the use of softupdates on
.Pa /var
to waste as little space as possible
and creates a pure memory backed disk, which will never be swapped out,
for maximum performance and system stability at low memory conditions.
so that file system space is freed without delay
after file truncation or deletion.
See
.Xr mdmfs 8
for other options you can use in