From owner-freebsd-stable@FreeBSD.ORG Tue Apr 20 07:48:38 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6660416A4CE for ; Tue, 20 Apr 2004 07:48:38 -0700 (PDT) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8DFF43D55 for ; Tue, 20 Apr 2004 07:48:37 -0700 (PDT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (abufwd@localhost [127.0.0.1]) by lurza.secnetix.de (8.12.9p2/8.12.9) with ESMTP id i3KEmaNa087553 for ; Tue, 20 Apr 2004 16:48:36 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.9p2/8.12.9/Submit) id i3KEmaJe087552; Tue, 20 Apr 2004 16:48:36 +0200 (CEST) (envelope-from olli) Date: Tue, 20 Apr 2004 16:48:36 +0200 (CEST) Message-Id: <200404201448.i3KEmaJe087552@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG In-Reply-To: <20040417133050.GL79111@cashmere.blitzed.org> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.9-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: mfs and vnconfig questions out of curiosity X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 14:48:38 -0000 Andy Smith wrote: > So you can make a swap-backed filesystem in -STABLE with vnconfig > -S, but why would you ever want to do this? Why is this preferred > over just using a regular file? Upon unmount of the FS, the regular file will stay there, so you have to remove it yourself. A swap-backed FS will disappear completely upon unmount. But more importantly, a swap-backed FS is more efficient, because you don't have all the overhead of the filesystem which contains the regular file. > Then there is malloc-backed filesystem as created with mfs in > STABLE. Presumably this works with virtual memory and lazy > allocation the same way as malloc() from a program would do, i.e. > it is possible to create an FS that is bigger than the amount of > physical memory in the system, and whenever files are stored in the > FS it is similar to any other request to the VM system, may be > satisfied with real memory or go into swap? Yes, that's correct. Basically, the file system data is contained in the process image of the mount_mfs process. You can see it in "ps" and "top": top: 32 root 10 0 101M 76416K mfsidl 0:29 0.00% 0.00% mount_mfs df -k: mfs:32 100750 254 100496 0% /tmp Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "That's what I love about GUIs: They make simple tasks easier, and complex tasks impossible." -- John William Chambless