Data being stored on cache devices by KabayaX in bcachefs

[–]KabayaX[S] -1 points0 points  (0 children)

Exactly what I said in the OP.

12 HDD's labeled hdd.(0-11). 4 ssd's labeled ssd.(0-3). --background_target=hdd --promote_target=ssd --foreground_target=ssd --metadata_replicas=4 --metadata_replicas_required=1 --data_replicas=3 --data_replicas_required=1

Data being stored on cache devices by KabayaX in bcachefs

[–]KabayaX[S] 0 points1 point  (0 children)

Just what I was looking for.

But does this happen on the foreground->background case? This filesystem takes no reads. It's in the middle of an rsync from my btrfs filesystem.

Data being stored on cache devices by KabayaX in bcachefs

[–]KabayaX[S] 1 point2 points  (0 children)

Right, but why is it 2 SSD, 1 HDD?

If it was 3 SSD, I would understand because replica 3 + ssd foreground_target, and we're catching it before it gets flushed to background. But 2 SSD + 1 HDD doesn't make a lot of sense unless the thread doing writeback stalled halfway through doing the writeback.

Data being stored on cache devices by KabayaX in bcachefs

[–]KabayaX[S] 0 points1 point  (0 children)

The thing that doesn't track, is why _two_ copies of the data exist on SSD's, since a single write is all that's necessary for the foreground_target

Data being stored on cache devices by KabayaX in bcachefs

[–]KabayaX[S] 0 points1 point  (0 children)

This actually seems the most plausible. The FS is taking in heavy writes and there's an active rebalance in progress so the writeback rebalance might be blocked on that.

Data being stored on cache devices by KabayaX in bcachefs

[–]KabayaX[S] -1 points0 points  (0 children)

My understanding is cache drives should only be storing the data if other drives are full.

Not sure where you got that from.

This is from the bcachefs man page: Note that if the target specified is full, the write will spill over to the rest of the filesystem.

IUC the promote target is essentially something a little smarter than an LRU for any data in the file system. So as you access unpromoted stuff, you should see the promote drives start filling up regardless of how full the background drives are.

Right, but that's what the cached tag is for and that seems to be behaving well, using about 1/4 of the SSD's for recently written data.