From owner-freebsd-questions@FreeBSD.ORG Wed Sep 9 15:23:16 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 A94B2106568D for ; Wed, 9 Sep 2009 15:23:16 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail5.sea5.speakeasy.net (mail5.sea5.speakeasy.net [69.17.117.7]) by mx1.freebsd.org (Postfix) with ESMTP id 5AB008FC1E for ; Wed, 9 Sep 2009 15:23:16 +0000 (UTC) Received: (qmail 19815 invoked from network); 9 Sep 2009 15:23:15 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail5.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 9 Sep 2009 15:23:15 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id EF61E50869; Wed, 9 Sep 2009 11:23:14 -0400 (EDT) From: Lowell Gilbert To: Jerry McAllister References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3037EBB7@MBX03.exg5.exghost.com> <20090908235259.GB19173@gizmo.acns.msu.edu> <20090909105707.GA27941@torus.slightlystrange.org> <20090909145922.GB22253@gizmo.acns.msu.edu> Date: Wed, 09 Sep 2009 11:23:14 -0400 In-Reply-To: <20090909145922.GB22253@gizmo.acns.msu.edu> (Jerry McAllister's message of "Wed, 9 Sep 2009 10:59:23 -0400") Message-ID: <44tyzcuopp.fsf@be-well.ilk.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "'freebsd-questions@freebsd.org'" Subject: Re: Using mdconfig for swap space X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "'freebsd-questions@freebsd.org'" List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2009 15:23:16 -0000 Jerry McAllister writes: > On Wed, Sep 09, 2009 at 11:57:07AM +0100, Daniel Bye wrote: > >> On Tue, Sep 08, 2009 at 07:52:59PM -0400, Jerry McAllister wrote: >> > On Tue, Sep 08, 2009 at 04:51:20PM -0500, Peter Steele wrote: >> > >> > > Are there any advantages to using mdconfig and creating a virtual disk for swap space as opposed to having a designated swap partition? For example, I could do something like this: >> > >> > Unless I am missing something basic here, it seems like a bad idea to >> > me - to carve out and use up some memory to use as extra storage for >> > processes that need more memory that you have taken away to give to swap. >> > That is self defeating. >> > >> > In addition, one use of swap is to write dumps to if there is a crash. >> > If you put it in memory, it is gone when you reboot. >> >> He's talking about using a swap file, rather than a dedicated partition on >> the disk, not in RAM! Although it is slightly slower, as Chuck has already >> pointed out, it might, in certain circumstances, be a somewhat more >> convenient solution than repartitioning/reinstalling the whole system. >> >> And as RW has said, the facility already exists and can be enabled with a >> couple of knobs in /etc/rc.conf. > > I understand using a file and making it in to swapspace. I have used that > a couple of times when I needed to add some swap space temporarily. But > isn't the command he is trying to use (mdconfig) for creating a memory > filesystem - eg use a chunk of memory and make a file from it (then use it > for swap or whatever)? That is in RAM. Not necessarily. What he wants is the '-t vnode' option for mdconfig(8). -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/