On Thu, Mar 09, 2017 at 12:08:56PM -0500, Jonathan Thornburg wrote:
> Hi,
>
> I'm preparing to set up a new 1TB SSD (Samsung 850pro) for use in an
> OpenBSD laptop. Like every other SSD I've seen, this SSD uses a 4K
> byte block size.
>
> I'm planning to use softraid crypto for this disk, and mount all the
> main filesystems with softdep and noatime.
>
> I understand that fdisk and disklabel partition boundaries should
> be multiples of 4K bytes (= 8 512-byte sectors), e.g., starting the
> 'a' disklabel partition at offset=64 512-byte sectors is much better
> than starting it at offset=63.
>
> I've read the misc@ thread on "4k sector disks" from 2010,
> http://marc.info/?l=openbsd-misc&m=127071305915101&w=1
> http://marc.info/?l=openbsd-misc&m=127149466227162&w=1
> tedu's 2011 blog post "lessons learned about TRIM",
> http://www.tedunangst.com/flak/post/lessons-learned-about-TRIM
> and the 2014 daemonforums thread on SSD installs,
> http://daemonforums.org/showthread.php?t=8630
>
> Questions:
> * Should I set the FFS fragment size (newfs -f) to 4096 or larger?
Don't think it is needed to set manyally, should be handled automatically.
> * What about the FFS sector size (newfs -S): should this be left at
> its default, or set to 4096?
Default will be 4096 on a 4k disk.
> * Are there other fdisk and/or newfs parameters which should be set
> differently than I'd set them for a mechanical hard disk of similar
> size?
Nope.
> * What are the tradeoffs between FFS (newfs -O 1) and FFS2 (newfs -O 2)?
> Since this is OpenBSD, perhaps I should rephrase this question as
> "what Fine Manual should I have read to learn about these tradeoffs?"
If you have large partitions Lets say > 100G), go for -O2. Saves quite
some time. If you plan to store many large files and few small files,
go for a larger blocksize (and possibly fragment size).
> * Does or should using softraid crypto change the answers to any of
> the above questions?
Cannot tell that,
-Otto