koverstreet / bcachefs

Other
680 stars 70 forks source link

High metadata overhead on empty volume #652

Closed brauliobo closed 7 months ago

brauliobo commented 7 months ago

On the disk below:

Model: ATA Samsung SSD 870 (scsi)
Disk /dev/sdd: 2048GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  1024MB  1023MB  fat32        primary
 2      1024MB  48.4GB  47.4GB  btrfs        primary
 3      48.4GB  2048GB  2000GB  btrfs        primary

I've tested creating bcachefs on the 2 last partitions, here it is the df -h output:

/dev/sdd2                          41G  2,0M   40G   1% /mnt/ss2t/root
/dev/sdd3                         1,7T  3,3M  1,7T   1% /mnt/ss2t/home

Compared to btrfs, that is 9-11% less free space:

/dev/sdd2                          45G  5,8M   44G   1% /mnt/ss2t/root
/dev/sdd3                         1,9T  5,8M  1,9T   1% /mnt/ss2t/home

Why that much overhead?

koverstreet commented 7 months ago

Copygc reserve.

Having a real reserve means -ENOSPC is reliable.