btrfs / btrfs-todo

An issues only repo to organize our TODO items
21 stars 2 forks source link

O_DIRECT + nocow + no snapshots + noatime + lazytime + prefilled writes should be fast! #47

Open socketpair opened 1 year ago

socketpair commented 1 year ago

Suppose case:

O_DIRECT nocow set (chattr +C) no snapshots on the whole FS Mounted with noatime,lazytime prefilled file (i.e. dd from urandom) No reflink copies

App does radom aligned O_DIRECT writes. For my understanding, these writes should be as fast as writing to raw blockdev. In Ext4 it is.

In BTRFS it gives more than 2 times less iops.

This should be fixed. At least with restrictions (for example swapfile requires some). Yes, making snapshots whil at least one such file is open should be declined. The same with reflink.

Possibly, a new attribute to work with a file as with swapfile.