svn commit: r289405 - head/sys/ufs/ffs

Warner Losh imp at bsdimp.com
Fri Oct 16 19:24:27 UTC 2015


> On Oct 16, 2015, at 8:03 AM, Pedro Giffuni <pfg at freebsd.org> wrote:
> 
> 
> 
> On 10/16/15 03:53, Bruce Evans wrote:
>> On Fri, 16 Oct 2015, Hans Petter Selasky wrote:
>> 
>>> On 10/16/15 08:21, Bruce Evans wrote:
>>>> [Bruce Evans didn't write:]
>>>> In addition, making the file contiguous in LBA space doesn't
>>>>  improve the access times from flash devices because they have no seek
>>>> time.
>>> 
>>> This is not exactly true, like Bruce pointed out too. Maybe there
>>> should be a check, that if the block is too small reallocate it, else
>>> leave it for the sake of the flash. Doing 1K accesses versus 64K
>>> accesses will typically show up in the performance benchmark
>>> regardless of how fast the underlying medium is.
>> 
>> Now I don't unerstand the whole point of the change.  Anything that reduces
>> i/o's is good, but AFAIK ffs_doreallocblks() is all in software.  Writes
>> should be delayed so that it doesn't have to do extra i/o's to back out of
>> committed writes.  Often it reduces the number of writes and increases
>> their size by making blocks contiguous so that the write can be clustered.
>> Increasing the write size is especially good for flash devices, but maybe
>> ffs's default block size is already large enough.
>> 
> 
> I agree with Bruce: reallocation (which our ext2fs also does) happens
> in memory, before it hits the disk.
> 
> By the nature of their load, Netflix doesn't care about fragmentation,
> but even in that case reallocblk doesn't hurt, and I don't see anything
> inherent in SSDs that makes fragmentation desirable.
> 
> Of course, no one understands reallocblk better than Kirk, and Warner
> knows SSD's pretty well so I must be missing something. :).

This has nothing to do with fragments at all. This is all about rearranging
FFS blocks arbitrarily, which isn’t all in memory before the writes happen.
The data can and does move, which generates TRIM operations for
the old data placement, and real writes for the new data placement. These
optimizations do help.

Warner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20151016/17c1a6b8/attachment.bin>


More information about the svn-src-head mailing list