Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 2003 13:58:24 -0500
From:      Charles Swiger <cswiger@mac.com>
To:        freebsd-hackers@freebsd.org, freebsd-isp@freebsd.org
Subject:   Re: adding more ram
Message-ID:  <FF1A9F56-2C0B-11D8-9FA4-003065ABFD92@mac.com>
In-Reply-To: <Pine.NEB.3.96L.1031210235954.76718E-100000@fledge.watson.org>
References:  <Pine.NEB.3.96L.1031210235954.76718E-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 11, 2003, at 12:01 AM, Robert Watson wrote:
> [ ... ]
> Actually, the thing I use swap for most now is to make sure I can 
> allocate
> large temporary file systems without consuming excessive kernel address
> space.  I.e., I'll often create a 512mb swap-backed md device for /tmp,
> and make sure I have enough swap to fully back it and everything else,
> even though the chances are I won't touch it in normal operation.  I 
> just
> don't want to run out in the event something does need it...

I first saw this implemented under Solaris via the "tmpfs" filesystem 
mount type, and I agree with you that it tends to function quite well.  
By the time Solaris transitioned from 2.6 to 2.7 (aka Solaris 7), 
having /tmp be memory-based was the default system configuration, and I 
would like to see FreeBSD pursue the same course.

I seem to recall that Solaris sets the paging priority of processes 
higher than tmpfs so that the system will write out of the contents of 
the memory-based filesystem rather than reducing process working sets 
if the system encounters memory pressure.  I'm not sure to what extent 
this is applicable to FreeBSD's md device.

Also, will FreeBSD double-buffer md based devices if it does need to 
scribble their contents to disk, or is something like what Mach calls a 
"unified buffer cache" available?

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FF1A9F56-2C0B-11D8-9FA4-003065ABFD92>