On Wed, Jan 03, 2024 at 11:22:28AM -0800, Carl E. Thompson wrote: > > > On 2024-01-03 9:52 AM PST Kent Overstreet <kent.overstreet@xxxxxxxxx> wrote: > > > ... > > > > Could ZNS model affects a GC operations? Or, oppositely, ZNS model can > > > help to manage GC operations more efficiently? > > > > The ZNS model only adds restrictions on top of a regular block device, > > so no it's not _helpful_ for our GC operations. > > > ... > > Could he be talking about the combination of bcachefs and internal > drive garbage collection rather than only bcachefs garbage collection > individually? I think the idea with many (most?) ZNS flash drives is > that they don't have internal garbage collection at all and that the > drive's erase/write cycles are more directly controlled / managed by > the filesystem and OS block driver. I think the idea is supposed to be > that the OS's drivers can manage garbage collection more efficiently > that any generic drive firmware could. So the ZNS model is not just > adding restrictions to a regular block devices, it's also shifting the > responsibility for the drive's **internal** garbage collection to the > OS drivers which is supposed to improve efficiency. > > Or I could be completely wrong because this is not an area of > expertise for me. Yeah nothing really changes for bcachefs, GC-wise. We already have to have copygc, and it works the same with ZNS as without. The only difference is that with the SMR hard drivers buckets are a lot bigger than you'd otherwise pick, but how much that affects you is entirely dependent on your workload (random overwrites or no).