Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Feb 2008 12:38:06 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        "millueradfa@yahoo.com" <millueradfa@yahoo.com>
Cc:        "Jason C. Wells" <jcw@highperformance.net>, freebsd-questions@freebsd.org
Subject:   Re: Some ideas for FreeBSD
Message-ID:  <20080208173806.GA35988@gizmo.acns.msu.edu>
In-Reply-To: <229884.2551.qm@web34506.mail.mud.yahoo.com>
References:  <47AB9DA9.8080006@highperformance.net> <229884.2551.qm@web34506.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 08, 2008 at 09:16:52AM -0800, millueradfa@yahoo.com wrote:

> 
> --- "Jason C. Wells" <jcw@highperformance.net> wrote:
> 
> > Heiko Wundram (Beenic) wrote:
> > > Am Donnerstag, 7. Februar 2008 07:32:16 schrieb
> > Jason C. Wells:
> > >> Norberto Meijome wrote:
> > >>> But I agree with Wojciech..do you really want to
> > use swap files?
> > >> One could mount an md filesystem and then use
> > that as swap.  That way
> > >> you wouldn't need to use any disc space.  As a
> > plus, the performance
> > >> would be way better than disc.
> > > 
> > > Ahem, sorry, that's just plain stupid. Either the
> > md system is backed up by 
> > > RAM (in which case you don't need the swap anyway;
> > why'd you want to access 
> > > RAM by putting it in a swap on an md in RAM?), or
> > it's backed up by swap, in 
> > > which case you have a chicken and egg problem.
> > 
> > Mmm, yes. That is quite a pickle.  But a chicken or
> > an egg would still 
> > be inferior to an md backed swap. :)
> > 
> > Regards,
> > Jason
> > 
> > _______________________________________________
> > 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"
> > 
> 
> Actually, you can have file backed swap files. I have
> done it. However, with more than one swap file, or a
> swap file and a swap partition on the same disk, there
> ends up being quite a bit of thrashing. This is due
> apparently to some interaction between having two
> swaps on the same disk but that is jut a guess, i dont
> know what the cause is. 
> 
> The idea behind having swap files is that swap space
> can more easily be expanded and added on the fly. If
> your initial swap partition was not big enough it is
> more easy to more swap in another file. As well, a
> swap file that can grow and shrink, also would allow
> you to avoid having a lot of disk space consumed by
> unused swap, so he disk space is allocated when
> needed, or allow more space to easily be added if you
> find out you do not have enough. 
> 
> With applications crashing because of swap partition
> running out, this would be an important feature, since
> more swap space can be allocated in a file which is
> easier to do than a partition.
> 
> Swap is still important on systems with small amounts
> of RAM, FreeBSD should be able to run on some older
> hardware too and should not be like Windows where you
> have to have 2 GHZ 2 GB of ram to run it. dynamic swap
> space makes it more versatile which is a good thing
> 

The question here is not whether to have swap, but to have md
as swap.   It seems like that would cause more problems with
speed and probably thrashing that just plain swap partitions
on disk.

Now, the abiliity to use a file as additional swap can be
important because it will allow you to add some swap in a pinch
without reconfiguring your disk or adding disk - which a larger
or additional swap partition would require.   

But, a swap file is not something you want to run with as a matter 
of course.  You want a swap partition.   Writing and reading a
swap partition is optimized for that in a way that writing to a 
file system cannot easily be optimized.

At least that's what my mom told me.

////jerry
> 
>       ____________________________________________________________________________________
> Looking for last minute shopping deals?  
> Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> _______________________________________________
> 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?20080208173806.GA35988>