I wish you could make defragment a little smarter…

I wish you could make defragment a little smarter… For those of you who are non-geeks, a “fragmented” file is a file that is stored in multiple non-contiguous parts of your hard disk. Or to make an analogy, your hard disk is kind of like a big parking lot. Parking analogy The parking lot at sea world is going to have all the cars right near the door at 9am, no problem finding several spots in a row. But late afternoon, some people have been there all day (old files) and are parked near the door. Other people showed up a little later (new files) and had to park in the faraway parking spots. But then a bunch of people got bored and left, but typically its not like first in first out. Its the family with the screaming two year old went home, the family that got hungry for lunch went home, those guys with the annual pass only showed up for a couple hours later in the day…so not everyone leaves (file gets deleted) at the same time. The result? Empty space in the lot (hard disk) is not contiguous. Sometimes that’s not a problem. If you’re just one car, any open space will do. Of course, you’d rather not circle the lot all day looking for where that one empty space is, so you prefer a less full lot. (That is why your hard disk gets really slow when its almost full…it takes a long time figuring out where to park each file till you’re ready to use it again). But lets say you have a pickup pulling two trailers (a big file). To park that thing, you’re going to need more than one parking space. If the lots not full you might park across several spaces. That’s fast, that’s easy. But what if you really need to leave your vehicle in this lot and there aren’t several spaces in a row available? Well, you’re going to have to start unhooking the trailers and parking each trailer (part of the file) separately. The first trailer is in E5, the second one is in A7 and the front is in C3…there’s a little bit of overhead of keeping track of remembering where each part is, but the bigger cost is the inefficiency of getting the truck and its trailers out ready to use, having to reconnect all the parts and fetch them from different corners of the lot. So then, customers start complaining about how slow its getting to get their trailers out. That guy with the sub-compact (tiny file) never complains because he can park just about anywhere…but that guy towing his RV is always complaining. Its slow, its a lot of work. So the owner of the parking lot comes up with a good idea…he’s going to make it a valet lot. It just got a lot easier to park. No more manually disconnecting your trailers, you just drop it off by the door, and go in…but when you get back, of course, you’re going to have to wait for the valet to fetch your car…that’s kind of how hard disks work, they have a valet that decides where to park each file when they show up. But…over time, you still have the same speed problem. So then they come up with this great idea. We’ll move the cars. But its kind of a lot of work, so they only start doing that when people start complaining (user requests a defragment). So they move all the small cars together, and all the big trailers they park together, so they don’t have to take time to reattach each trailer, and leave all the empty space at the far away end of the lot that’s less convenient. That’s kind of what defragment does…keeps your parking lot optimally used. everything as convenient as possible while consolidating all the extra space for future needs (say you want to hold a big convention in another part of the lot…it’d be a lot easier if you didn’t have to work around parked vehicles…)