A Logo

Feel free to include my content in your page via my
RSS feed

Help Irongeek.com pay for
bandwidth and research equipment:

Subscribestar or Patreon

Search Irongeek.com:

Affiliates:
Irongeek Button
Social-engineer-training Button

Help Irongeek.com pay for bandwidth and research equipment:

paypalpixle




File Systems and Thumb Drives: Choosing between FAT16, FAT32 and NTFS to get a faster USB Flash Drive

File Systems and thumb drives:
Choosing between FAT16, FAT32 and NTFS to get a faster USB Flash Drive

        I use USB flash drives (also know as thumb drives and UFDs) often and was wondering how to squeeze the most performance out of them. I noticed most came formatted FAT16 (just called FAT when you use format from Windows XP's GUI) and was wondering what kind of performance boost I might get from formatting the flash media as FAT32 or NTFS. This article will list my data an conclusions about the experiment. I'd like to hear other's experiences and add them to this page, so please email me if you perform your own tests. Before you can repeat my tests you will have to be able to format you thumb drive as NTFS, and option that is not enabled by default in Windows XP. There are two ways you can format a flash drive as NTFS in XP, the first is to pull up the UFD's device properties and set it to be optimized for best performance, then you can just right click on the drive in Explorer, choose format, and NTFS will be an option.

 The other way is to use HP's handy thumb drive formatting utility. Just Google up SP27213.exe or use my mirror. Once you can format your flash drive as NTFS you can repeat my experiments.

        The tool I used for benchmarking the write speed of my UDFs was Node Soft's Disk Bench, available from:

http://nodesoft.com/DiskBench/Default.aspx

With it I tested the speed of writing a 10MB file to three examples of NAND-type flash memory, a 512MB of unknown make, an Apacer 1GB UFD and a 1GB SD card. I performed the tests three times for each file system. Here are my results:

Test 1
Media Fat 16
1st
Fat 16
2nd
Fat 16
3rd
Fat 32
1st
Fat 32
2nd
Fat 32
3rd
NTFS
1st
NTFS
2nd
NTFS
3rd
512MB UFD 1.641 MB/s  1.628 MB/s 1.620 MB/s 0.174 MB/s 0.177 MB/s 0.176 MB/s 322.581 MB/s 322.581 MB/s 322.581 MB/s
1GB UFD  0.300 MB/s  0.300 MB/s  0.301 MB/s  0.217 MB/s 0.214 MB/s 0.215 MB/s 322.581 MB/s 322.581 MB/s 322.581 MB/s
1GB SD 0.321 MB/s 0.307 MB/s 0.319 MB/s 0.069 MB/s 0.069 MB/s 0.069 MB/s 128.205 MB/s 128.205 MB/s 128.205 MB/s

My first conclusion is that NTFS was so much faster that something must be wrong with the experiment. I imagine it has to do with Windows using a delayed write and RAM cache when the drive it's about to write to is formatted NTFS, and an immediate write directly to the device when it's formatted FAT or FAT32.  To test further, I tried copying a large Quick Time file to the 512MB UFD (iron_man-tlr1_h1080p.mov, 196 MB) and timed it:

Test 2
Media Fat 16
1st
Fat 16
2nd
Fat 16
3rd
Fat 32
1st
Fat 32
2nd
Fat 32
3rd
NTFS
1st
NTFS
2nd
NTFS
3rd
512MB UFD 15.658 MB/s  15.716 MB/s 15.735 MB/s 15.638 MB/s 15.735 MB/s 15.658 MB/s 16.284 MB/s 15.996 MB/s 15.716 MB/s

Conclusion of tests 1 and 2: As you can see, all of the results are much more comparable when I copied over one large file. However, I remembered that I had performed some previous tests and had posted them to BinFev:

http://www.binrev.com/forums/index.php?showtopic=27622

        The previous tests had tested both the read and write capabilities of the thumb drives. I used a tool from http://oette.info/ for benchmarking different files systems on a 512MB thumb drive. I set it to write five 1 MB files and did two trials. Here are the results:
 

Test 3    
Fat16 default allocation unit size
Result:
Write time: 3.3108 Sec.
0.302041802585478 MB/s

Read time: 0.0862 Sec.
11.6009280742459 MB/s

Result:
Write time: 3.3208 Sec.
0.301132257287401 MB/s

Read time: 0.0762 Sec.
13.1233595800525 MB/s
Fat32 default allocation unit size
Result:
Write time: 23.81 Sec.
4.19991600167997E-02 MB/s

Read time: 0.08 Sec.
12.5 MB/s

Result:
Write time: 23.7444 Sec.
4.21151934771988E-02 MB/s

Read time: 0.1202 Sec.
8.31946755407654 MB/s
NTFS default allocation unit size
Result:
Write time: 0.8712 Sec.
1.14784205693297 MB/s

Read time: 0.0682 Sec.
14.6627565982405 MB/s

Result:
Write time: 0.9174 Sec.
1.09003706126008 MB/s

Read time: 0.0882 Sec.
11.3378684807256 MB/s

Conclusion of test: To cut to the chase, NTFS seems to be the fastest to write, FAT16  next and FAT32 was dog ass slow. FAT16 had the fastest read time, followed by NTFS and then FAT32.

I did some more test, this time with my 1GB Apacer UFD. I wanted a more realistic test of real life use, so  I copied Torpark 1.5.0.7 (27 MB in 275 files, 83 directories) to the UFD.  The times to copy were as follows:

Test 4    
FAT16
0:55
FAT32
1:05
NTFS
1:35 1st try
1:23 2nd try

These new, slower results for NTFS gave me pause, that's why I ran it twice. I also test NTFS under the following conditions:

Test 5    
No Anti-Virus live protection
1:11
Anti-Virus live on, using XCOPY
1:38
NTFS Compression on
1:17

Seems like turning compression on (less total data to write to the disk) seems to help. Over all, seems like FAT16 is the best choice for faster thumb drive file systems.

Conclusions of whole article:

1. I thought that my Symantec AV might be slowing thing down, but after removal it made little difference to the thumb drive's access speed. If you are copying over a lot of little executables it may still be a good idea to turn off your AV.
2. Reads and writes are much faster under Linux than under Vista/XP, no idea why exactly. Write me if you know.
3. It's faster in Vista to mount a Trucrypt volume off the thumb drive, then run your apps off of it then it is to run the app straight off of the thumb drive. I found this out when I was testing TorPark.
4. Changing the device options in control panel from the default "Optimize for removal" to "Optimize for performance" seemed to make little difference.
5. NTFS may sometimes give you speed increases, and some useful file system options, but you have to be aware of the following potential problems:
        a. You better use the "Safely Remove Hardware" option when you unplug your UFD to keep from corrupting your file system.
        b. If you use your flash drive in an MP3 player or a non-windows computer it most likely will not work.
        c. Because of how NTFS works, more writes are done to your drive with NTFS than FAT so you may decrease your UFDs life span.
        d. You may get weird permissions problems when you switch to a Windows box in another Domain.
6. Copying one big file to a flash drive is much faster that copying many smaller ones. In other words, you can write one 100MB file to a UFD faster than you can one-hundred 1MB files.

 

Irongeek's recommendation: Format you thumb drive FAT16 and have a nice day. If you perform your own tests I'd love to see and add them to this page.

Printable version of this article

15 most recent posts on Irongeek.com:


If you would like to republish one of the articles from this site on your webpage or print journal please contact IronGeek.

Copyright 2020, IronGeek
Louisville / Kentuckiana Information Security Enthusiast