Announcement

Collapse
No announcement yet.

Anyone using BTRFS for / and /boot?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anyone using BTRFS for / and /boot?

    My little HP Mini has a 60 GB SSD. I noticed that Oneiric's installer now allows booting from BTRFS so I formatted a single / partition as BTRFS and allowed /boot to reside there rather than on a separate EXT4. The install went fine. But wow, boot time is slooooow. Here are two consecutive lines from my dmesg:

    Code:
    [  9.404716] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
    [  37.728456] device fsid 66e393f6-0416-4837-bb66-6d1b6775eb89 devid 1 transid 36031 /dev/sda1
    Every single boot I can see that fsck runs, I'm guessing that's what's happening during the 28 second delay there. I don't see any errors on the screen, though, which seems odd. I'm thinking I should go back to good old EXT4...

    #2
    Re: Anyone using BTRFS for / and /boot?

    I did not know that the fsck tool for btrfs was available yet -- that's great if true.

    But most, if not all the advantages of btrfs, over ext4, are in the realm of multi-hdd arrays. I can't think of any advantage on a 60 GB SSD. On my little collection of SSDs, I use ext4, with a "commit=120" mount option, and with settings in /etc/sysctl.conf to slow down the journal activity, and with /tmp and the logs mounted as tmpfs. You can find reasonable arguments that these "life extending" measures are not necessary with million-cycle erase specifications, but I have never worn out an SSD so I'm happy with my methods. Here's a 40 GB OCZ Vertex 2 that is a year old and has been used pretty much daily:

    Code:
    don@tosh205:~$ cat /etc/fstab
    UUID=42e0cce2-17f9-4452-ab24-f40d79e18ebc   /          ext4    defaults,noatime,errors=remount-ro,barrier=0,discard,commit=120 0 1
    UUID=64097124-3a9a-45e1-a051-d470805bab1d   none         swap    sw 0 0
    UUID=57281ba2-b8a0-4c5c-ae4f-a1048408752c   /home        ext4    defaults,noatime,errors=remount-ro,barrier=0,discard,commit=120 0 2
    none                     /tmp         tmpfs   defaults,noatime,mode=1777 0 0
    none                     /var/tmp       tmpfs   defaults,noatime 0 0
    none                     /var/log       tmpfs   defaults,noatime 0 0
    none                     /var/spool      tmpfs   defaults,noatime 0 0
    Code:
    don@tosh205:~$ cat /etc/sysctl.conf
    #
    # /etc/sysctl.conf - Configuration file for setting system variables
    # blah
    #blah
    #blah
    # Log Martian Packets
    #net.ipv4.conf.all.log_martians = 1
    #
    vm.swappiness=1
    vm.vfs_cache_pressure=25
    vm.dirty_writeback_centisecs = 12000
    vm.dirty_expire_centisecs = 12000
    vm.dirty_ratio = 10
    vm.dirty_background_ratio = 2

    Comment


      #3
      Re: Anyone using BTRFS for / and /boot?

      Originally posted by dibl
      On my little collection of SSDs, I use ext4, with a "commit=120" mount option, and with settings in /etc/sysctl.conf to slow down the journal activity, and with /tmp and the logs mounted as tmpfs. You can find reasonable arguments that these "life extending" measures are not necessary with million-cycle erase specifications, but I have never worn out an SSD so I'm happy with my methods.
      I've placed /tmp and /var/tmp on tmpfs, but not /var/log and /var/spool, as you've done. You don't mind losing your logs every time you reboot? I've found having logs that survive boots to be useful. I hadn't previously encountered the advice about using tmpfs for /var/spool -- that one seems logical, since (if I understand correctly) there's nothing of long-term value in that location.

      My main laptop, the Lenovo running Kubuntu, has a 160 GB SSD formatted EXT4. I run with noatime, like you do. I see you're using barrier=0 -- I find myself wavering on the various EXT4 performance enhancement suggestions. SSD is plenty fast, so I haven't felt the need to fiddle with settings for writeback, barriers, journaling, etc. Do you notice much of a performance difference on your PC? Have you experienced any data loss issues while running without barriers?

      Comment


        #4
        Re: Anyone using BTRFS for / and /boot?

        I'm using btrfs for / but not /boot. I set my system up before you could do boot to btrfs.

        My boot times are definitely slower than before, but I rarely reboot - current uptime 8d 3h.

        Please Read Me

        Comment


          #5
          Re: Anyone using BTRFS for / and /boot?

          For each of my 3 computers that uses an SSD, I did not initially mount the log files as tmpfs, as I didn't know how stable everything would be. So I did the other configuration things, setting up the software packages, browsers, etc. etc. and watched for performance issues. After a few weeks, when I was satisfied that it was booting and running well, I went ahead and modified /etc/fstab to mount the logs as tmpfs. Two of the 3 are netbooks, so it's not as though mission-critical data are involved with those. But, they boot fast and play nice with their wireless set to "roaming". The EeePC has been running Debian with XFCE desktop on its 4GB SSD for going on 3 years now, but it doesn't get heavy use, to be honest. This Toshiba NB205 came with a 160GB hard drive in it, in 2009, and I swapped in the OCZ Vertex 2 last summer, so it's been running for 1 year, getting daily use, also with Debian. I made the root partition only 4.5GB, so with KDE I have to be careful with updates -- I cannot install more than 2 kernels before I run out of filesystem space and crash it.

          The third SSD is a PCI card -- OCZ RevoDrive 120GB in 2 physical "drives". The BIOS on my Asus motherboard refuses to see it as bootable, so I ended up putting a cheapo Kingston 16GB SSD in it just for /boot, and that is working out fine, with the root filesystem on one of the Revodrive partitions. That is my main desktop system, and gets its power from a UPS, so I think the risk is tolerable, using the 120-second commit cycle with ext4. All my data are on a separate 2-disk btrfs filesystem (and backed up when it changes), so if the root filesystem happens to crash it will not disturb my data. But that has not happened since I set it up last November.

          Comment

          Working...
          X