Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Sep 2009 19:52:59 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Peter Steele <psteele@maxiscale.com>
Cc:        "'freebsd-questions@freebsd.org'" <freebsd-questions@freebsd.org>
Subject:   Re: Using mdconfig for swap space
Message-ID:  <20090908235259.GB19173@gizmo.acns.msu.edu>
In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3037EBB7@MBX03.exg5.exghost.com>
References:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB3037EBB7@MBX03.exg5.exghost.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090908235259.GB19173>