opensubscriber
   Find in this group all groups
 
Unknown more information…

f : freebsd-hackers@freebsd.org 19 May 2012 • 4:54AM -0400

Re: proper newfs options for SSD disk
by Dimitry Andric

REPLY TO AUTHOR
 
REPLY TO GROUP




On 2012-05-18 22:11, User Wojtek wrote:
> what are proper settings
>
> a) 4kB fragments so everything is 4k aligned? SSD drives itself reports
> as 512 byte blocks, but it is recomenned constantly on many places about
> 4K alignment for SSD.

That 4k alignment is most likely meant for so-called "advanced format"
hard drives (the good old magnetic platter ones); these present 512 byte
sectors to the ATA interface, but use 4096 byte sectors internally.

With SSDs however, you cannot automatically tell what their erase block
size is.  Some of them use 128kB, others 256kB, and there are probably
also devices with variable erase block sizes.

You may be able to find the exact erase block size in the technical
documentation of your specific SSD.  But the manufacturers don't always
tell. :)


> b) small fragments (like 1KB) to reduce space usage, as there is no
> seeking so it will not slow down but save space on relatively small SSD

I don't think you would want to write lots of very small fragments to
any SSD. :)


> c) anything else?

Be sure to use "-t enable" when creating the filesystem:

     -t enable | disable
             Turn on/off the TRIM enable flag.  If enabled, and if the under-
             lying device supports the BIO_DELETE command, the file system
             will send a delete request to the underlying device for each
             freed block.  The trim enable flag is typically set when the
             underlying device uses flash-memory as the device can use the
             delete command to pre-zero or at least avoid copying blocks that
             have been deleted.
_______________________________________________
freebsd-hackers@free... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@free..."

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.