failing like never before

12May/090

The Evils of FAT

I think we're all familar with the infamous FAT32 (File Allocation Table) file system, still in use after all these years despite the numerous superior alternatives avaliable. I myself am guilty for helping to extend FAT's unnaturally long lifetime on this earth, since in order for me to be able to have an external hard drive that is easily mountable and readable by all the major operating systems (Linux, OS X, and Windows), I had to format the disk using a commonly used file system. Unfortunately, FAT32 was the only option avaliable. It would be nice if Microsoft and Apple started including by default, drivers for some modern file system in their operating systems so that all machines could easily share external media without suffering from a performance penalty that is inherent in the file system. But this is extremely unlikely, so I won't spend too much time hoping. But what exactly is it that makes Fat such a terrible system?

Anyone using FAT32 on their external hard drive used to store media will probably be familar with FAT32's maximum file size limitation of 4GiB, which is actually larger then the maximum file size allowed in the original FAT file system. FAT also has a linear seek time within files, since in order to find the ith sector used to store data in a file, we must first find all the sectors preceding that sector. And of course, FAT has some pretty serious internal fragmentation issues, especially once we start creating and deleting files on the drive. On a physical hard drive, large internal fragmentation of files results in the hard drive head having to constantly seek around the drive in order to find the next 4KiB block. This is of course a bad thing, especially since the bottleneck on a physical hard drive is its seek time. Ideally, we would like to have continguous blocks used for a single file.

Another serious performance issue with FAT that is not readily noticeable, is the size of the File Allocation Table, and how large it grows when with the drive. Ideally, we would like to be able to just stick the whole FAT into RAM in order to improve performance, since having to cache the FAT on disk would mean we would have to do an extra read in order to read the FAT just so we could find a file on the drive. Now, lets assume that you're a movie fanatic, and in order to store your increasingly large movie collection, you've bought a new 1TB (sorry, not 1 TiB) hard drive. Of course, you want your drive to be able to function with multiple operating systems so you format it with FAT32. FAT32 uses 4KiB blocks, and each entry in the File Allocation Table takes up 4 bytes. Because we have a 1TB drive, we have about 238 entries in the table, which means that the File Allocation Table on your 1TB drive is about 1GiB. Some people might consider this to be a problem.

Of course, a fairly modern desktop computer will have 4GB of RAM so it could theoretically store the whole FAT in memory without having to cache it on disk, but I doubt that the operating system would like to dedicate a quarter of its memory to improving IO performance on one external hard disk.

So there you have, another good reason to stay away from FAT.

18Mar/090

Run Run Run

This past quarter, I've been trying to go to the track at least a few times a week and run at least two miles. Up until last week, I didn't bother to time myself, figuring that I was running "fast enough." I was surprised to find out after a two mile run on the track, that I was averaging almost eight minutes a mile. Not good. Not good at all.

So the next night that I went running, I pushed myself a little harder and managed to average about seven minutes and thirty seconds per mile (for three miles) which is significantly better, but still not as good as I would have liked; I could manage six minutes and fifteen seconds fairly regularly when I was in high school.

Now today (the day of my two killer finals) I wasn't planning on doing any running, and was hoping instead that after my two finals over, I could just grab something quick to eat and then be able to go to sleep early. And after my last final of the day got out, this seemed like a great idea, as my head was pounding and I was having trouble focusing and keeping my eyes open. But the line for food was ridiculously long and my lack of recent physical activities was starting to make me feel like a fatty, so I dropped my notes in my room and ran to the track, where I proceeded to run a mile at high speed (or at least my highest speed) and then do twenty minutes or so of stairs. My mile time for today was six minutes and forty seconds, significantly faster then last weeks, but still on the slow side. Lets hope it gets better.

Tagged as: , , , No Comments
16Mar/090

That Time Again

I have the lucky privillege of having five finals this week. Here's my schedule:

- Saturday: digital logic lab (which I already took and pwned)

- Tuesday: solid state physics, and differential equations (my two hardest classses)

- Thursday: software design lab (Linux stuff, BASH, Linux C programming, etc...)

- Friday: oceanography (pretty easy)

So today is Monday, which means I have two of my hardest finals tomorrow and I'm totally exhausted (even though its only 5pm) because I didn't sleep very well last night. Add to that the fact that I'm not even close to being prepared for tomorrow, and its pretty obvious that I won't be grabbing any naps today or sleeping early. And to just make my life even better, I've been gaining a lot of weight this past week. Woot.

I feel fat, but not very sassy... (Don Hertzfeldt)