tips for avoiding badly fragmented drive?

d54321k

Registered
Hey guys, does it help to keep saving all ongoing projects inside the "Documents" directory as opposed to the desktop or any other various locations on the hard drive? Other than being organized and all that, is it going to cluster files any better (i.e. documents with documents, apps with apps, etc.)? I know a lot of folks who save ongoing projects straight onto the desctop, then eventually drag them to varuous locations on the drive. Does that lead to worse fragmetation?
Thanks
dk
 
Unix-based operating systems (like Mac OS X) automatically try to prevent fragmentation whenever they write to the disk.

The argument has been made that there is no real need to defragment a Mac OS X hard disk...

PS: Unless you have ~/Documents/ on a different partition or volume, no saving it in different folders won't make any difference, because folders are just an abstract way of organizing files, they don't represent physical reality of the location of your file on the hard disk.
 
The argument has been made that there is no real need to defragment a Mac OS X hard disk...

I've heard this several times before in both the Mac and Unix world, but I've never heard a reasonable explanation of how this is true. Does anyone have any technical details on how this works?
 
its true if your swap partition is on another disk or something. but since it is not.. u might have to defrag it sometime or the other..

anyways i think the so called optimization part of a software install (in osx) is really something like de-fragmenting ur drive.. but i could be wrong

Originally posted by gatorparrots@[HOWTO] Move the swapdir in Jaguar

The swap directory is the location where OS X writes swapfiles (virtual memory pageouts). Swapfiles are created 80MB at a time by the system, and only when needed. If these are written to the same disk as everything else, your main disk will become fragmented after significant use (even though the swap files are cleared with a reboot, they leave behind an 80MB 'hole' that often is not filled on your disk). Further, if the free space on your drive does not occur in 80MB chunks (i.e. different block allocation size), your swapfiles will have to be fragmented. This will increase the amount of seek time when your system starts to page data between RAM and disk -- when you run out of 'real' RAM, you will notice a significant decrease in performance.

It is most advantageous if you can dedicate an entire hard drive as a swap disk. Failing that, a second partition (preferably the first partition on the disk for fastest access) is acceptable. This way you can access data faster if you're getting it from two disks -- while the system is paging data between RAM and hard disk, you downloads to another disk or application launch or large file read isn't taking a big performance hit. This dedicated disk/partition doesn't have to be very large, 500MB to 1GB should be plenty. An old SCSI drive would be ideal because they're fast (assuming you can get it to work with OS X). Failing that, a 2 or 4GB IDE drive would do the trick.
 
Ripcord >> You no doubt know that fragmentation is caused by parts of the same file being written physically n a non-continguous block on the disk. In UNIX-based OSs (as is my understanding) the operating system automatically finds somewhere on the disk that is big enough to hold the file when it's written.

wiz >> No, actually the OS X Package Installer's "Optimization" updates application prebinding (libs and stuff) so they start faster, it has nothing to do with fragmentation.

In Puma you used to have to manually "sudo update_prebinding -root /" from the terminal every once and a while, but in Jaguar "fix_prebinding" is called every time you open an application, prebinds it if it's not already prebound (and updated), and leaves it alone if it is.
 
Back
Top