From owner-freebsd-questions@freebsd.org Fri Apr 13 13:22:23 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA337F88921 for ; Fri, 13 Apr 2018 13:22:23 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id 8F53A7FBED for ; Fri, 13 Apr 2018 13:22:23 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from lowell-desk.lan (router.lan [172.30.250.2]) by be-well.ilk.org (Postfix) with ESMTP id 7282E33C0B; Fri, 13 Apr 2018 09:22:11 -0400 (EDT) Received: by lowell-desk.lan (Postfix, from userid 1147) id 09D4139822; Fri, 13 Apr 2018 09:22:10 -0400 (EDT) From: Lowell Gilbert To: "Ronald F. Guilmette" Cc: freebsd-questions@freebsd.org Subject: Re: Two questions --- SSD block sizes and buffering References: <36747.1523609096@segfault.tristatelogic.com> Date: Fri, 13 Apr 2018 09:22:10 -0400 In-Reply-To: <36747.1523609096@segfault.tristatelogic.com> (Ronald F. Guilmette's message of "Fri, 13 Apr 2018 01:44:56 -0700") Message-ID: <4436zzw8al.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Apr 2018 13:22:24 -0000 "Ronald F. Guilmette" writes: > In message <1cc45af6-bd4b-3854-4d37-8e9343786ce6@qeng-ho.org>, > Arthur Chance wrote: > >>... man newfs says >> >>-f frag-size >> The fragment size of the file system in bytes. It must be a >> power of two ranging in value between blocksize/8 and blocksize. >> The default is 4096 bytes. >> >>so it's been fixed for 4k disks. > > Swell. But that may not really do much (in the way of improving performance) > if the underlying mass storage device has a "native" block size of, say, > 128 KiB. And as I noted, it is my understanding that essentially all > flash-based mass storage devices -do- have a native block size of 128 KiB, > or perhaps even larger. That's not really relevant to performance the way it is with a spinning-platter disk, because proximate writes (or, for that matter, reads) aren't particularly more efficient than random ones. The block size really only comes to play when the native block gets re-written, which is handled internally by the device controller -- and we really don't have much insight into the algorithms it uses. > So.... When installing FreeBSD onto an SSD, would one be well advised > to perform all newfs operations with an explicit "-f 131072" option? Probably not, unless the vast majority of your files are multiple megabytes in size. And the difference still won't be in read or write speed.