Choosing The Best Linux Filesystem For Your PC

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

Choosing The Best Linux Filesystem For Your PC

Postby mmesantos1 on Fri Apr 16, 2010 9:10 pm

Here is a article that might be useful. :D

Image If you’re a Linux user, you’ve likely been asked at some point if you want Ext3, Ext4, XFS, ReiserFS, Btrfs, or one of many other filesystem acronyms. This choice confuses new and old users alike, and like all software, the options change as technology improves. Many people probably don’t care what filesystem they use as long as it’s stable and reasonably fast, but how do you know which one that is? This guide will attempt to cover the basic differences between the most common options, and provide the pros and cons of each choice.
Ext2

Ext2 is Linux’s “old standby” filesystem. It was the default for most of the major early Linux distributions. While it has been mostly supplanted by versions 3 and 4, ext2 is still popular on USB and other solid-state devices. This is because it does not have a journaling function, so it generally makes fewer reads and writes to the drive, effectively extending the life of the device.

Recommended Use: USB/Solid State Drives, or any cause where you need high stability with minimal reads/writes.
Ext3

The most notable difference between ext2 and ext3 was the introduction of journaling. In short, journaling filesystems are meant to recover more gracefully in the event of a system crash. Whenever you find yourself in doubt about which filesystem to use for Linux, ext3 is nearly always a good bet. It’s extremely mature, extremely well supported, and contains all the features you’re likely to need for a desktop OS.

Recommended Use: If you have no specific reason for another filesystem, ext3 is an excellent default.
Ext4

The most recent in the ext filesystem line, ext4 includes many major improvements over ext3 like larger filesystem support, faster checking, nanosecond timestamps, and verification of the journal through checksums. It’s backward and forward compatible with versions 2 and 3, so you can mount a ext2 or ext3 filesystem as ext4, and the other way around. You may however lose some of the benefits of the newer versions when mounting as the older. Many of the modern Linux distributions now offer ext4 during the install, and some are using it as the default.

Recommended Use: Ext4 should be stable enough for desktop and server needs. If your distribution offers it as an install choice, it should be a good choice for nearly any usage needs.
ReiserFS (Reiser3)

Before ext3, ReiserFS was the only journaling filesystem for Linux. It’s also notable for allowing live resizing of the filesystem. In some cases where many small files are involved, Reiserfs can outperform ext3 by a considerable margin. Reiser3 has problems, however when it comes to handling things like multicore PCs, as the design only allows for some operations to run one at a time.

Recommended Use: Interacting with small files on a single core system.
Reiser4

Reiser4 is intended to solve some of the problems with the Reiser3 implementation. Performance has improved, particularly with small files, and it includes support for plugins to handle things like compression and encryption. Reiser4 has a somewhat uncertain future. It has not yet been accepted into the main line Linux kernel, the lead designer is in prison, and the company developing it is not currently in business. Reiser4, if completed and fully polished, could be a fast and useful filesystem, but until it gains a foothold in the mainline kernel it may not be a good choice for long term use.

Recommended Use: Filesystem testing and development
XFS

XFS is packed full of cool features like guaranteed rate I/O, online resizing, built-in quota enforcement, and it can theoretically support filesystems up to 8 exabytes in size. It’s been used on Linux since about 2001, and is available as an install option on many popular Linux distributions. With variable block sizes, you can tune your system like a sliding scale to tweak for space efficiency or read performance.

Recommended Use: If you really like to tweak your system to meet your needs, XFS is a great way to go.
Btrfs

Btrfs is still in development, and may not yet be ready for production server use. That said, it has been included to some extent in the Linux kernel and is available as an install option in some distributions. Some of the interesting features include transparent compression, snapshots, cloning, and in-place conversion (with rollback) from ext3 and 4. According to the lead developer, Btrfs aims to “let Linux scale for the storage that will be available.” Btrfs, once completed and matured, will likely be a strong contender in the Linux filesystem world on both desktops and servers.

Recommended Use: Eventually, Btrfs should make for an excellent filesystem for servers and other high-bandwidth high-storage devices.
Image
User avatar
mmesantos1
Level 8
Level 8
 
Posts: 2280
Joined: Tue Jan 29, 2008 9:14 pm
Location: VA. USA

Linux Mint is funded by ads and donations.
 

