newfs on a SSD

Pierre-Luc Drouin pldrouin at pldrouin.net
Tue May 29 18:35:41 UTC 2012


On Tue, May 29, 2012 at 2:05 PM, Roland Smith <rsmith at xs4all.nl> wrote:

> On Fri, May 11, 2012 at 09:01:33AM +0200, Christer Solskogen wrote:
> > After years of waiting for a decent price on one of these I finally
> > got one. The questions is, which options should I use on a SSD that
> > will be / on my system. I see that newfs supports TRIM, so that will
> > be turned on, but should I use journaling? gjournal? softupdates? soft
> > updates journaling? I'm confused :)
>
> Enabling TRIM with the '-t' option for newfs sounds like a good idea.
> Assuming
> the underlaying device supports it. You can check that with the 'camcontrol
> identify' command, assuming you're using the ada(4) driver.
>
> OCZ has a page with tips for Linux. Some would apply to FreeBSD as well;
>
> http://www.ocztechnologyforum.com/forum/showthread.php?54379-Linux-Tips-tweaks-and-alignment&highlight=linux
>
> Aligning the partitions with the Erase Block Size is important. See:
> https://wiki.archlinux.org/index.php/Solid_State_Drives
>
> One thing to keep in mind is to mount the filesystems you make on the SSD
> with
> the "noatime" option. This to avoid a lot of unnecessary writes.
>
> Some of the newfs parameters like blocks per cilinder group don't seem to
> make
> much sense for an SSD. Since the controller of the SSD already does all
> kinds
> of things to emulate a harddisk, I'm not sure if it makes much sense to
> tune
> the filesystem's parameters much.
>
> As for softupdates (journaled of not): try it and let us know if you see
> differences, especially in write performance. :-)
>
> The FreeBSD foundation has awarded a grant to port a special Flash
> filesystem
> and tools to FreeBSD:
>
> http://freebsdfoundation.blogspot.com/2012/03/new-project-nand-flash-support.html
> It might be worthwhile to keep that in mind for the future.
>
> What I would certainly recommend is that you make a daily automated backup
> (may I suggest calling rsync from cron at night?) of the SSD's filesystem
> to
> an actual HDD, just to be sure.
>
> Roland
> --
> R.F.Smith                                   http://rsmith.home.xs4all.nl/
> [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
> pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
>

Is there a tool in FreeBSD, similar to fstrim in Linux, that allows to
perform trimming through a cronjob as opposed to perform it every time data
is deleted? It supposedly results into a significant gain in performance...

Thanks!


More information about the freebsd-questions mailing list