Announcement

Collapse
No announcement yet.

Btrfs Gets Talked Up, Googler Encourages You To Try Btrfs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by Luke View Post

    I hear you can disable COW on btrfs.....
    Yes you can. You can also do it for a specific file for folder, which will allow files to be shredable.

    Comment


    • #32
      Originally posted by benmoran View Post
      Yes you can. You can also do it for a specific file for folder...
      Which you should do for your swap file.

      Comment


      • #33
        I have SLES11 boxes (more than 300) for which we use btrfs as the root filesystem. Aside from the occasional DBA doing something really stupid, it has worked well in production for Oracle RAC clusters. We don't use anything exotic as far as the options go (SLES doesn't support them) an I've been able to get out of any issues with balance failures. SLES12 will have btrfs as the default root filesystem, and if you are using grub2 as the bootloader and have no /boot filesystem, you can boot from snapshots to roll back ugly things. The /oracle, /oraadmin, and /oracrs filesystems (or subvolumes) will let DBAs back out of disasterous Oracle patches. Going to be fun...

        Comment


        • #34
          About swap files: ditch it forever.

          Originally posted by xeekei View Post
          Which you should do for your swap file.
          It could be much wise idea just add as much RAM as you can afford and forget swap files/partitions, preferrably forever. Dozen and half of gigz RAM would usually do without swap file at all. Needless to say HDD is veeeeeerrrrrryyyyyyy sssssllllllooooowwwwww RAM replacement. So you should be masochistically inclined to use slow RAM replacement instead of actual RAM if you can afford actual RAM. And in modern world you shouldn't have that problem most of time. Then you can get really fast system. Ditching swap would increase interactivity heck a lot and make system faster and very responsive. Even out of memory conditions could be fast: offending task would just die in a matter of second, thanks to OOM killer, unlike minutes of heavy swapping if you're using swap.

          Not to mention large disk buffers can make system to skyrocket in terms of performance. And unlike moronic cache memory management in ZFS, btrfs memory management is integrated with Linux kernel, so its possible to take almost all free RAM as disk cache without chance some large memory allocation would face lack of memory to complete it. Not a case with ZFS (to make things worse, ZFS tends to perform poorly without huge disk caches).

          But if you need swap (ugh, you better do not), its wise to put it on fast drive and not to use FILES. Its better to use dedicated PARTITION (without usual file system at all). Because to get page, swap file have to be looked up about where to get required page. Then you do not just getting that page. Its rather translated into file operations and filesystem have to get idea how to obtain required data which turns out to be pages. This process is subject to fragmentation and/or extra work of filesystem layer. OTOH in swap partition there is less overhead, it can't fragment and there is no filesystem doing some extra work. So if you really need swap it can be wise to run it on dedicated partition of some fast drive.

          P.S. as for btrfs itself it proven to be fairly usable with recent kernels, at least on "usual" usecases and actually rather fast, up do degree being hard to distinguish from ext4 when looking on system attitude with naked eye without resorting to looking on filesystem type. IMO its very promising thing.
          Last edited by 0xBADCODE; 19 August 2014, 10:08 PM.

          Comment


          • #35
            You should NEVER use any swap files on a btrfs filesystem - it will hose the filesystem badly.

            Comment


            • #36
              That sounds like ALL loopback files can be issues on BTRFS

              Originally posted by dweigert View Post
              You should NEVER use any swap files on a btrfs filesystem - it will hose the filesystem badly.
              I routinely back up my OS to a dd image snapshot of the entire root partition after zeroing out all unused space. That makes the image file (similar to a swapfile except for its contents) more easily compressed when I make a tarball of it and a /boot partition image. This sounds like BTRFS has issues with container files in general.

              Comment


              • #37
                Swap files can be written to quite a bit, and COW filesystems will do all sorts of things under the covers as the data in the swap file keeps changing.

                Comment


                • #38
                  Originally posted by 0xBADCODE View Post
                  It could be much wise idea just add as much RAM as you can afford and forget swap files/partitions, preferrably forever. Dozen and half of gigz RAM would usually do without swap file at all. Needless to say HDD is veeeeeerrrrrryyyyyyy sssssllllllooooowwwwww RAM replacement. So you should be masochistically inclined to use slow RAM replacement instead of actual RAM if you can afford actual RAM. And in modern world you shouldn't have that problem most of time. Then you can get really fast system. Ditching swap would increase interactivity heck a lot and make system faster and very responsive. Even out of memory conditions could be fast: offending task would just die in a matter of second, thanks to OOM killer, unlike minutes of heavy swapping if you're using swap.

                  Not to mention large disk buffers can make system to skyrocket in terms of performance. And unlike moronic cache memory management in ZFS, btrfs memory management is integrated with Linux kernel, so its possible to take almost all free RAM as disk cache without chance some large memory allocation would face lack of memory to complete it. Not a case with ZFS (to make things worse, ZFS tends to perform poorly without huge disk caches).

                  But if you need swap (ugh, you better do not), its wise to put it on fast drive and not to use FILES. Its better to use dedicated PARTITION (without usual file system at all). Because to get page, swap file have to be looked up about where to get required page. Then you do not just getting that page. Its rather translated into file operations and filesystem have to get idea how to obtain required data which turns out to be pages. This process is subject to fragmentation and/or extra work of filesystem layer. OTOH in swap partition there is less overhead, it can't fragment and there is no filesystem doing some extra work. So if you really need swap it can be wise to run it on dedicated partition of some fast drive.

                  P.S. as for btrfs itself it proven to be fairly usable with recent kernels, at least on "usual" usecases and actually rather fast, up do degree being hard to distinguish from ext4 when looking on system attitude with naked eye without resorting to looking on filesystem type. IMO its very promising thing.
                  Actually, I personally don't use any swap space at all. I was just warning other people.

                  Comment


                  • #39
                    the battle of the smug

                    Originally posted by arabek View Post
                    /dev/sda2 on / type btrfs (rw,noatime,ssd,space_cache)

                    Am i doin' it rite? </smuggest Gentoo user response>
                    echo "initrd=\EFI\arch\initramfs-arch.img rootfstype=btrfs root=UUID=9a3a076f-8172-4081-a92e-c00aa50a50dd security=tomoyo" | iconv -f ascii -t ucs2 | efibootmgr -c -g -d /dev/sda -p 1 -L "Arch-Nouveau " -l /EFI/arch/vmlinuz-arch.efi --append-binary-args -

                    /dev/sda3 on / type btrfs (rw,relatime,compress=zlib,ssd,space_cache)
                    /dev/sdb on /root type btrfs (rw,relatime,compress=zlib,ssd,space_cache)
                    /dev/sdb on /var/lib/docker type btrfs (rw,relatime,compress=zlib,ssd,space_cache)
                    /dev/sdb on /var/cache/pacman type btrfs (rw,relatime,compress=zlib,ssd,space_cache)
                    /dev/sdb on /home type btrfs (rw,relatime,compress=zlib,ssd,space_cache)

                    We can be pretty smug over here at arch as well.

                    Comment


                    • #40
                      Originally posted by xeekei View Post
                      I was sure it was going to be a full on flame war by now. ZFS does have plenty of die hard fans.
                      There is not much to flame about.

                      His argument against ZFS is that you can't ship it with distribution, but that doesn't stop NVidia modules.
                      Otherwise it works and only suffers from some memory problems on Linux, which are being worked on. Nothing as bad as some people claim.

                      Arguments for btrfs are that it is supported by Oracle (last time I checked not for their own database), license and that it mostly works if you use it for very basic scenarios (raid0,raid1), which is not very convincing at least for me.

                      In the end, if you want stable cow fs that won't eat your data suddenly, raidz (raid5,6) - you pick ZFS. If you are feeling lucky, want to play with fire and have backups - you pick btrfs.

                      Comment

                      Working...
                      X