Re: Choosing The Best Linux Filesystem For Your PC

Postby Txnca on Sat Apr 17, 2010 12:15 am

Very informative! Thanks!

Steve
Asus P5E MB/Intel C2D E8400@3Ghz/6GB Corsair Dominator DRAM/nVidia 8800GT 512MB
8xHDD 3.82TB
LG 22x DVD Burner
Logitec 5.1 Speakers/High Def Sound
Antec Tower/480w PSU
Samsung 22" LCD Monitor
APC 1300-XS UPS
User avatar
Txnca
Level 3
Level 3
 
Posts: 186
Joined: Thu Mar 18, 2010 9:30 am
Location: Ontario Canada VIA Texas

Re: Choosing The Best Linux Filesystem For Your PC

Postby mmesantos1 on Sat Apr 17, 2010 12:36 am

Txnca wrote:Very informative! Thanks!

Steve


Your welcome steve. :)
Image
User avatar
mmesantos1
Level 8
Level 8
 
Posts: 2280
Joined: Tue Jan 29, 2008 9:14 pm
Location: VA. USA

Re: Choosing The Best Linux Filesystem For Your PC

Postby xnostradamusx on Sun Apr 18, 2010 12:02 am

this was a question myself when i first installed my first linux distro and this post answered it thanks :D
~cheers~

xnostradamusx
User avatar
xnostradamusx
Level 3
Level 3
 
Posts: 169
Joined: Thu Jul 24, 2008 1:04 am
Location: qatar

Re: Choosing The Best Linux Filesystem For Your PC

Postby Joylove on Sun Apr 18, 2010 12:05 am

Nice guide.

Currently using ext2 as well for my USB flash based media & ext4 for hdd.

Had some chuckles over ReiserFS extra ability to "partition your wife"
:lol:
Joylove
Level 3
Level 3
 
Posts: 130
Joined: Wed Feb 10, 2010 12:33 pm

Re: Choosing The Best Linux Filesystem For Your PC

Postby Midnighter on Sun Apr 18, 2010 1:03 am

:D

I was going to post this the other night myself, but I could not for the ligfe of me get to the forum, kept failing to find it. Weird. Oh well, spread the knowledge. :D
User avatar
Midnighter
Level 6
Level 6
 
Posts: 1306
Joined: Tue May 22, 2007 1:52 pm
Location: Western Australia

Re: Choosing The Best Linux Filesystem For Your PC

Postby linuxviolin on Sun Apr 18, 2010 3:02 am

Not bad even if relatively "brief"... But you have made a material omission: the IBM's JFS! It's my preferred choice when I use a distro which support it, if not I go to XFS...
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
User avatar
linuxviolin
Level 8
Level 8
 
Posts: 2055
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Re: Choosing The Best Linux Filesystem For Your PC

Postby nono on Sun Apr 18, 2010 3:17 am

Helena has an option to use EXT4 during its install.
Is it better to use EXT4 than EXT3?
Reminder: If your problem is already solved or your topic is fullfilled, kindly put [SOLVED] on your topic title.
User avatar
nono
Level 3
Level 3
 
Posts: 160
Joined: Sat Jun 28, 2008 11:50 pm
Location: Philippines

Re: Choosing The Best Linux Filesystem For Your PC

Postby mmesantos1 on Sun Apr 18, 2010 3:58 am

xnostradamusx wrote:this was a question myself when i first installed my first linux distro and this post answered it thanks :D

Your welcome xnostradamusx. :)
Image
User avatar
mmesantos1
Level 8
Level 8
 
Posts: 2280
Joined: Tue Jan 29, 2008 9:14 pm
Location: VA. USA

Re: Choosing The Best Linux Filesystem For Your PC

Postby mmesantos1 on Sun Apr 18, 2010 3:59 am

Midnighter wrote::D

I was going to post this the other night myself, but I could not for the ligfe of me get to the forum, kept failing to find it. Weird. Oh well, spread the knowledge. :D


Ya I was unable to bring up the forum web page myself yesterday. Not sure what was going on.
Image
User avatar
mmesantos1
Level 8
Level 8
 
Posts: 2280
Joined: Tue Jan 29, 2008 9:14 pm
Location: VA. USA

Re: Choosing The Best Linux Filesystem For Your PC

Postby ibm450 on Sun Apr 18, 2010 4:23 am

im gonna try this XFS on next fresh install -- tweaking is fun
Image
Asus UL50VT laptop ~ LM10 - Unity 12.04 - Win 7
Image
User avatar
ibm450
Level 5
Level 5
 
Posts: 604
Joined: Sun Jan 11, 2009 6:56 am
Location: Kwinana, Western Australia

Re: Choosing The Best Linux Filesystem For Your PC

Postby FedoraRefugee on Sun Apr 18, 2010 6:31 am

nono wrote:Helena has an option to use EXT4 during its install.
Is it better to use EXT4 than EXT3?


The article does a good job of defining the differences.

But let me add my personal experience. I have used ext4 since it came out in beta without a single problem. It has been rock solid stable and feels just like ext3 to me. It is a file system, something you are not likely to even be aware of in your Linux usage. I think you will be perfectly safe using ext4 now and will not experience any problems at all.
FedoraRefugee
Level 6
Level 6
 
Posts: 1301
Joined: Fri Oct 03, 2008 11:25 am

Re: Choosing The Best Linux Filesystem For Your PC

Postby nono on Sun Apr 18, 2010 6:38 am

FedoraRefugee wrote:
nono wrote:Helena has an option to use EXT4 during its install.
Is it better to use EXT4 than EXT3?


The article does a good job of defining the differences.

But let me add my personal experience. I have used ext4 since it came out in beta without a single problem. It has been rock solid stable and feels just like ext3 to me. It is a file system, something you are not likely to even be aware of in your Linux usage. I think you will be perfectly safe using ext4 now and will not experience any problems at all.


Thank you for clarifying. Now I have no worries about using ext4.
Reminder: If your problem is already solved or your topic is fullfilled, kindly put [SOLVED] on your topic title.
User avatar
nono
Level 3
Level 3
 
Posts: 160
Joined: Sat Jun 28, 2008 11:50 pm
Location: Philippines

Re: Choosing The Best Linux Filesystem For Your PC

Postby eiver on Sun Apr 18, 2010 6:53 am

My system suffers from terrible fragmentation and there are no defragmentation tools for ext3/ext4. I am thinking about installing Mint on XFS. Anyone tried it yet? Any problems with Mint on XFS?
User avatar
eiver
Level 5
Level 5
 
Posts: 564
Joined: Fri Jan 23, 2009 5:51 am

Re: Choosing The Best Linux Filesystem For Your PC

Postby nono on Sun Apr 18, 2010 6:58 am

eiver wrote:My system suffers from terrible fragmentation and there are no defragmentation tools for ext3/ext4. I am thinking about installing Mint on XFS. Anyone tried it yet? Any problems with Mint on XFS?


That's a surprise, I am a newbie but I read that we shouldn't be worried about defragmentation on those filesystems because it is not a big issue on Linux.

Can someone please verify if I should be worried about defragmentation on Mint. I don't want to experience defragmentation like I used to when Windows was the only OS I use.
Reminder: If your problem is already solved or your topic is fullfilled, kindly put [SOLVED] on your topic title.
User avatar
nono
Level 3
Level 3
 
Posts: 160
Joined: Sat Jun 28, 2008 11:50 pm
Location: Philippines

Re: Choosing The Best Linux Filesystem For Your PC

Postby FedoraRefugee on Sun Apr 18, 2010 7:02 am

<shrugs> I have used Linux for over 10 years and have never had or heard of fragmentation being a problem. But...I am hardly an expert on the matter and without seeing what my ext3 and 4 partitions actually look like...Well, maybe they are fragmented all to hell and I simply do not realize it? But...Again, I doubt this and I have never had any problems concerning degradation of performance or corruption.
FedoraRefugee
Level 6
Level 6
 
Posts: 1301
Joined: Fri Oct 03, 2008 11:25 am

Re: Choosing The Best Linux Filesystem For Your PC

Postby mmesantos1 on Sun Apr 18, 2010 7:51 am

Online defragmentation

(This feature is being developed and will be included in future releases). While delayed allocation, extents and multiblock allocation help to reduce the fragmentation, with usage filesystems can still fragment. For example: You write three files in a directory and continually on the disk. Some day you need to update the file of the middle, but the updated file has grown a bit, so there's not enough room for it. You have no option but fragment the excess of data to another place of the disk, which will cause a seek, or allocate the updated file continually in another place, far from the other two files, resulting in seeks if an application needs to read all the files on a directory (say, a file manager doing thumbnails on a directory full of images). Besides, the filesystem can only care about certain types of fragmentation, it can't know, for example, that it must keep all the boot-related files contiguous, because it doesn't know which files are boot-related. To solve this issue, Ext4 will support online fragmentation, and there's a e4defrag tool which can defragment individual files or the whole filesystem.

Here is the link for the page this info is from: http://kernelnewbies.org/Ext4
Image
User avatar
mmesantos1
Level 8
Level 8
 
Posts: 2280
Joined: Tue Jan 29, 2008 9:14 pm
Location: VA. USA

Re: Choosing The Best Linux Filesystem For Your PC

Postby Midnighter on Sun Apr 18, 2010 10:37 am

Fragmentation CAN occur if you are constantly writing and deleting files from a system, but unlike windows (for example), when writing a file, it groups everything tiogether sequentially, looking for a spot large enough to place the entire file, and write it together, unlike windows, which tends to write the file wherever there is room, even if it is in 30 different spots, breaking it up. Recently did an XP reinstall for my housemate, and after install and adding drivers, drive was about 30% fragmented. This was a fresh install. Ridiculous.

If your drive is badly fragmented, it will be because a lot of stuff has been writen and delete, and things constantly changed. Best bet its to move the contents to another drive temporarily, freeing up the drive, then copy them back over again, and it will place everything properly, smoothing out any fragmentation you had previously.
User avatar
Midnighter
Level 6
Level 6
 
Posts: 1306
Joined: Tue May 22, 2007 1:52 pm
Location: Western Australia

Re: Choosing The Best Linux Filesystem For Your PC

Postby linuxviolin on Sun Apr 18, 2010 10:58 am

All file systems will degrade in performance over time due to file fragmentation. Periodic defragmentation of the file system to boost its performance is a possible optimization like using the deadline I/O scheduler, utilizing an external journal or attaching the noatime attribute to the file system in /etc/fstab
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
User avatar
linuxviolin
Level 8
Level 8
 
Posts: 2055
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Re: Choosing The Best Linux Filesystem For Your PC

Postby eiver on Sun Apr 18, 2010 12:28 pm

nono wrote:That's a surprise, I am a newbie but I read that we shouldn't be worried about defragmentation on those filesystems because it is not a big issue on Linux.

Can someone please verify if I should be worried about defragmentation on Mint. I don't want to experience defragmentation like I used to when Windows was the only OS I use.

You should not be worried. Fragmentation results in loss of performance, but it comes slowly. If you don't notice anything, then you shouldn't worry.

I am quite a newbie too, as far as file systems are concerned. I also read all the google stuff, that ext3 is supposed to be very resistant to fragmentation but my case says otherwise: (http://forums.linuxmint.com/viewtopic.php?f=47&t=45451&p=261539#p261539)

Logic also says otherwise:
Fragmentation receipt
- On a 8 MB partition write 8 files each 1 MB
- ABCDEFGH - 0 MB free
- Delete files A, C, E, G
- _B_D_F_H - 4 MB free
- Write a 4 MB file called X
- XBXDXFXH - 0 MB free
- Delete files B, D, F, H
- X_X_X_X_ - 4MB free
- Write a 4 MB file called Y
- XYXYXYXY - 0 MB free, 2 files, each 4 fragments

Correct me if I am wrong, but every single FS on both windows and linux will work just like the example above.

Regarding NTFS. My experience is that even if I have a 50 GB of free continuous space and I want to write a 2 GB file - the system will fragment it anyway (i think this is because it doesn't want to overwrite blocks occupied by previously deleted files to increase the chance, they could be undeleted).

I really need a linux FS with defragmentation support and it must be stable (not in active development). I read a lot about different FSs and it seems that XFS should be the best choice, but I'd love to hear your opinions.
User avatar
eiver
Level 5
Level 5
 
Posts: 564
Joined: Fri Jan 23, 2009 5:51 am

Linux Mint is funded by ads and donations.
 
Next

Return to Installation & Boot

Who is online

Users browsing this forum: Gkri, Laugh2, Yahoo [Bot] and 16 guests