xfs or ext4 for Laptop

General support questions
Post Reply
1885
Posts: 139
Joined: 2014/10/25 13:33:03

xfs or ext4 for Laptop

Post by 1885 » 2015/02/14 13:44:12

Question?
What is the advantage of xfs over ext4 and ext3 on a laptop (Lenovo y50 16GB ram)?

thanks

The long story
I've been using ext3 and ext4 for years on Gentoo computers. I used to use Redhat 7 to 9 then Fedora distros and kept using ext4 and ext3 because I had my head buried in my sandbox.

The default file system for Centos is xfs and I originally had that installed on a Laptop (Lenovo Y50) and it ran fine until I made the mistake of installing Virtual Box instead of sticking with Box and that really messed with my system. Furthermore I experimented with OpenStack on my laptop and really messed up my network manager. I re-installed Centos on my laptop, duel booting with Window 8.1 and it is running like a champ.
I might re-install again and switch to xfs just to see what happens.

User avatar
WhatsHisName
Posts: 1549
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: xfs or ext4 for Laptop

Post by WhatsHisName » 2015/02/14 17:03:00

Short Answer:

I use EL7 ext4 in most cases because you can shrink ext4 Logical Volumes in-place, whereas xfs LVs cannot be shrunken. For large or potentially large storage arrays, xfs is the way to go. I don't see a strong argument for NOT using ext4 on a typical desktop/laptop/workstation.

Longer Answer:

For why RedHat selected xfs over ext4 as the default in RHEL 7, you would need to ask them. :-) Both work on EL7 OK.

There is a nice RedHat document about this: What are the file and file system size limitations for Red Hat Enterprise Linux?

One big issue with ext4 is that supplied userland tools do not support ext4 filesystems larger than 16TB, even though ext4 itself does. 500TB is the current EL7 xfs limit.

Although some users claim better performance of xfs over ext4, I think they are, in general, in the same ballpark. Your specific needs (i.e., file size, number of files, etc.) may dictate one over the other and direct testing is the best way to determine which is right for your needs. Your Mileage May Vary. If the question was ext3 vs xfs, then xfs would win hands down.

One complaint I have read is that you may need a lot of memory to recover an xfs filesystem following corruption that say, for example, might occur on a crashed hardware raid without battery backup.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: xfs or ext4 for Laptop

Post by aks » 2015/02/14 19:21:22

I'd recommend XFS for very large data sets like large relational databases. With storage, there's a whole bunch of stuff to consider. How blocks are laid out on disk (for rotational disks - not SSDs - so as to minimize head seek for example), How much allocation there is for a file and the boundaries of the file (i.e.: does the disk need to read (say) 10 or 11 physical sectors for the data). Alignment (very important on virtual systems - google for it), and so on and so on. The best filesystem for your work load is the best filesystem for your particular workload. You'd need to benchmark them to make a comparison for your particular workload.
No simple easy answer. Sorry.

1885
Posts: 139
Joined: 2014/10/25 13:33:03

Re: xfs or ext4 for Laptop

Post by 1885 » 2015/02/15 14:02:31

Thank you for the advice. I'm looking at 1TB hard drives on a laptop. ext4 will be fine.
I just thought there might be an advantage to xfs.

I do have a Dell R410 that we have a raid controller we are trying to set up as a web server that we can not see the hard drives with any of the Centos 7 installed. At this point I don't know what I am doing.
We have it set at RAID5 now. 4x600GM to 1.7TB.

If we can format see the hard drives ext4 should be fine.

Thank You

lsatenstein
Posts: 23
Joined: 2011/12/22 16:34:18
Contact:

Re: xfs or ext4 for Laptop

Post by lsatenstein » 2016/06/12 15:24:06

I took a 300gig partition and formatted it ext4. I looked at the amount of meta data (control information) and took note of the amount.
I reformatted that 300gig partition for xfs. I looked at the amount of meta data (control information) and took note of the amount.

XFS wins by a few gig.

