From owner-freebsd-questions@FreeBSD.ORG Thu Aug 12 05:53:23 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A14C16A4CE for ; Thu, 12 Aug 2004 05:53:23 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CE8A43D45 for ; Thu, 12 Aug 2004 05:53:22 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i7C5rGv2071802; Thu, 12 Aug 2004 00:53:16 -0500 (CDT) (envelope-from dan) Date: Thu, 12 Aug 2004 00:53:15 -0500 From: Dan Nelson To: adp Message-ID: <20040812055315.GB4198@dan.emsphone.com> References: <08aa01c48027$e4f6dcc0$6401a8c0@THEBOX> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <08aa01c48027$e4f6dcc0$6401a8c0@THEBOX> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: questions@freebsd.org Subject: Re: tmpfs for FreeBSD? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2004 05:53:23 -0000 In the last episode (Aug 11), adp said: > I'm looking for a ramdisk-style filesystem for FreeBSD that can be > used for scratch space, e.g., tmpfs in Solaris. The filesystem should > be able to grow and shrink in memory (and use real disk space as > needed) depending on the amount of free RAM on the system. I don't > want just a fixed sized block of memory reserved for /tmp. I will be > using this for scratch files that are quickly created and then > destroyed, and will average around 2MB each. We are expecting out tmp > filesystem to need around 256MB to 512MB on average. The best available at the moment is a swap-backed filesystem. It will consume ram/swap as it grows, but won't release swap space when you delete files. If you're running 5.*, just put this in rc.conf: tmpmfs="YES" tmpsize="512m" and make sure you have at least 512MB of swap, so if it does happen to grow to full size and then have most of its files deleted, the free blocks can be pushed out to swap. -- Dan Nelson dnelson@allantgroup.com