Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Btrfs, xfs or ext4 for a storage VPS?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Btrfs, xfs or ext4 for a storage VPS?

Good day ladies and gentlemen. I have a 4TB storage VPS. I found out that btrfs is faster than ext4 at 4k and 64k blocks. That makes me think that it's a good idea of switching from ext4 to btrfs BUT... I read a lot of negative comments about btrfs...it's not stable, it's not a good idea to have your data on such unstable FS. Some people write that they've been using btrfs 3-5 years and have not problem with it. What do the LET community think? Maybe there might be a compromise? I mean choose btrfs for /, xfs or ext4 for /home? I'm planning to install Plex and Nextcloud on my storage VPS. Plex is just movies, but Nextcloud is for my important data. What do you advise? If I had a HYBRID KVM VPS, I would hardly ask such a question, but when you use only HDD and the system on it, the better 4k speed is more suitable I suppose. I would also like to hear your bad or good experience with btrfs. Thank you.

Comments

  • raindog308raindog308 Administrator, Veteran

    I've read multiple times that XFS is not a good choice if you're dealing with many small files.

    @Broscience said: Nextcloud is for my important data

    Even if Knuth, Torvalds, Thompson, Ritchie, and Bill Joy sit down with you and personally design the perfect filesystem, run it by Theo for security, and then have it blessed by the Pope while he's in direct communion with God, I would still keep a strong backup regimen for anything important.

  • There is a chance (albeit small) that btrfs will explode in your face, but it does offer some nice features. So if you really really need its features, then use btrfs, otherwise stay with ext4.

    Basically, don't do it just for Internet coolness.

  • @raindog308 said: I would still keep a strong backup regimen for anything important.

    @ninja1337 said: Basically, don't do it just for Internet coolness.

    Amen

    Thanked by 1Broscience
  • I'm using it so that I can run monthly scrubs using the built in tools. Most of the issues I read about revolved around using it like zfs across physical drives to create larger volumes. That's not an issue on a single volume VPS. My storage VPS is a backup of my home NAS (which is 3x ext4 volumes) so if btrfs blows up I don't really care.

    Thanked by 1Broscience
  • On a VPS, I doubt the FS matters nearly as much as the underlying storage system and write cache powerloss protection on the host node.

  • Daniel15Daniel15 Veteran
    edited December 2020

    btrfs is pretty stable these days. Facebook uses it in production. The zstd compression works very well with minimal overhead if you have a lot of highly-compressible data, like source code. I use it on my development servers with large amounts of source code and it reduced disk usage by more than 50% with barely any impact to CPU usage.

    I did have an issue with a btrfs partition getting corrupted on one of my VPSes, but that was mainly due to some issues with the provider (an ext4 partition with the same provider also got corrupted due to the same issue)

    If you don't need any of the features that btrfs offers (eg if most of your data is video files, and you won't use the subvolumes functionality for something like Docker or LXC/LXD, instead of overlayfs), then I'd go with ext4 given its stability. I agree with @vimalware that the underlying storage used on the node makes the most difference on a VPS.

  • I want too love btrfs i really really do i love its features and its linux support but on 2 separate occasions it has failed me also Recently found out that btrfs and virtualmin dont get along (something about quota groups) install script bricks the OS install everytime.

    So far ZFS for my bare-metal local disks and XFS for my VPS's (although XFS is still kinda meh imo)

    Thanked by 2lowendboi Broscience
  • darkimmortaldarkimmortal Member
    edited December 2020

    Btrfs is stable and battle tested now. It's a shame it went through a period that earned it a bad reputation. It is my #1 choice on all my systems for data I care about, and has saved me from countless bitrot via UREs as well as catching one instance of bad RAM (where other filesystems appeared rock solid). I think that anyone having issues with it in the past couple of years or so has hardware problems

  • SplitIceSplitIce Member, Host Rep

    Unless you have reason to why go with anything other than the well tested default ext4?

    Don't get me wrong I've used both btrfs (compression) and xfs (specific database workloads) in specific applications where there was a design constraint or performance gain to be had. But for your average application it is not going to make one iota of difference.

  • BroscienceBroscience Member
    edited December 2020

    Guys, the main reason why I want to use btrfs is way better speed in/at/on 4k block size. When I use ext4 the 4k speed is 5-7 MB/s. When use btrfs it's 35-40 MB/s. As far as I know, the 4k block size is important for such webgui, it makes it faster to open sites (for ex. my nextcloud site). Thats why people prefer SSD, cause when your site is on SSD, then it opens your sites faster. The rest of the features of btrfs aren't important for me.

    So in that case maybe
    / - btrfs
    /home ext4
    What do you think?

  • I would also like to give a try ZFS, but as far as I know I can't because I have only 1 disk and it's easy to try for example on home server with more than 1 disk, but how to try it on VPS... that's a question.

  • @Broscience said:
    Guys, the main reason why I want to use btrfs is way better speed in/at/on 4k block size. When I use ext4 the 4k speed is 5-7 MB/s. When use btrfs it's 35-40 MB/s. As far as I know, the 4k block size is important for such webgui, it makes it faster to open sites (for ex. my nextcloud site). Thats why people prefer SSD, cause when your site is on SSD, then it opens your sites faster. The rest of the features of btrfs aren't important for me.

    So in that case maybe
    / - btrfs
    /home ext4
    What do you think?

    As much as I am a fan of btrfs, do not use it for this reason. It is rarely faster than other filesystems. Sounds like it is fooling the benchmark

    Thanked by 1Chronic
  • @darkimmortal said: It is rarely faster than other filesystems.

    It can be faster in very specific scenarios. For example, if your disk is slow and your data is highly compressable, the built-in compression will likely speed things up since there's fewer reads from disk. Otherwise I agree with you though.

    Thanked by 1darkimmortal
  • ChronicChronic Member
    edited December 2020

    Don't use btrfs. It's amazing, I use it almost everywhere. But you? Don't use it. You don't actually want any of its features, you just think it's going to automagically give you better performance. It won't, forget it. It's just going to cause you headaches. Use ext4, set and forget.

    Thanked by 2maverickp rm_
  • RedSoxRedSox Member
    edited December 2020

    Noticed that btrfs I/O is WAY faster when working with 4k and 64k but worse with 512kb and 1m. I used YABS. It can be fake numbers, because sources say btrfs and ext4 have almost the same speed.

  • rm_rm_ IPv6 Advocate, Veteran

    Performance is not the strong point of Btrfs, but snapshots are. You can have for example a month-long trail of how your stored content looked like, with instant access to any of its past states. Deleted or incorrectly modified a file? No problem, just fetch it from an older snapshot. And this is next to free both in storage requirements and in performance (as long as not creating too many of them).

    Thanked by 1Daniel15
Sign In or Register to comment.