I have some partitions with ext4 and some with xfs. I have not had any crashes or need for recovery issues with either. I understand that xfs is trivially more performing.

My environment is not taxed at 99%. My system runs at about 60%. Therefore, I have decided to fully remain with xfs.

In two years time, or if there are significant changes to file systems, I will do a review and decide then.

For my laptop, I will install an SSD drive when my diskdrive fails or when I need more performance.
--------------------------------------------
Regards

Leslie Satenstein

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: xfs or ext4 for Laptop

Post by TrevorH » 2016/06/12 16:09:04

You can adjust some of the ext4 configuration using tune2fs - for example, ext4 sets aside 5% of the space on the filesystem for the root user and on large filesystems that's too much. If you adjusted that to 1% on a 300GB filesystem then you'd still have 3GB free when it reached 100% for normal users and gain an extra 12GB back for use.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: xfs or ext4 for Laptop

Post by hunter86_bg » 2016/06/13 06:40:04

By the way it is not bad to mention that for ext3 and ext4 there is

Code: Select all

extundelete
tool for recovery accidental deletion. I don't know of any for xfs :)

jimbo45
Posts: 31
Joined: 2016/01/09 11:18:23

Re: xfs or ext4 for Laptop

Post by jimbo45 » 2016/06/16 08:12:19

Hi there

For EXTERNAL HDD's (I have several > 2 TB) I'd use XFS. I use these HDD's primarily as multi-media (zillions of Music files / tracks plus a load of movies and TV series). Not a problem with XFS and these HDD's are regularly swapped between different servers

For huge nrs of files xfs is definitely the winner. I prefer it anyway as I don't like "mixed file systems" - however ext4 culd be useful if you need to resize volumes etc and is probably more compatible with other systems.

Incidently even if you don't use LVM (I do) still install SSM as it gives a good concise account as to what's mounted on the system clearly for example :

[root@gylfi jim]# ssm list
--------------------------------------------------------------------
Device Free Used Total Pool Mount point
--------------------------------------------------------------------
/dev/sda 0.00 KB 4.55 TB 4.55 TB vg3
/dev/sdb 0.00 KB 4.55 TB 4.55 TB vg3
/dev/sdc 0.00 KB 3.64 TB 3.64 TB vg2
/dev/sdd 1.82 TB /mnt/Temp
/dev/sde 0.00 KB 3.64 TB 3.64 TB vg2
/dev/sdf 232.89 GB
/dev/sdf1 500.00 MB /boot
/dev/sdf2 64.00 MB 232.33 GB 232.40 GB centos_gylfi
--------------------------------------------------------------------
-----------------------------------------------------------
Pool Type Devices Free Used Total
-----------------------------------------------------------
centos_gylfi lvm 1 64.00 MB 232.33 GB 232.39 GB
vg2 lvm 2 0.00 KB 7.28 TB 7.28 TB
vg3 lvm 2 0.00 KB 9.10 TB 9.10 TB
-----------------------------------------------------------
-------------------------------------------------------------------------------------------------
Volume Pool Volume size FS FS size Free Type Mount point
-------------------------------------------------------------------------------------------------
/dev/centos_gylfi/root centos_gylfi 50.00 GB xfs 49.98 GB 41.06 GB linear /
/dev/centos_gylfi/swap centos_gylfi 7.81 GB linear
/dev/vg2/lv2 vg2 7.28 TB xfs 7.28 TB 5.82 TB linear /mnt/DV2
/dev/vg3/lv3 vg3 9.10 TB xfs 9.09 TB 5.45 TB linear /mnt/DV3
/dev/centos_gylfi/home centos_gylfi 174.52 GB xfs 174.43 GB 148.74 GB linear /home
/dev/sdd 1.82 TB xfs 1.82 TB 1.82 TB /mnt/Temp
/dev/sdf1 500.00 MB xfs 496.67 MB 290.32 MB /boot
-------------------------------------------------------------------------------------------------


Cheers
jimbo

Post Reply