Google Plus

Linux File System Test for USB Media

Written by Chris Jones on . Posted in Reviews, Software

So you got yourself a shiny new USB drive and are not too sure what file system to format it with. Sure, FAT is great for compatibility reasons with other operating systems, but there are better options for Linux users. Although the following choices may not be compatible with many other operating systems, if you’re only going to use it on Linux, then read ahead.

My tests will be performed on a system running Linux Mint Debian Edition and with an attached 160GB Seagate hard drive and a standard 4GB Toshiba USB drive. The file systems I’ll be testing out are all the most recent and updated packages available in the Debian ‘Testing’ repository. I’ll be checking out NILFS, Btrfs and Ext4. All tests will be performed in a console environment. No graphical file manages will be used. This is to ensure that minimal resources are used for other system processes other than the file copy process and will help get the most accurate results I can get.

Results I will be focusing on for this test will be Write times for the file copy process from hard drive to the USB drive. And then those same files will be copied off the USB drive and back to the hard drive. This will measure the Read times from the USB drive. In addition to Write/Read times, I will also post up the Average transfer speed range I witnessed during the copy phase of the test.

Enough said already, let the testing begin!

For my tests, I’ll be using a small range of different file types, slight size variations and directories. This will give a clear indication of how different files and directory types and sizes effect transfer times.

For my first test, I will be trying the new kid on the busy block of Linux file systems, NILFS. Before performing this test, I honestly had no clue as to how NILFS performance would stack up against the slightly more established file systems of Ext4 and even Btrfs.

NILFS Results (Write test – HDD > USB)

Single PDF file: 24.2 seconds

Single AVI file: 3 minutes 17 seconds

Directory of 20 MP3 files: 51.1 seconds

Directory of 20 ZIP archives: 7.7 seconds

1GB mixed directory of different file types: 3 minutes 52.2 seconds

NILFS Results (Read test – USB > HDD)

Single PDF file: 5.6 seconds

Single AVI file: 42.5 seconds

Directory of 20 MP3 files: 11.6 seconds

Directory of 20 ZIP archives: 1.8 seconds

1GB mixed directory of different file types: 49.2 seconds

NILFS overall average transfer time for Write test: 3.90MB/s – 4.20MB/s

NILFS overall average transfer time for Read test: 13.00MB/s – 18.90MB/s

Btrfs Results (Write test – HDD > USB)

Single PDF file: 5.3 seconds

Single AVI file: 2 minutes 16.6 seconds

Directory of 20 MP3 files: 26.8 seconds

Directory of 20 ZIP archives: 1.5 seconds

1GB mixed directory of different file types: 2 minutes 41.4 seconds

Btrfs Results (Read test – USB > HDD)

Single PDF file: 5.5 seconds

Single AVI file: 43.6 seconds

Directory of 20 MP3 files: 11.6 seconds

Directory of 20 ZIP archives: 1.9 seconds

1GB mixed directory of different file types: 48.4 seconds

Btrfs overall average transfer time for Write test: 4.90MB/s – 13.00MB/s

Btrfs overall average transfer time for Read test: 15.3MB/s – 18.30MB/s

Ext4 Results (Write test – HDD > USB)

Single PDF file: 4.0 seconds

Single AVI file: 2 minutes 17.6 seconds

Directory of 20 MP3 files: 28.3 seconds

Directory of 20 ZIP archives: 0.5 seconds

1GB mixed directory of different file types: 2 minutes 40 seconds

Ext4 Results (Read test – USB > HDD)

Single PDF file: 6.8 seconds

Single AVI file: 36 seconds

Directory of 20 MP3 files: 11.6 seconds

Directory of 20 ZIP archives: 1.9 seconds

1GB mixed directory of different file types: 48.5 seconds

Ext4 overall average transfer time for Write test: 5.10MB/s – 18.10MB/s

Ext4 overall average transfer time for Read test: 13.00MB/s – 25.00MB/s

Conclusion and Final Results

As indicated by the test results above, there really is not much difference between Btrfs and Ext4. In fact, the results are so close that I would declare neither file system a winner and it’s fair to say that they are both on par with one another.

What really stood out as a surprise was the difference between NILFS and the other two file systems. I wouldn’t say I am disappointed with the results of NILFS but I would guess that those numbers indicate the difference in attributes between the three file systems. It’s worth pointing out that Ext4 development at least had a head-start, built on the foundations of its predecessors Ext3 and Ext2. Whereas NILFS was designed and built from scratch. And Btrfs has been in development for many years and according to Wikipedia, is still declared as unstable. I find it rather amusing it is still classed as unstable and under development. Personally, I have been using Btrfs in various forms and iterations on various storage hardware for a long time and am yet to have any issues of data loss.

But it’s not all negative news for NILFS, despite the slow write times, NILFS showed that it was well capable of keeping up with the opposition when it comes to read times. And in just a couple of the tests, NILFS was able to edge out Ext4. But only by a very narrow margin. In a realistic world, between all three file systems tested, there was not much to differ.

Taking into account all of the above information, I would highly recommend that you choose a file system that you feel comfortable using. There is no single file system to suit all purposes for everyone. Hence why we have many different options to choose from. But I strongly advise that if it’s operating system (Linux, Unix, Windows and Mac OS) compatibility that you absolutely require, then you must stick to FAT. You’ll find no better option that ‘just works’ on almost any system that you plug in to.

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Chris Jones

Chris Jones is a Staff Writer and the Editor of Unixmen.com. He is a long time Linux user, tracing all the way back to SUSE Linux 8.0 from the early 2000's. Chris has worked for many different FOSS Projects and has founded many of his own in recent times, including several Linux distributions, programming languages and FOSS Licenses. chrisjones@unixmen.com
  • PePa

    I’m assuming you were using NILFS2. Apart from read and write speeds, isn’t the fact that it’s supposed to be better suited to flash memory a main selling point of NILFS2? (Assuming that by a “USB drive” you’re referring to a flash memory drive.)

    • Chrisjones

      Yes, NILFS2 was used. I am not too sure what market it is targeted towards. But if it is USB flash media, the numbers prove that it may not yet be ready for its target market.

  • http://opinadorcompulsivo.blogspot.com Miquel Mayol i Tur

    I do agree with you but …

    What I do not understand is why Android – except mods – do not read ext4 – and why they are paying MS for FAT support for uSD cards and USB stciks when they can use EXT4 as the default, even formatting the preformatted FAT uSD cards.

    I also do not understand why Multisystem or Multiboot use FAT instead of ext2 or ext4 for multiI LiveISO pendrives.

    Using FAT at USB pendrives and uSDs for watching videos at tablets and phones instead of ext4 seems for me a nonsense and also that there are not a ext4 driver for MS WOS – there are some progrmas that do teh trick – but as easy to make a FOSS driver for ext4 to be used at MS WOS to read / write ext4 disks, at least USB sticks and uSDs, and I am MS WOS free now 3 years long except one day to flash my Android tablet to 4 – no linux tool provided from vendor -

  • Stephan

    I use ext4 for all my external devices, except my active backup device, which is a ZFS-vault, receiving regular snapshots (ubuntu-zfs package, has PPA: really really interesting)

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

SK

|

I am working on it. Stay tuned. Thanks for the comment.

adriana rizzati

|

You are right, I saw them just now and they are awesome!

SK

|

Thanks for the comment Abdullah. Stay tuned with us always.

Abdullah Musazai

|

Thank you for such a great service you always do, hope you gain more power and more energy to work more & more

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .