From owner-freebsd-questions@FreeBSD.ORG Wed Sep 9 13:07:52 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 1CAFB106566B for ; Wed, 9 Sep 2009 13:07:52 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505c.appriver.com [98.129.35.7]) by mx1.freebsd.org (Postfix) with ESMTP id D84BC8FC1E for ; Wed, 9 Sep 2009 13:07:51 +0000 (UTC) X-Policy: GLOBAL - maxiscale.com X-Policy: GLOBAL - maxiscale.com X-Primary: psteele@maxiscale.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: psteele@maxiscale.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->UNITED STATES->UNITED STATES X-Note-Sending-IP: 98.129.23.14 X-Note-Reverse-DNS: ht01.exg5.exghost.com X-Note-WHTLIST: psteele@maxiscale.com X-Note: User Rule Hits: X-Note: Global Rule Hits: 111 112 113 114 118 119 130 214 X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [98.129.23.14] (HELO ht01.exg5.exghost.com) by server505.appriver.com (CommuniGate Pro SMTP 5.2.14) with ESMTPS id 11116362; Wed, 09 Sep 2009 08:07:50 -0500 Received: from mbx03.exg5.exghost.com ([169.254.1.239]) by ht01.exg5.exghost.com ([98.129.23.14]) with mapi; Wed, 9 Sep 2009 08:07:50 -0500 From: Peter Steele To: 'Daniel Bye' , "'freebsd-questions@freebsd.org'" Date: Wed, 9 Sep 2009 08:07:37 -0500 Thread-Topic: Using mdconfig for swap space Thread-Index: AcoxPHlfP6oC6NR0R+GpOUVZ8YzcvgAETUgw Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3037EC0A@MBX03.exg5.exghost.com> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3037EBB7@MBX03.exg5.exghost.com> <20090908235259.GB19173@gizmo.acns.msu.edu> <20090909105707.GA27941@torus.slightlystrange.org> In-Reply-To: <20090909105707.GA27941@torus.slightlystrange.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: 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: Wed, 09 Sep 2009 13:07:52 -0000 Thanks for the responses. The reason I'm looking at doing this is that we h= ave increased memory on our platform from 4GB to 8GB and therefore have to = increase swap space from 8GB to 16GB. We have enough space in our /var part= ition that we could add a swap file there and not have to touch the existin= g partition layout. I like the simplicity of the swap file approach, but we= have an application that is very sensitive to I/O performance and I'm a li= ttle wary what this could mean. QA I know would have a field day in trying = to pound the system with all sorts of stress tests. I think a dedicated swa= p partition is probably a safer option. Peter -----Original Message----- From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions@f= reebsd.org] On Behalf Of Daniel Bye Sent: Wednesday, September 09, 2009 3:57 AM To: 'freebsd-questions@freebsd.org' Subject: Re: Using mdconfig for swap space 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: >=20 > > Are there any advantages to using mdconfig and creating a virtual disk = for swap space as opposed to having a designated swap partition? For exampl= e, I could do something like this: >=20 > Unless I am missing something basic here, it seems like a bad idea to=20 > me - to carve out and use up some memory to use as extra storage for=20 > processes that need more memory that you have taken away to give to swap. > That is self defeating. >=20 > In addition, one use of swap is to write dumps to if there is a crash.=20 > 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 conveni= ent solution than repartitioning/reinstalling the whole system. And as RW has said, the facility already exists and can be enabled with a c= ouple of knobs in /etc/rc.conf. Dan -- Daniel Bye _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \