[HN Gopher] Some statistics about BTRFS compression
       ___________________________________________________________________
        
       Some statistics about BTRFS compression
        
       Author : zdw
       Score  : 30 points
       Date   : 2022-09-21 18:14 UTC (4 hours ago)
        
 (HTM) web link (dataswamp.org)
 (TXT) w3m dump (dataswamp.org)
        
       | Krisjohn wrote:
       | btrfs is a horrible mess that will likely lose your data. For the
       | few production systems we implemented it on, every single normal
       | failure that other file systems can recover from had resulted in
       | complete loss. We've had to implement a project to rebuild all
       | systems that used btrfs in order to remove it.
        
         | chasil wrote:
         | Ars Technica has acknowledged that stability has been achieved
         | for single-disk filesystems. I've had no complaints, and the
         | Fedora community has not reported major problems that I have
         | heard.
         | 
         | "So, we'll repeat this once more: as a single-disk filesystem,
         | btrfs has been stable and for the most part performant for
         | years."
         | 
         | https://arstechnica.com/gadgets/2021/09/examining-btrfs-linu...
        
           | yjftsjthsd-h wrote:
           | I dunno, I understand that the worst problems are in RAID,
           | but it's only been a few years (<5y) since I lost 2 root
           | filesystems to BTRFS on a laptop with just the one disk. I'm
           | going to stay skeptical for a bit longer, although Fedora
           | adopting it as a default does give me some hope that it'll at
           | least get wider testing now.
        
         | zionic wrote:
         | >btrfs is a horrible mess that will likely lose your data.
         | 
         | Meanwhile the bazillion petabytes on the world's synology NAS
         | run fine, and are BTRFS.
        
           | yjftsjthsd-h wrote:
           | Isn't synology running it hybridized with their own
           | proprietary storage layer?
        
       | 5e92cb50239222b wrote:
       | btrfs has had support for changing the compression level for some
       | years.
       | 
       | I've been using zstd:2 (the default is 3), it compresses my data
       | close to what zlib does while being pretty light on CPU.
       | 
       | https://docs.google.com/spreadsheets/d/1x9-3OQF4ev1fOCrYuYWt...
       | (not mine)
       | 
       | https://linuxreviews.org/Comparison_of_Compression_Algorithm...
       | 
       | Also note that btrfs compression works on 128 KiB chunks and if
       | you work with small files a lot (frontend work, etc), it may
       | actually increase your SSD wear. I've seen this in practice.
        
       | demindiro wrote:
       | Stats for my desktop PC (ZFS with LZ4):
       | david@pc1:~$ /sbin/zfs get compressratio rpool tank       NAME
       | PROPERTY       VALUE  SOURCE       rpool  compressratio  1.93x  -
       | tank   compressratio  1.20x  -
       | 
       | rpool contains the root filesystem and my home directory. tank
       | contains movies, music, recordings and backups.
        
         | sleepycatgirl wrote:
         | Mood It is impressive how much space you can save, with minimum
         | CPU cost (It is there, but modern CPUs are so fast, well.. its
         | okay)
         | 
         | I run NixOS, and on /nix/store itself, i get 2.32x
         | compressratio :D
        
       | PaulKeeble wrote:
       | I use ZFS with LZ4 compression on my storage pool for NAS
       | purposes, so its mostly music, movies and game stuff and it has
       | an impressive 1.00x compression ratio, its not saved even 1%.
        
         | soupbowl wrote:
         | If compression was enabled after the data was written it will
         | not be compressed until the data is written again. Just some
         | info not sure if it applies to your compression level situation
         | or not.
        
         | masklinn wrote:
         | Seems unsurprising, as your data is already compressed.
         | 
         | I would have expected some savings from games but mayhaps not
         | from lz4. Music and movies though, if lz4 had significant
         | savings to provide these would have long been added to the
         | media formats (likely in a more specialised and effective or
         | efficient form).
        
       | heywire wrote:
       | Only somewhat related: My personal laptop is an older Dell
       | Latitude 7370 (m7-6Y75) running Fedora 36. I had to reinstall
       | using ext4 due to the performance impact of the default btrfs w/
       | compression. I was surprised at the difference it made. My disk
       | throughput was nearly half.
        
       ___________________________________________________________________
       (page generated 2022-09-21 23:01 UTC)