Closed attack204 closed 1 year ago
@attack204 : See https://github.com/yhr/zenfs/blob/724cfc56ce59163e385077a8820bfecdb932b7d8/fs/fs_zenfs.cc#L272 for a reference GC implementation, we're reviewing it now and it will soon be merged as part of #184
@yhr That's really good! So is this GC algorithm relatively stable or frequently optimized? I may do some modifications on it.
@attack204 : It's reasonably stable, we've been testing it both with percona-mysql-server and db_bench with good results (up to 10% space amp reduction). That said, it can probably be improved, so any experimentation/improvements from your side would be welcome! We set up target file sizes to match zone capacity when running with gc enabled.
@yhr Thank you very much!
It seems if we call ZenFS::MigrateExtents(const std::vector<ZoneExtentSnapshot*>& extents); Then it will migrate the data to another zone. However, if we want to GC a zone, how can we get the data in zone? It seems no data structure was maintained in Zone Class.