"swap" partition leads to instability?
Adam Vande More
amvandemore at gmail.com
Mon May 27 01:17:57 UTC 2013
On Sun, May 26, 2013 at 7:20 PM, Warren Block <wblock at wonkity.com> wrote:
> Which part?
This part: "Another problem with SSDs is that they can have
difficulty with wear leveling." Do as I suggested and you'll get
maximum life from the drive even with swap present. Even absent of
best practices, SSD's in general do a great job in managing wear
leveling. We're 5+ years out from crappy SSD's with dynamic wear
leveling. Modern SSD's don't suffer nearly the write amplification
effect of earlier drives. Also the write amplification effect only
comes into play during random writes. A lot of common swap usage
isn't random. All this is of course assuming we're dealing with a
quality drive. If you're using a cheap Chinese knock off, all bets
> A FreeBSD swap partition has no way to use TRIM, so I suggest
> using a swap file on top of UFS, which does support TRIM.
> Using TRIM should preserve performance better than leaving unused space and
> letting the drive wear leveling algorithm move data around without the hint.
Normal dynamic wear leveling on a modern SSD will be better than
imposing an FS- backed swap for 4GB partion occupying a small fraction
of total drive space. File backed paging imposes two sets of
bottlenecks and TRIM only *helps* with one. Another part of the
equation is how much is swap used. If rarely, this is a non-issue to
begin with. If it's significant, any flash SSD probably isn't
appropriate. Certain other SSD's are not subject to these guidelines
Adam Vande More
More information about the freebsd-questions