Fragmentation and the need for defragmentation

Hi,

I have spent the last several days trying to understand fragmentation under OX 10.6 (SL) and how it handles the issue. There seems to be no debate that SL easily takes care of fragmentation with any file that is 20MB or less when there is an adequate amount of remaining free disk space.

The contention or lack of agreement seems to be with large files. My Aperture 3.01 library is 327GB, which is certainly large and larger than 20MB. Do i need to be actively concerned about defragmenting this fie and if so how?

In rummaging through posts on various support forums you can find advice from you must use iDefrag often on your Aperture library to it's better to clone your internal disk to an external disk with superduper or a comparable program and then clone it back every now and again. Or, you can just check your drive first with hfsdebug to see what's what. The last post on the hfsdebug website was in 2004.

None of this engenders much confidence.

If someone can post advice with this morass i would be most appreciative.

thanks

24" iMac, Mac OS X (10.6.2), 4GB RAM 1TB internal drive

Posted on Mar 21, 2010 6:35 AM

Reply
6 replies

Mar 21, 2010 7:11 AM in response to scarlatti

This has been asked and there are different schools of thought, and yes, tips on how to get Aperture to behave and run better.

I'm old school: backup and format, then restore; or use just clone and use the new drive and pull the older one as backup too.

Don't let the drive use more than 50% so that you have tons of cheap abundant free space. Free space is allowed to fragment. But 1TB under $100... Green drives like WD's go for $100 1.5TB, great for backup and archiving.

I would never use the defrag in TechTool Pro or iDefrag.
Why? you need a backup anyway. Slow. Only safe way - and done faster, is to just clone to another drive, then you are done.

Hope that makes sense, it's what I have done for... half a century and counting.

Mar 21, 2010 7:13 AM in response to scarlatti

Is the Aperture Library a single 327GB file, or is it each individual photo, saved as a single file?
Even though it may look look a file to you, it may be just a package that makes the folder look like a file. I don't have Aperture, so I don't know for sure, but that is how iPhoto works. An app is also just a folder with many underlying files packaged inside to make the "App."

Mar 21, 2010 12:13 PM in response to scarlatti

I have been using iDefrag for years, love it, have no idea why lots of people are scared of it.
Version 2 comes out soon. I am testing the beta version right now and I like it. The newest most
useful feature in version 2 is the ability to defrag a single file. Those who buy iDefrag now will get
a free upgrade to Version 2. The current version is 1.7.3.

defragmenting large data files like movies and such is not necessary unless they have a large
number fragments. A movie with even 20 or so fragments won't slow anything down. The hard
drive disk cache will compensate by reading ahead and keeping the data flowing steadily.Many
times large files do get fragmented badly with hundreds of fragments and that needs correcting.
Actually, freespace fragmentation is the largest single fragmentation problem in OS X, especially
when data and the OS are stored in the same partition. System files can get spread out from the
front of the drive to the back of the drive significantly increasing drive access times and slowing
data read speeds for system files. Data transfer speeds from the trailing edge of a drive are
typically as much as 30% to 50% slower than data read from the leading edge of the drive.
System files and apps need to be located at the leading edge of the drive for decent OS
performance. Modern defrag programs such as iDefrag can restore proper OS file placement on
the leading edge of the drive for best performance.

« »
from idefrag help:

Why Defragment?
It has often been asserted that defragmentation (or disk optimization) is not a good idea on
systems using Apple’s HFS+ filesystem. The main reasons given for this historically have been:

HFS+ is very much better at keeping files defragmented than many other commodity filesystems.

Advanced features in recent versions of HFS+ can easily be disrupted by a defragmentation tool
that does not support them, resulting in decreased performance.

There is a risk associated with defragmentation.

Whilst these arguments are certainly valid, they are not the whole story. For one thing, iDefrag,
unlike most other disk defragmentation tools, fully supports the most recent features of HFS+,
namely the metadata zone (or “hot band”) and the adaptive hot file clustering support added in
Mac OS X 10.3. Not only does it avoid disrupting them, but it is capable of fixing disruption
caused by other software by moving files into or out of the metadata zone as appropriate.

Sensible arguments for occasional optimization of your disk include:

HFS+ is not very good at keeping free space contiguous, which can, in turn, lead to large files
becoming very fragmented, and can also cause problems for the virtual memory subsystem on
Mac OS X.

Older versions of the Mac OS are not themselves aware of the metadata zone policy, and may
disrupt its performance.

HFS+ uses B-Tree index files to hold information about the filesystem. If a large number of files
are placed on a disk, the filesystem may have to enlarge these B-Tree structures; however, there
is no built-in mechanism to shrink them again once the files are deleted, so the space taken up
by these files has been lost.

Whilst HFS+ is good at keeping individual files defragmented, mechanisms like Software Update
may result in files that are components of the same piece of software being scattered across the
disk, leading to increased start-up times, both for Mac OS X itself and for applications software.
This is a form of fragmentation that is typically overlooked.

Defragmenting disk images can be helpful, particularly if they are to be placed onto a CD/DVD, as
seeks on CD/DVD discs are particularly expensive.

Some specific usage patterns may cause fragmentation despite the features of HFS+ that are
designed to avoid it.

We do not recommend very frequent optimization of your disk; optimizing a disk can take a
substantial amount of time, particularly with larger disks, far outweighing the benefits that are
likely to be obtained by (say) a weekly optimization regime.

Optimization may make more sense, however, following large software updates, or on an occasional
basis if you notice decreased performance and lots of hard disk seeking on system start-up or when
starting an application.


Kj ♘

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Fragmentation and the need for defragmentation

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.