USB Flash Drive Comparison Part 2 — FAT32 Vs. NTFS
Dampeal writes "Ok, a little while back I ran a somewhat large USB Flash Drive Comparison with 21 drives compared, today I got part two of that comparison. I've taken the 8gig and 4 gig drives, nine in total, and formatted them FAT32, NTFS and ExFAT and ran all of the tests over again for a comparison of how the file systems work on the drives." Good news — after some exhaustively graphed testing scenarios, the author comes to a nice conclusion for lazy people, writing "[I]n my opinion the all around best choice is FAT32, or the default for most all USB drives out there today, it seems to give us the best average performance overall."
I'm lazy, so it's good to know that the default setting is the best.
For best results, avoid doing stupid things.
Since interoperability is key in this context, anything besides FAT32 is hopelessly esoteric. So why not test the OSS solution as well?
The question about filesystems has come up a few times over on the Dell Mini forums. Basically the question is which is better to use on machines with SSDs? If you're not dealing with >4GB files, several people have suggested that you're better off formatting the drive as FAT32. I'll need to take a better look at this article when I get a chance, but it seems to be suggesting the same thing.
This guy's the limit!
FAT32 is great, unless you want to exceed the 4gb filesize limit. In which case you will need an alternative.
The days of the digital watch are numbered.
If I format one of these with ReiserFS, am I still okay to take it through airport security?
If libertarians are so opposed to effective government, why don't they all move to Somalia?
I wish there were tests covering "typical user mishaps". Things like inopportune powerdowns and flash drive yanking. My anecdotal evidence is that I've never had issues with FAT32 but have had entire NTFS partitions become unreadable. It's just anecdote though. Now throw a truecrypt file into the mix ...
I am a lawyer, but not yours. Anything I tell you might be a total lie intended to benefit my clients at your expense.
No, I think he meant "Patton". Having Patton on me is the last thing I'd want.
This guy's the limit!
The question about filesystems has come up a few times over on the Dell Mini forums. Basically the question is which is better to use on machines with SSDs? If you're not dealing with >4GB files, several people have suggested that you're better off formatting the drive as FAT32. I'll need to take a better look at this article when I get a chance, but it seems to be suggesting the same thing.
FAT32 is fine for a USB stick, but you shouldn't install an OS on it. The problem is that FAT32 has no concept of file ownership. So your operating system will be unable to restrict access to files based on the user, which is one of the building blocks of security on any modern OS. This way, any (malicious) process running on the system can overwrite critical system files to do arbitrary damage.
Even if you run windows XP as adminstrator, not all processes on your system run as administrator so you will still be (slightly) decreasing security by having it on a FAT32 filesystem.
I'm currently on site at a customer's office. I have one of their PCs and one of ours; legal restrictions mean I can't copy our source onto their machines or their source onto ours.
The solution to this is to put a copy of our source onto a USB stick and plug it into their machine, and then use a NTFS junction point (aka a symlink) to let their Windows-based build system see our source. This works very nicely, and I can just unplug the USB stick whenever I leave and the lawyers are happy.
However:
- I have to use NTFS. This is because the two machines are set to use different time zones, and frickin' FAT stores timestamps in the local time, which means that if I were to touch a file on one machine and the move the USB stick, the build system will go horribly wrong.
- I have 'optimise for performance' turned on; the non-Windows world calls this write caching. This boosts performance on NTFS *hugely*. I see no mention of this in the review. I now have to remember to unmount the stick on the Windows machine before pulling it, but it's worth it.
- You have to use the command line format.exe to format a removable drive as NTFS, because frickin' Windows doesn't let you do it from the GUI.
- If you turn NTFS compression on, you get a tiny bit more speed boost. But while Linux will read compressed NTFS files, it won't write them.
- You need to do something obscure with NTFS file permissions if you're going to move the stick between two Windows machines, because otherwise you'll be creating files on one machine you won't be allowed to edit on the other. Linux, of course, just ignores NTFS ACLs.
I have investigated the Windows ext2 driver, but while it does work reasonably well, it's still pretty clunky, and ext2 isn't much better than NTFS. What I'd really like is a decent Windows JFS or XFS driver --- NTFS is *so* last century.
Did he run tests with 16GB files?
.AVI Video file for all testing.".
FTA: "I've taken the 8gig and 4 gig drives, nine in total"
FTA: "I used a 350MB
More importantly, he couldn't use a 16GB file, since FAT32 doesn't support single files over 4GB.
He did, unfortunately there is a patten on that word.
Sometimes, life itself is sarcasm...
What about ext2 and other filesystems then?
Ninety percent of desktop PCs run Windows, and for interchange among the public, file systems that most PCs running Windows cannot read aren't worth testing. If you format your USB drive as ext2 and carry it to someone else's PC, you'll need to 1. carry a CD or a second USB drive with the ext2 driver and 2. get admin rights in order to install it on someone else's PC. It'd be like the Windows 9x days, when you needed to carry a floppy disk with the USB mass storage class driver whenever you used someone else's computer.
So you could just have a small partition holding the ext2 driver. Not really worth the effort for that, but it makes sense for things like truecrypt.
Select the usb drive right click/hardware/policies select optimize for performance and the GUI formatter will now have NTFS as an option.
After formatting you can reset the policy as needed.
I personally turn optimize for performance off on USB drives as many times explorer or some other program will lock the drive preventing a safe removal.
Did he run tests with 16GB files?
...
More importantly, he couldn't use a 16GB file, since
FAT32 doesn't support single files over 4GB.
And because 4GB drives don't support files over 4GB.
I'd guess it's because NTFS sucks on a removable device. On Windows, by default, hot pluggable devices are mounted with write through caching. NTFS supports this but not very efficiently.
FAT32 and exFAT are simple enough that you can do safe access to a disk even without much write caching. FAT (and probably exFAT) actually defines a way to mark the volume as dirty in the first FAT entry at the start of each transaction where the FAT will be modified.
If someone pulls the drive right in the middle of writing some clusters may be marked as used in the FAT but not actually in use by any files. Next time you insert the drive Vista checks the volume dirt flag and asks you for if you want to run chkdsk. If you run it it will find the 'lost clusters' and convert them to files in the root directory.
Of course this scheme only ensures filesystem metadata consistency, recover user data that was being written when the drive was yanked. Mind you, NTFS journalling has the same limitation. Of course scanning for lost clusters on FAT is a painfuly slow process - you read the FAT into memory and make a bitmap of allocated clusters. Then you read every single directory and tick off the clusters used by each file. Any that are left over are lost. A journaled filesystem is much simpler - you just rollback any incomplete transations in the journal.
Of course if you have to block waiting for write transactions to complete creating the journal entries, updating bitmaps, indexes and inodes and writing data, which you would have to do on a removable device with write through caching, a journaled filesystem like NTFS has a hefty overhead. NTFS structures are much more complex so plausibly extra disk writes are necessary to keep them updated and on small writes those extra writes dominate disk time. Write through caching makes this situation even worse.
echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
You clearly mean treadmark. Which may have been left by a Patton, if he ran over your flash drive with his Jeep.
Flash drives have a flash translation layer that makes the flash look like a regular disk despite having special properties. This layer handles the wear-leveling, garbage collection, and bad block detection so the standard filesystem (that was designed for magnetic disks, probably) doesn't have to consider them. Regardless of the filesystem used, the wear of the device should be related to the total amount of data written, not the location of the data.
-Splat