From owner-freebsd-hackers Sat Dec 4 15:47:27 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from monkeys.com (i180.value.net [206.14.136.180]) by hub.freebsd.org (Postfix) with ESMTP id 8443714C2E for ; Sat, 4 Dec 1999 15:47:21 -0800 (PST) (envelope-from rfg@monkeys.com) Received: from monkeys.com (localhost [127.0.0.1]) by monkeys.com (8.9.3/8.9.3) with ESMTP id PAA18064 for ; Sat, 4 Dec 1999 15:44:49 -0800 (PST) To: freebsd-hackers@FreeBSD.ORG Subject: Re: tmpfs .. ? In-reply-to: Your message of Sat, 04 Dec 1999 12:29:37 -0800. <199912042029.MAA56701@apollo.backplane.com> Date: Sat, 04 Dec 1999 15:44:49 -0800 Message-ID: <18062.944351089@monkeys.com> From: "Ronald F. Guilmette" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <199912042029.MAA56701@apollo.backplane.com>, Matthew Dillon wrote: > >:Has anyone toyed with the idea of implementing a swap-based filesystem >:similar to Sun's tmpfs? >: >:Chuck Youse > > I did it a couple of months ago. You simply use the VN device and > tell it to use swap as backing store, then newfs up a UFS filesystem > on it. You have the option to have it dynamically allocate and > deallocate swap, or you can force it to pre-reserve swap. See the > 'vnconfig' man page and the -S option and the '-s reserve' option. > > This is for -CURRENT only. > > Generally speaking this isn't going to be as efficient as a real tmpfs Please excuse my ignorance, but what is it, exactly, that you are defining as a ``real tmpfs'' here? > due to the update daemon syncing all filesystems every so often. > But if you pre-reserve the swap it *will* be just as efficient as a > normal filesystem. In fact, if you have multiple swap partitions > your tmpfs will wind up being interleaved and will have even better > performance. pre-reservation also gives you the ability to recover > the filesystem after a crash though for obvious reasons it can be > problematic to depend on this ability. Again, please excuse my ignorance, but what ``obvious reasons'' are those? P.S. I have a definite interest in this sort of thing, especially if the data stored was made to be persistant across reboots and/or crashes. Specifically, I'm planning a large mail server... which will use Sendmail... and I'd really like to allocate the Sendmail queue files... which typically have a rather short lifespan... on/in some sort of filesystem (e.g. an mfs or else this VN thing you are talking about) that would tend to give petter performance than just using an ordinary disk-based filesystem. But of course, in this sort of an application, it would be Really Nice if the filesystem in question would persist across most rebbots and crashes. (I asked about MFS persistance awhile back on -questions, but I don't think that anybody groked _why_ I might want that. Now perhaps I have made my intentions more clear.) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message