CFT: TRIM Consolodation on UFS/FFS filesystems

bob prohaska fbsd at www.zefox.net
Sun Aug 26 17:42:03 UTC 2018


On Fri, Aug 24, 2018 at 10:25:58AM -0600, Ian Lepore wrote:
> A usb sdcard reader/writer will definitely mask the trim capability of
> an sdcard. Aside from that, ALL sdcards support trim on freebsd,
> regardless of what any support folks at sandisk might tell you. The
> trim operation is supported in the mmcsd driver by issuing sd erase
> commands (CMD32/33/38 sequence) which has been in the sd spec from the
> beginning.
> 
> That said, it's my experience that different cards implement CMD38
> different ways. Some cards treat it like a TRIM -- it's a hint that
> tells the card "the data in these sectors need not be preserved during
> future updates to the erase block they're embedded in", and thus they
> happen very fast and improve efficiency. Other cards treat it as a more
> synchronous operation, physically erasing the blocks involved while-
> you-wait, which can be *horrible* for performance on ufs (although
> potentially it might get better with the consolidation of BIO_DELETEs).

This raises a practical question:

How does throughput to microSD compare to throughput to USB, assuming the
flash controllers are well-executed? Sizewise there's no need for two devices,
a single microSD has plenty of space for my purposes. I thought that having
a separate device for swap and maybe /usr would speed things up, but perhaps
that's quaint notion leftover from st506 days. 

Thanks for reading!

bob prohaska
 


More information about the freebsd-arm mailing list