Using an SSD as swap?

Robert Krawitz rlk-FrUbXkNCsVf2fBVCVOL8/A at public.gmane.org
Thu Dec 2 09:23:39 EST 2010


On Thu, 2 Dec 2010 07:56:56 -0600, Jack Coats wrote:
> If you can find a solid state drive that is NOT flash based and has
> great I/O ability, I would suggest putting swap on it, if you swap a
> lot.  Prior to that adding more main memory is probably a better
> idea.

Unfortunately, my laptop is maxed out at 3.3 GB.  This is a problem if
I want to run VirtualBox with a 1.5 GB guest and Firefox (which often
blows up to 2 GB or more on me, thanks to my rather unruly habits); if
I then want to run GIMP or Hugin, of course, I get really in the hole.

> Flash is better now, but it still retains a limited life of
> read/write cycles.  So using any flash based for 'regular write'
> file systems is asking for the file systems to fail before they
> must.

So the question is, will it fail before my laptop is due to be
replaced anyway, and if it does, will I really care (I won't be
putting "real" data on it).  Even cheap flash is now rated at
something like 100K write cycles; a 64 GB flash drive could therefore
take (at least) 6 PB of write before failing.  If it lasts 2-3 years
before failing, but makes my overall experience happier, that doesn't
seem such a bad tradeoff.  By then, flash memory or whatever will
probably be a lot better anyhow and I'll be near the end of the
service life for my laptop.

The real question I have is whether without NCQ it really will make my
experience that much better.  I see latencies typically quoted at
about .1 ms (about 2 orders of magnitude better than rotating media),
but it isn't clear to me what happens without queued commands (or
whether that even matters).

> The new implementations that let you 'run from a flash drive' (sd
> card, USB dongle, whatever) suggest you have enough memory, so they
> can cache just about everything to memory, and they only write to
> the flash drive when they MUST.  This significantly helps in
> lengthening the life of the flash in these devices.  The file
> systems on these devices, if I remember correctly, also varies where
> it writes, so the 'wearing out' due to writing to an area is
> distributed over most of the card and not just in one place.
> Another good technique to get more life from the 'limited number of
> write' media.

Flash devices themselves have wear leveling built in anyway; if you
keep writing to the same logical block, you actually get different
locations on the device.





More information about the Discuss mailing list