Welcome to Tech Tips! This installment deals with hard drives. We’ll discuss several technical issues including how a file’s size is determined; when, why, and if you should optimize your drive and hopefully provide you with a better explanation of how stuff is stored inside your Mac.
Let’s start with the basics, file size terminology. Note that I’ll be using a lot of technical terminology – don’t despair, there won’t be a quiz afterwards.
The smallest unit of storage measurement is a bit. Bits are a little too small for what we deal with, so then there are bytes. Bytes contain 8 bits. Actually, bytes still don’t represent a significant enough capacity so we’ll use kilobytes. There are 1024 bytes in a kilobyte. Kilobytes is a little more our size and the best way of describing them is that, assuming a tiny hard drive such as a 40 Meg, a simple word processing document will take up one kilobyte (KB). As I already mentioned the word Meg, a definition is in order: one megabyte is 1024 kilobytes. Any modern hard drive will be measured for capacity using megabytes unless the vendor has a drive in excess of 1000 megabytes, in which case they would be measured in gigabytes, which is 1024 megabytes. Confused yet? Don’t be, the only sizing that you have to remember is kilobytes, megabytes and if you really want to impress your technical friends, gigabytes.
Another note before I continue on disk capacity: don’t confuse other ratings, especially transfer rates of modems, with the kilobytes. A quick example: My modem is rated 33.6 K which a lot of people assume means that it will transfer 33.6 kilobytes of data per second. This is not the case, as the modem is actually rated at 33.6 kilobits (notice the word bit, not byte) per second. This actually equates out to, in real world tests, about 3.6 kilobytes per second. Theoretically this means I can send three and a half word processing documents to my cohorts per second, but I doubt I could type that fast 🙂
Now that we’ve covered the basic capacity terminology, let’s turn our attention to hard drives. It would seem that if I have a 230 Meg hard drive which is full of small files and I need more space, I would just go get a larger drive, say 2.3 gig and would instantly have 10 times the space to store files, hence I could store X more files. Well, sort of. See, hard drives need some sort of method to physically store the files, or basically a pattern. We could get into the nitty-gritty of file allocation blocks, but let’s keep it very simple:
First, I don’t care how mathematically correct you are – don’t try to use the following numbers – they are for reference only.
Think of a hard drive as an apple pie. The pie is cut into a certain amount of pieces, triangular in shape, but the most pieces we could possible cut any pie into, given our crude cutting utensil, is 512. (Logical blocks)
Computer people are weird, and instead of leaving the triangular pieces alone they then cut them into smaller chunks.(Allocation Blocks) Any given file must be given it’s own chunk of the pie, and if it’s a larger file it is given more pieces.
Since we have a limit on how many pieces of pie we can cut, imagine that the larger the hard drive, the larger the chunks of the pie are.
The following diagram should give a visual representation of this concept:
So, if you have a small hard drive, say 40 Meg, a basic word processing document will take up about 1 KB. If the hard drive is 320 Meg, the same file would take up about 6 KB, and the same darn file on a 2 gig drive would use up about 33 KB of space.
A few words about optimization. You can imagine that your computer would be able to read a file from the hard drive much faster if it was in chunks next to each other (as in the previous graphic) and it is. Unfortunately, as you add and delete files, pretty soon there are open spaces between the files. Instead of skipping those spaces and wasting valuable space, your Mac will place the data in non-consecutive blocks (as depicted below).
File One is written on 3 consecutive blocks, but File One and File Two are not. This means that File One can be read from/written to somewhat faster than File Two or Three.
So how do you fix this? Or can you? Yes! There are effectively two methods:
1. Backing up the hard drive, formatting it, then copying the data back to the drive.
2. Use a disk Optimization program (such as Norton Speed Disk).
Either method effectively moves the files that are split apart to blocks that are next to each other (makes File One and Two look like File Three).
I prefer the first method, but then I have the resources available to do so. Using the software products will perform the same task but there is a greater chance of data loss because the program is actually temporarily deleting the files from your drive and then writing it back to it. As the manual states: Always perform a backup before attempting any disk optimization.
What do I recommend? I usually don’t bring the subject up to begin with and then emphasize the precautions to perform before you do anything. Specifically, make sure the program you are using is compatible with your type of hard drive and operating system and that there are no updates to the program. Truth be told, I have seen spectacular results from optimizing. One client could barely get her Premiere movies to play back at any reasonable rate, but after optimizing, she was able to record and playback at a very fluent clip.
Real World Experience
The system: Apple LaserWriter 12/640.
The problem: Paper jams using multipurpose tray.
The solution: Performed Apple Service Repair Extension procedure.
The explanation: Every time the user tried to print envelopes, they had to cram the envelope into the printer and even then, only 1 of 3 would not jam. Apple currently has a procedure that has ASPs reposition the pickup assembly on the printer, as apparently there is a known issue with them. Other than being rather time consuming, the procedure is rather simple with no actual parts needing replaced (and Apple pays ASPs for it, too).
Jeramey R. Valley (email@example.com)