Using mdconfig for swap space

Daniel Bye danielby at slightlystrange.org
Wed Sep 9 10:57:34 UTC 2009


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.

Dan

-- 
Daniel Bye
                                                                     _
                                              ASCII ribbon campaign ( )
                                         - against HTML, vCards and  X
                                - proprietary attachments in e-mail / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090909/622d5737/attachment.pgp


More information about the freebsd-questions mailing list