Swapping to MMC (Was: To swap or not to swap)

Bruce Cran bruce at cran.org.uk
Tue Dec 2 20:43:34 PST 2008


On Tue, 2 Dec 2008 22:46:40 +0000
RW <fbsd06 at mlists.homeunix.com> wrote:

> On Tue, 2 Dec 2008 20:47:26 +0000
> "Anthony M. Rasat" <anthony.rasat at gmail.com> wrote:
> 
> 
> > Pros: 1) System requires swap. Period. 2) Swap may need size in
> > range between 2.17 times to 2.22 time or whatever size it need.
> > This is not prohibited by Eee's SSD size (4GB btw, 701 series).
> 
> Add what swap you need, but in my experience things get pretty slow
> before you even reach 1x system memory on hard disks. AFAIK the 2x
> figure is to do with saving kernel dumps, which you probably don't
> want to bother with.
> 
> > 
> > Cons: 1) Since SSD is manufactured have limited lifetime (around
> > 100,000 times write operation or so, I read it somewhere), swapping
> > to SSD is more likely not a wise thing to do.
> 
> I don't think it's much of a problem with modern wear-levelling.
> It's 100,000 writes per block with the writes being spread evenly over
> the device (albeit with extra write for the wear-levelling). 
> 
> There are few writes to swap until you run low on memory, so simply
> having swap wont by itself wear out the device.
> 
> > Two against one. I concurr that swap is needed. However since SSD in
> > 701 series is not removable, having a bad sector in SSD is one thing
> > you don't want to have.
> 
> I would think they have spare sectors like hard disks do.
> 
> 
> > performances? And what happened if FreeBSD kernel suddenly lose its
> > swap file by absent-minded human? Is it going to be just angry or
> > having massive heart attack?
> 
> 
> I'm not sure whether an active swap file can be deleted or not, but it
> would be owned by root, so not deletable by a normal user. I suspect
> that it would behave like an open file and not be genuinely deleted
> until swapoff'ed. In any case it's not more of a risk than deleting
> any critical file.

I suspect it was more a worry about someone pulling the MMC card out of 
the slot; in that case I think FreeBSD would panic rather quickly!
Another thing to consider is that the bus the MMC sits on is probably
somewhat slower than the bus the SSD is on, so any swapping is going
to slow the system down even more than usual.

-- 
Bruce Cran


More information about the freebsd-questions mailing list