Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is stated regarding Btrfs -

> we're writing the entire file each time

This is a super-common misunderstanding of Copy-On-Write. Entire files are not re-written on each write to a file. New blocks are written and then the (btree) metadata is updated to include the updated block in the file. [1] This causes greater fragmentation than writing new blocks over old ones in the files existing structure as non-COW systems can do. Another thing which somewhat slows btrfs is all blocks have checksums calculated, stored in metadata and checked on read. If entire files really did need copied on each edit - it would be a great deal slower !

[1] https://btrfs.wiki.kernel.org/index.php/Btrfs_design#Files



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: