From owner-freebsd-questions@FreeBSD.ORG Tue Sep 8 23:02:37 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 6CB2D1065670 for ; Tue, 8 Sep 2009 23:02:37 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-yw0-f197.google.com (mail-yw0-f197.google.com [209.85.211.197]) by mx1.freebsd.org (Postfix) with ESMTP id 2319A8FC08 for ; Tue, 8 Sep 2009 23:02:37 +0000 (UTC) Received: by ywh35 with SMTP id 35so4324379ywh.28 for ; Tue, 08 Sep 2009 16:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=StfpX/6Wg3FHr8n5JRt+D37p5lE/PAJ+TlcvV5Hdwn8=; b=vg3ORN7CrU+1hGPlZqYwie5JtCWRHktOY1I1XNSxaWV8p8hQN7CrUASpp4jDARmy30 0+vRGLEU+w9MQSOLS8LTuuFBp2QS0wAKVwo86uDL6vCm7a8rclE+BnycE8WkypbaOf6g gxyuKP17OEcpWJ4r9RFf1AD5qFI4HZbPG//b0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=j5Jj4yS4h4VPqei/ZBG0q1aqtxgPaAIhkpcwV6A2ze6NcH0UOKtbAVSKejToAgkk95 zYqlt6ygNH6aaqnDpXhiDGrtlEZuxaeKXPg8MNWT37lUHKUlY1tfJ7sEruySfxxmAEyu mMWJxdoJFqkBTY4Xnz+0MfHdjb51SACYkbzVM= MIME-Version: 1.0 Received: by 10.150.194.20 with SMTP id r20mr25806679ybf.340.1252450956595; Tue, 08 Sep 2009 16:02:36 -0700 (PDT) In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3037EBB7@MBX03.exg5.exghost.com> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3037EBB7@MBX03.exg5.exghost.com> Date: Tue, 8 Sep 2009 18:02:36 -0500 Message-ID: <6201873e0909081602r4f8620a7jcab70703977d5ee9@mail.gmail.com> From: Adam Vande More To: Peter Steele Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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:02:37 -0000 On Tue, Sep 8, 2009 at 4:51 PM, 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: > > 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? > > In general, this is not a good idea. Your system will ideally not use swap space at all, and if it's using it a lot then it could sure use the extra ram consumed by the md drive instead of in swap. Most likely to slow your system down, not speed it up. If you're going to do anything, it's best to keep swap on a separate disk, or on the outer part of disk. -- Adam Vande More