FedoraForum.org - Fedora Support Forums and Community
Results 1 to 12 of 12
  1. #1
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,982

    xfs vs ext4 performance

    In the past, not liking lvm as a file system, I chose to implement Fedora using discrete partitions (standard) using ext4 as the format for each.

    But with some testing of Fedora, but with other than the live/network install version, and with SUSE's Tumbleweed Linux, I noted that
    root (/) was defaulted to xfs. RHEL 7.0, uses XFS as its default file system, so using xfs for / should give it some mileage.

    My own experience with using it for /home is no, avoid it, simply because recovery time after a power failure or crash takes a very long time. Also, it appeared to me that xfs likes some 10% to 15% free space in the partition.


    I researched more about xfs, and researched "ext4 vs xfs performance". I got back some interesting results. xfs has lower latency. That is, you can generally get better I/O performance with xfs than you can with ext4. For a desktop user, that speed improvement is imperceptible.
    File management overhead is quite good, and about the same as ext4.

    A detailed writeup about xfs is here A very interesting read.

    I have been using as the xfs file system for / without any problems for Fedora versions F26, F27, F28 beta, and Rawhide and for Tumbleweed. Both for Gnome and for KDE Plasma.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  2. #2
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    7,244

    Re: xfs vs ext4 performance

    ext4 takes 5% of free space for reserve by default too, that can be a huge waste on the terabyte+ disk
    you can reduce that with tune2fs -r <number of blocks> <partition name>

  3. #3
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,876

    Re: xfs vs ext4 performance

    moved to linux chat as it's not really a specific topic only relating to Fedora 28

  4. #4
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    272

    Re: xfs vs ext4 performance

    XFS data structures also seem to use less space than ext4. If you format a 4 TB hard drive with ext4 (with -m 0 for zero reserved space), it still uses about 30 GB just for ext4, if I recall. XFS uses much less. XFS is also very good with large files too.
    QuantumKnot - originator of the "Verne" release name (possibly the last 'normal' release name) :)

  5. #5
    Join Date
    Aug 2011
    Location
    ~
    Posts
    1,927

    Re: xfs vs ext4 performance

    For home use I advise btrfs. It gets some getting used to but after that it is rock solid and without noticeable performance issues (but you need to disable cow on databases and VMs otherwise performance tanks and you will probably also need an SSD for your rootfs, which you need anyway).

    I have seen too many xfs systems die after a hiccup. Home users do not need the additional performance and they tend not to make backups regularly. With btrfs you get snapshots, compression, flexibility and great integrity (just don't use raid 5/6). System hangs, loss of power, it simply doesn't matter, just hard reset when necessary and the system is back online immediately without any lengthy file system check being necessary (you do lose writes that were being performed at the time of the crash but the files will simply stay as they were before the commit).

    Really, xfs is a pain (no shrinking at all) whereas btrfs can be shrunk online! xfs is simply not meant for home use, it is for enterprise workloads where there are always backups and systems can be rebuild within the blink of an eye.

  6. #6
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,982

    Re: xfs vs ext4 performance

    Dutchy, Thank you for posting your experience using btrfs. I have a question "Would you put all partitions (/, /home, /var, / ), excluding /boot.swap onto btrfs?
    There are some files within ~/.local that must not be COW. In the past, I created a dynamic link to a non btrfs partition and put the critical files there.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  7. #7
    Join Date
    Aug 2011
    Location
    ~
    Posts
    1,927

    Re: xfs vs ext4 performance

    Yes, put everything on btrfs, use subvols for at least / and /home. Keep /boot on ext4 since red hat cannot be bothered to fix grubby. To turn off cow for directories and new files use chattr +C where strictly necessary (copy old files to new files to make them nocow). Don't manually defrag unnecessarily when using a lot snapshots. Obviously first get used to btrfs in a VM or on a disposable system.

  8. #8
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,982

    Re: xfs vs ext4 performance

    Dutchy,
    Once again, thank you. My old system is to slow and not enjoyable to use VM, even with 8 gigs ram. I took a different approach.

    I have 5 disks which I use to evaluate different Linux distributions. I have gnome on 2, kde Plasma on 2 (2SUSE and 2Fedora) and one disk reserved for play. SUSE knows about btrfs, as it puts everything onto sub-volumes. Fedora, not so.

    I discovered that with Fedora, ~/.local should be without COW since some files (at least a few therein are frequently accessed, even though they are not super critical. I will be mirroring .local to a tmpfs file system, and on shutdown, using rsync to restore them. FYI, within the .local, the *.desktop and ".dconf/user" files are most frequently accessed and should be on fast devices.
    .
    .
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  9. #9
    Join Date
    Aug 2011
    Location
    ~
    Posts
    1,927

    Re: xfs vs ext4 performance

    Quote Originally Posted by lsatenstein
    Dutchy,
    [...]
    I discovered that with Fedora, ~/.local should be without COW since some files (at least a few therein are frequently accessed, even though they are not super critical. I will be mirroring .local to a tmpfs file system, and on shutdown, using rsync to restore them. FYI, within the .local, the *.desktop and ".dconf/user" files are most frequently accessed and should be on fast devices.
    .
    .
    Right, that sounds like a great way to mess-up your system for no gain at all.

  10. #10
    Join Date
    Feb 2009
    Posts
    124

    Re: xfs vs ext4 performance

    What about reports that BTRFS is not ready for production and RedHat won't use it? I kind of value my data and don't want it disappear because of not a reliable file system. Maybe ZFS on Linux would be a better alternative?

  11. #11
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,876

    Re: xfs vs ext4 performance

    Quote Originally Posted by tankist02
    What about reports that BTRFS is not ready for production and RedHat won't use it? I kind of value my data and don't want it disappear because of not a reliable file system. Maybe ZFS on Linux would be a better alternative?
    entirely your choice of course. RH didn't ever officially use or recommend using btrfs, it was only ever included as a technology preview.

    I doubt ZFS is better than btrfs for the typical home user. see the inappropriately specified systems section of this wiki page for example, it's not something to rush into using without doing due diligence first:

    https://en.wikipedia.org/wiki/ZFS#In...cified_systems

  12. #12
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    4,982

    Re: xfs vs ext4 performance

    For what it is worth knowing, XFS has a large number or patches and some enhancements coming to the next kernel. Ditto for btrfs.
    xfs will have improved repair and a lazytime meta update (as does ext4). The lazytime feature is designed to keep atime information in core until a sync or shutdown. The incore atime will searched ahead of the disk registered atime.

    btrfs has many improvements, such as an "extended tree checker". (Btrfs is a bplus organized file system) and more.

    I did an experiment.
    200gig partition partitioned with xfs and a second one partitioned with ext4. xfs consumes 5 gig less diskspace than does ext4, using the default parameters (formats called via gparted)
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

Similar Threads

  1. Using an SSD Which to use XFS or EXT4
    By lsatenstein in forum Fedora Focus
    Replies: 37
    Last Post: 1st March 2016, 03:51 PM
  2. EXT4 on SSD
    By KKJensen in forum Using Fedora
    Replies: 18
    Last Post: 15th November 2010, 05:15 PM
  3. Ext4 and 32.1-9
    By SlowJet in forum Fedora 13 Development Branch
    Replies: 4
    Last Post: 15th December 2009, 01:33 PM
  4. ext4
    By Jongi in forum Fedora 12 Alpha, Beta & Release Candidates
    Replies: 3
    Last Post: 6th September 2009, 09:15 PM
  5. ext4 on fc7 ?
    By carlainz in forum Fedora Focus
    Replies: 4
    Last Post: 6th May 2007, 09:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •