Ubuntu Linux, Day 16: EXT4 vs. NTFS

By Tony Bradley, PCWorld

The default file system in Windows is NTFS, and the default file system in Ubuntu Linux is EXT4. The purpose of today's 30 Days With Ubuntu Linux post is to try and understand what the difference is, and whether or not you should care.

Ubuntu Linux

The 30 days series

Day 1: Getting Started

Day 2: That was really easy

Day 15: Cloud syncing and streaming with Ubuntu One

Early on in the 30 Days With Ubuntu Linux series, there were some comments that took issue with the fact that I had installed Ubuntu over Windows using Wubi.exe. One of the primary reasons behind that complaint is that in doing so I was running Ubuntu from a drive formatted using NTFS rather than one using EXT4.

What's the big deal? Well, theoretically, an EXT4 drive performs better than an NTFS drive, and the commenters were concerned that I would judge any sub-par performance as an issue with Ubuntu rather than recognizing it as a function of the drive format.

There is a very complex and detailed comparison of the various file formats -- including NTFS and EXT4 -- on Wikipedia if you are so inclined. In a nutshell, EXT4 allows characters in file names that aren't allowed in NTFS, such as '?', ':', '*'. Of course, being able to name a file "EXT4: Why Does It Perform Better?" doesn't actually make EXT4 perform better.

EXT4 can support individual files up to 16 terabytes, and volumes up to one exabyte in size. But, one of the aspects of EXT4 which contributes to better performance is that EXT4 can handle larger extents -- a range of contiguous physical blocks of data. This allows it to work better with large files and reduce drive fragmentation.

Other factors include the allocate-on-flush technique used by EXT4. By delaying allocation of data blocks until the data is ready to be written to disk, EXT4 improves performance and reduces fragmentation compared to file systems that allocate blocks earlier.

Using checksums for drive journaling improves reliability and improves performance by avoiding waiting on the disk during the journaling process. When it comes to file checking, EXT4 is quicker because unallocated blocks of data are marked as such and are simply skipped during disk check operations.

All that being said, I can't say I really notice any significant difference. Ubuntu Linux performed about the same running on NTFS using Wubi.exe as it does booting natively in EXT4. Much of the performance difference is purely theoretical, and your real-world mileage will vary depending on your hardware, how you configure the block size for your drive, and your data.

Linux can read both NTFS and EXT4 partitions -- which is why I am able to open music files straight from my folder on my Windows drive, or save files like this document to my normal Documents folder in Windows without having to reboot or use external thumb drives.

I will end with a semi-related side note. EXT4 may have some performance advantages over NTFS, but watch out for the default ODT file format used in LibreOffice. An ODT file is about 500 percent larger than its DOCX equivalent. I just saved this file in both formats. The ODT is 28.7KB, while the DOCX is only 5.9KB.

With drives in the hundreds of megabytes, or even terabytes, it may seem trivial to even care about a few KB here or there. But, for an organization with thousands upon thousands of files, those KBs will add up, and no organization wants to have to purchase or maintain five times more storage capacity for the exact same data.

You can follow Tony on his Facebook page, or contact him by email at tony_bradley@pcworld.com. He also tweets as @TheTonyBradley.

Reprinted with permission from PCWorld.com. Story copyright 2011 PC World Communications. All rights reserved.

Computerworld's IT Salary Survey 2017 results
Shop Tech Products at Amazon