From owner-freebsd-questions@FreeBSD.ORG Tue Oct 20 19:13:01 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D555B10656A3 for ; Tue, 20 Oct 2009 19:13:01 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from ostracod.unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 46EBF8FC12 for ; Tue, 20 Oct 2009 19:13:01 +0000 (UTC) Received: from vhoffman.lon.namesco.net (150.117-84-212.staticip.namesco.net [212.84.117.150]) (authenticated bits=0) by ostracod.unsane.co.uk (8.14.3/8.14.3) with ESMTP id n9LKDHil062841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Oct 2009 20:13:18 GMT (envelope-from vince@unsane.co.uk) Message-ID: <4ADE0BBA.1030305@unsane.co.uk> Date: Tue, 20 Oct 2009 20:12:58 +0100 From: Vincent Hoffman User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Christopher Hilton References: <9B5D4ADA-E163-4AC5-B293-7C5FA7CE0DA5@vindaloo.com> In-Reply-To: <9B5D4ADA-E163-4AC5-B293-7C5FA7CE0DA5@vindaloo.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: /tmp on mfs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2009 19:13:01 -0000 Christopher Hilton wrote: > Reading the list yesterday I came across a little controversy about > swap backed /tmp filesystems. I've been using this in my /etc/rc.conf > > tmpmfs="YES" # Set to YES to always create an mfs /tmp, NO > to never > tmpsize="1g" # Size of mfs /tmp if created > tmpmfs_flags="-S -o async,noexec" # Extra mdmfs options for the > mfs /tmp > > To mount /tmp on a swap backed filesystem. I've been assuming that > data stored in the /tmp directory was held in RAM and then written to > the swap space only when the system had a more pressing need for the > RAM. I typically configure my systems with swap == 2 * RAM or more. > And on the systems in question I have at least 1Gb of RAM. I was > hoping to use this trick to enhance the performance of the postgresql > database (temp_tablespace=/tmp/pgsql/....) Is my assumption about > where the data in a temporary file is stored incorrect? > Thats certainly always been my interpretation of the manpage. "Storage for this type of memory disk is allocated from buffer memory. Pages get pushed out to the swap when the system is under memory pressure, otherwise they stay in the operating memory." If thats not the case I'd be interested to know how it does work. Vince > -- Chris > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"