meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:fs:btrfs_vs_zfs [2015/03/25 19:31]
niziak
linux:fs:btrfs_vs_zfs [2016/04/21 13:49] (current)
niziak [Features]
Line 1: Line 1:
-^ Feature ​                      ^ ZFS    ^ BTRFS ^ remarks ^ +====== BTRFS vs ZFS ====== 
-^ License ​                      | CDDL   | GPL   ​|  | + 
-^ Copy-on-write ​                | Yes    | Yes   ​|  | +My target is to: 
-^ Checksums ​                    | Yes    | Yes   ​ +  * protect private files (Photos, documents) (of course I have scheduled backups to external device). On ZFS I can create subvolume with copies=2. On BTRFS with single disc it is not possible. 
-^ Encryption ​                   |              ​ + 
-^ Online defragmentation ​       |        | Yes   ​|  | +  * reduce e-mail disc space usage (compression,​ deduplication). On both I can enable compression with similar results. Deduplication works better on BTRFS, because I can specify small block size 4kB. Also is performed by external tool and it is not consuming RAM all the time, like dedup tables in ZFS. 
-^ Online growing / shrinking ​   |        | Yes   ​|  | + 
-^ Online block dev add/​rem ​     | Yes(-) | Yes   ​| ZFS: only mirrored devices can be removed | +  * deduplicate mp3 files grouped in folders 
-^ Online deduplication ​         | block  | No    | btrfs: planned, external tool available |+ 
 +With single disc setup, there is no big difference between features provided by both filesystems. 
 + 
 +Things to consider: 
 +  * BTRFS is integrated by default, ZFS-fuse is old, ZFS native is provided as DKMS but can cause problem if kernel will be upgraded 
 +  * BTRFS lacks of data redundancy (ZFS copies=2), but I can live without it because I have external backup. 
 +  * BTRFS deduplication looks better (no constant RAM consumption) 
 +  * ZFS offers better tooling  
 +  * BTRFS support attributes (like +c = compress) 
 +  * user quota ??? 
 + 
 +  
 +===== Features ===== 
 + 
 +^ Feature ​                      ^ ZFS    ^ BTRFS  ^ remarks ^ 
 +^ License ​                      | CDDL   | GPL    |  | 
 +^ Copy-on-write ​                | Yes    | Yes    |  | 
 +^ Checksums ​                    | Yes    | Yes    ZFS: 256bit fletcher2 or SHA256; BTRFS: CRC32c
 +^ Encryption ​                   | No     No     workaround with encryption of underlying devices ​
 +^ Online defragmentation ​       |        | Yes    |  | 
 +^ Online growing / shrinking ​   |        | Yes    |  | 
 +^ Online block dev add/​rem ​     | Yes(-) | Yes    | ZFS: only mirrored devices can be removed | 
 +^ Online deduplication ​         | block  | No     ​| btrfs: planned, external tool available |
 ^ Online compression ​           | Yes    | LZO / ZLIB | similar compression level | ^ Online compression ​           | Yes    | LZO / ZLIB | similar compression level |
-^ Subvolumes ​                   | Yes    | Yes   ​|  | +^ Subvolumes ​                   | Yes    | Yes    |  | 
-^ Subvolumes inside subvol. ​    | Yes    | Yes   ​|  | +^ Subvolumes inside subvol. ​    | Yes    | Yes    |  ​
-^ Linux root filesystem ​        | ?      | Yes   ​|  | +^ Limit subvolume size          | Yes    | Yes    | ZFS: quota, BTRFS: quatagroup ​
-^ Striping ​                     |        |       ​|  | +^ Linux root filesystem ​        | ?      | Yes    |  | 
-^ Mirroring ​                    ​| ​       |       ​|  | +^ Striping ​                     |        |        |  | 
-^ Online scrubbing ​             | Yes    | Yes   ​| scrub - scan and check data integrity |+^ Mirroring ​                    ​| ​       |        |  ​
 +^ Redundancy on single disc     | Yes    | metadata| ZFS: copies=n param 
 +^ Online scrubbing ​             | Yes    | Yes    | scrub - scan and check data integrity | 
 +^ In place ext2/3/4 conversion ​ | No     | <​del>​Yes</​del> ​   | BTRFS: with rollback possible! DO NOT USE, it is not well tested and causes errors! | 
 +^ maturity ​                     | Yes    | Linux 3.10 | | 
 +^ GRUB loader support ​          ​| ​       | Grub2  |  | 
 +^ Snapshots ​                    | Yes    | Yes    |  | 
 +^ Performance ​                  | fuse   | kernel | fuse is anymore bottleneck with moder kernels | 
 + 
 +^FS Overhead ​ ^^^ 
 +^    EXT4     ​^ ​    ​BTRFS ​    ​^ ​   ZFS    ^ 
 +|   270 371   ​| ​   269 540    |           | 
  
 +[[http://​richardhartmann.de/​blog/​posts/​2012/​02/​RAID-sucks/​]]
  
 [[http://​docs.oracle.com/​cd/​E37670_01/​E37355/​html/​ol_use_case1_btrfs.html]] [[http://​docs.oracle.com/​cd/​E37670_01/​E37355/​html/​ol_use_case1_btrfs.html]]
Line 32: Line 67:
   * SSD upport (trim/​discard)   * SSD upport (trim/​discard)
  
-ZFS: +===== ZFS ===== 
-  * (-) compression on/off per subvolume+  * (-) compression on/off per subvolume ​- no support for +c attribute
   * (+) All features are controlled by subvolumes (datasets) attributes (compression,​ deduplication)   * (+) All features are controlled by subvolumes (datasets) attributes (compression,​ deduplication)
   * (-) CDDL license is not compatible with Linux kernel. Cannot be distributed as derived work.   * (-) CDDL license is not compatible with Linux kernel. Cannot be distributed as derived work.
Line 39: Line 74:
   * (-) Deduplication on block level, cannot find shifted blocks.   * (-) Deduplication on block level, cannot find shifted blocks.
  
-BTRFS:+===== BTRFS =====
   * (+) compression on during mount, but also using attribs ​   * (+) compression on during mount, but also using attribs ​
-  * (-) deduplication not implemented. External tool available: [[https://​github.com/​markfasheh/​duperemove]duperemove]+  * (?) deduplication not implemented. External tool available: [[https://​github.com/​markfasheh/​duperemove]duperemove]. External tool can be also a benefit. To reduce CPU and memory you can start deduplication process when you want, and only on selected files/dirs.
   * (-) All features controlled by mount options   * (-) All features controlled by mount options
   * (+) Every block device can be removed, data are automatically copied (balanced) to free space on other devices   * (+) Every block device can be removed, data are automatically copied (balanced) to free space on other devices
   * (+) Metadata are automatically duplicated between block devices, data are striped   * (+) Metadata are automatically duplicated between block devices, data are striped
  
-Compression:​ 
  
-BTRFS: There is a simple decision logic: if the first portion of data being compressed is not smaller than the original, the compression of the file is disabled -- unless the filesystem is mounted with compress-force