From owner-freebsd-questions@FreeBSD.ORG Tue Sep 8 23:57:17 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 59BE51065679 for ; Tue, 8 Sep 2009 23:57:17 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 1F6448FC18 for ; Tue, 8 Sep 2009 23:57:16 +0000 (UTC) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id n88NqxwN019606; Tue, 8 Sep 2009 19:52:59 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id n88NqxAp019605; Tue, 8 Sep 2009 19:52:59 -0400 (EDT) (envelope-from jerrymc) Date: Tue, 8 Sep 2009 19:52:59 -0400 From: Jerry McAllister To: Peter Steele Message-ID: <20090908235259.GB19173@gizmo.acns.msu.edu> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3037EBB7@MBX03.exg5.exghost.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3037EBB7@MBX03.exg5.exghost.com> User-Agent: Mutt/1.4.2.2i 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 23:57:17 -0000 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. ////jerry > > mdconfig -a -t swap -f /var/swap0 -s 4g > swapon -a /dev/md0 > > to add 4G to the system swap space backed by the file /var/swap0. How would this compare to repartitioning my hard drive and adding a new 4GB swap partition? > > _______________________________________________ > 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" >