An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Topic Options
#115 - 08/05/09 06:17 AM New to mac/defragging
badartdog Offline


Registered: 08/05/09
Hello
I'm completely new to using Macs - more used to Windows - what's the Mac equivalent of defragging my HD and how do I do this?
Thanks in advance for your help smile

Top
#116 - 08/05/09 06:31 AM Re: New to mac/defragging [Re: badartdog]
nessuk Offline


Registered: 08/04/09
Loc: UK
Hello badartdog and welcome to FineTunedMac,

This was one of the first questions I asked when I first started using a Mac smile

Firstly, using the Mac OS, we would call it 'repairing permissions'. There is a built-in application to do this called 'Disk Utility' which you can find here ...

'Go' (in your Finder window/main desktop) -> 'Utilities' -> 'Disk Utility'

When you have your 'Disk Utility' application open... select the hard drive icon at the top left of the left hand window. You can then click 'Verify Disk Permissions' followed by 'Repair Disk Permissions'. This may take a while so be patient.

I have also found this application to be very good and it's free! grin

I hope this was of some help to you...

_________________________
Ness

Top
#124 - 08/05/09 07:06 AM Re: New to mac/defragging [Re: nessuk]
joemikeb Offline
Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
Originally Posted By: nessuk
Firstly, using the Mac OS, we would call it 'repairing permissions'. There is a built-in application to do this called 'Disk Utility' which you can find here ...

Repairing permissions is in no way the same thing as defragmenting a drive. The repair permissions function in Disk Utility does exactly that. It resets the ownership and permissions of the OS X Systems files and those applications that have installed Reciept packages with a bill of materials (BOM) in /Library/Receipts.

Defragmentation, reordering of files so they are on contiguous disk sectors and/or removing all the gaps between files is a completely different process. There are some automatic features in OS X that do at least some of that, on the fly. There is one function called hot banding where the most often used files, almost always system files, are identified and automatically move the that part of the hard drive that offers the fastest access. There is another function where files in a certain size range are automatically placed on contiguous sectors. However, both of these built in functions tend to increase disk fragmentation.

There are three third party utilities Drive Genius, TechTool Pro and iDefrag will perform actual file and/or disk defragmentation on OS X.

There is a school of thought, which I do not subscribe to, that defragmentation is no longer necessary with Mac OS X Extended (journaled) drives but this thread by Micromat Tech 3 on MacFixit presents a cogent counter argument to that school of thought.
_________________________
joemikeb • moderator

Top
#125 - 08/05/09 07:06 AM Re: New to mac/defragging [Re: badartdog]
dianne Offline

Moderator

Registered: 08/04/09
Hi, badartdog

You might review this Apple Support article: About disk optimization with Mac OS X.
_________________________
dianne • moderator

Back up everything you can't afford to lose – documents, mail, movies, music, photos, and other data and settings.

Top
#127 - 08/05/09 07:16 AM Re: New to mac/defragging [Re: badartdog]
jchuzi Online


Registered: 08/04/09
Loc: New York State
I'm not qualified to give a technical opinion but I can speak from experience. I have used TechTool Pro to defragment the drive and have not noticed any difference in performance. This is my personal experience, however, and may not apply in all situations. I have not defragged for several years and all seems to be well.

My 2¢.
_________________________
Jon

OS 10.14.3, iMac Retina 5K 27-inch, late 2014, 3.5 GHz Intel Core i5, 1 TB fusion drive, 16 GB RAM, Epson SureColor P600, Photoshop CC, Lightroom CC, MS Office 365

Top
#128 - 08/05/09 07:22 AM Re: New to mac/defragging [Re: nessuk]
bob82xrp Offline


Registered: 08/04/09
Loc: Tucson
Originally Posted By: nessuk
I have also found this application to be very good and it's free!


It also should be noted that Onyx does not do defragmentation though it is a fine application for other maintenance tasks.

See item #6 on this macattorney page for yet another cogent discussion of defragmentation and optimization which includes links to some of the articles mentioned by posters above.

FWIW, I have had my Quicksilver since 2001 and do lots of photo and video work, and I have never needed to defrag my hard drive(s) since switching to OSX.
_________________________
MacBook Pro, 2.66 Ghz Intel Core i7, 4GB RAM, 500 GB HD, OSX 10.6.8

Top
#150 - 08/05/09 08:57 AM Re: New to mac/defragging [Re: jchuzi]
macnerd10 Offline


Registered: 08/04/09
Loc: Los Angeles, CA
Jon and others are right. OS X does not necessarily need defragmentation. I have used iDefrag shareware utility in the past with Tiger and never found defragmentation to be serious. It was always light, usually below 1%. As other posters said, disk fragmentation under OS X does not interfere with computer functionality or speed. If you still think you might need defragmenting the disk once in a while, here's the link to iDefrag:
www.coriolis-systems.com/iDefrag.php
_________________________
Alex
3.1 GHz 13" MacBook Pro 2015, 8 GB RAM, OS 10.11.2, Office 2011, TimeWarner Cable
2.8 GHz Xeon Mac Pro 2010, 16 GB RAM, OS 10.11.2, Office 2011, LAN

Top
#176 - 08/05/09 10:18 AM Re: New to mac/defragging [Re: joemikeb]
Gregg Offline


Registered: 08/04/09
Loc: Milwaukee, WI (USA)
badartdog, I'm a TechTool Pro user. One feature of its Optimization ("defragging") function that I like is the graphical representation of fragmentation of files (or the directory in Directory Maintenance). While, as others have said, fragmentation is not a big issue with OSX, I like things to be all together. If the graph shows several gaps, then I go ahead and execute the routine. If you're a neat freak, then do it. Yeah, it's mostly conceptual, but hey, why not tidy up?

Top
#182 - 08/05/09 10:26 AM Re: New to mac/defragging [Re: macnerd10]
nessuk Offline


Registered: 08/04/09
Loc: UK
badartdog, I bow to everyone here's greater knowledge.... I hope I was of some help... I do think that you have come to the right place if you're looking for Mac support and experience ...

I'm a *relatively* new like yourself and as such am unfamiliar with the fine detail. I found my help and support here back in 2003! I now have five Macs in the house....

Thank you for the link btw macnerd10 smile
_________________________
Ness

Top
#197 - 08/05/09 10:54 AM Re: New to mac/defragging [Re: nessuk]
badartdog Offline


Registered: 08/05/09
thanks everybody - plenty to go at there - much appreciated.

Top
#226 - 08/05/09 12:37 PM Re: New to mac/defragging [Re: joemikeb]
MicroMatTech3 Offline


Registered: 08/04/09
joe,

An often overlooked aspect of the topic of defragmentation is that when a third-party disk repair utility rebuilds a disk directory, the Catalog B-Tree and the Extents B-Tree must each be written to a piece of disk space that is both free and contiguous.

A few days ago, I used hfsdebug to determine the size of the Catalog B-Tree of my 200 GB internal hard drive. It was over 600 MB. The volume is only slightly over half full. Without a piece of free, contiguous disk space that large, just that aspect of the disk directory cannot be rebuilt. A new directory must be born in one piece to be born safely.

There is (was?) a thread in Those Other Forums that discussed the need for free and contiguous disk space for virtual memory to function properly. Each swapfile must be in one piece or performance suffers drastically. Panther did not even allow fragmented swapfiles, preferring a kernel panic when a swapfile would have been fragmented.

I cannot take the time to revise "Why Defrag?" now, and I will never have time to engage in potentially endless debates about the subject. (Some people who have contributed code to disk optimizers disagree about their use!) I do not think people should make a hobby of defragmenting drives, but letting the largest free block (now reported by TechTool Pro 5) be too small puts your directory at risk of being unable to be safely rebuilt.

If you ever have to recover files from a volume that has an irreparably damaged directory, by "scavenging" the drive, please be advised in advance that these are the outcomes:

1. If the file is of a type known to the recovery utility, and is in one piece, the file is recovered, but its name (which is not in the file but in the damaged disk directory) is not recovered. The file receives an arbitrarily assigned generic name.

2. If the file is of a known type and is not in one piece, you get nothing.

If you just cannot resist using a utility to try to do something nice for your Macintosh, there is always the Surface Scan in TechTool Pro, and similar media checks in other programs.
_________________________
MicroMat Inc
Makers of TechTool

Top
#230 - 08/05/09 12:49 PM Re: New to mac/defragging [Re: dianne]
nessuk Offline


Registered: 08/04/09
Loc: UK
dianne,

I found your link very useful... thank you...
_________________________
Ness

Top
#267 - 08/05/09 05:26 PM Re: New to mac/defragging [Re: nessuk]
MicroMatTech3 Offline


Registered: 08/04/09
The automatic defragmentation built into Mac OS X works only on read-only files that are less than 20 MB in size and in more than eight pieces (which means that their pieces, called “extents”, are now recorded in the Extents B-Tree portion of the disk directory, which Apple calls the Extents Overflow File). The files that are most important to you, which you cannot replace by running an installer, are the ones you yourself created. Not one of these files is “read-only.”

I tried to refer to the original description of these limitations in my own article, “Why Defrag?” in the Tips and Hints forum of the MacFixitForums. I nearly fell out of my Aeron chair when I was automatically directed to a certain subsidiary of CBS.

I once met Bill Stumpf, who, along with Don Chadwick, designed the Aeron chair, while he was setting up slides before a panel discussion. I mentioned to him that no matter how famous one becomes, it is still necessary to set up one’s own slides. He laughed, and confirmed my observation. During the panel discussion, whenever the panel was stumped (sorry for the pun), Bill would apologize for monopolizing the discussion, and would then offer his insightful and unique observations.

During the discussion, a problem arose about the distribution of ice water. Bill Stumpf insigtfully solved the problem in real time, while drawing a minimum of attention to himself. In the back of the audience were two executives from Herman Miller, the manufacturer of the Aeron chair. Anyone with any insight whatsovever could read their facial expressions, which said, “There’s our man.”
_________________________
MicroMat Inc
Makers of TechTool

Top
#270 - 08/05/09 05:48 PM Re: New to mac/defragging [Re: MicroMatTech3]
jchuzi Online


Registered: 08/04/09
Loc: New York State
Long ago, I bookmarked "Why Defrag" because I used it often in answering questions. I don't know how you accessed it, but this link still works.
_________________________
Jon

OS 10.14.3, iMac Retina 5K 27-inch, late 2014, 3.5 GHz Intel Core i5, 1 TB fusion drive, 16 GB RAM, Epson SureColor P600, Photoshop CC, Lightroom CC, MS Office 365

Top
#276 - 08/05/09 06:03 PM Re: New to mac/defragging [Re: badartdog]
Gregg Offline


Registered: 08/04/09
Loc: Milwaukee, WI (USA)
Don't do it if you need to meet a deadline in the next few hours. You can't be booted to the drive being defragmented, and it takes quite a long time ....at least in this era of e-mails, faxes, and microwaves.

Top
#287 - 08/05/09 06:47 PM Re: New to mac/defragging [Re: jchuzi]
MicroMatTech3 Offline


Registered: 08/04/09
Jon,

Thanks for pointing out the crucial distinction between knowing the complete URL and attempting to navigate starting at www.macfixitforums.com.
_________________________
MicroMat Inc
Makers of TechTool

Top
#291 - 08/05/09 07:31 PM Re: New to mac/defragging [Re: MicroMatTech3]
alternaut Offline

Moderator

Registered: 08/04/09
Originally Posted By: MicroMatTech3
... starting at www.macfixitforums.com.

Apart from the typo, it's now archive.macfixitforums.com, while www.macfixitforums.com redirects to the new CNet Mac forums.
This address change messes up the login process, not that that's necessary any longer...

Well, it turns out the failed login does matter: it prevents one from accessing functions like Search...


Edited by alternaut (08/08/09 10:09 AM)
_________________________
alternaut moderator

Top
#303 - 08/05/09 09:16 PM Re: New to mac/defragging [Re: alternaut]
MicroMatTech3 Offline


Registered: 08/04/09
alternaut,

Thanks for catching my typo, which I have corrected.

At the moment, http://archive.macfixitforums.com/ is linking to the main MacFixIt page.
_________________________
MicroMat Inc
Makers of TechTool

Top
#610 - 08/08/09 10:29 AM Re: New to mac/defragging [Re: nessuk]
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
I wonder, does a file's attributes affect auto defrag?
ie if it's finder locked, or 000 access, or ACL'd out, will it still auto defrag?

is there another flag that prevents it? IIRC in dos there used to be a flag I thought that would specifically prevent this, a lot of copy protections would set this flag and then record how the file was stored, and if that changed, it would choke. This screwed around with defrag apps that could cause apps to suddenly inexplicably break after a a defrag.

_________________________
I work for the Department of Redundancy Department

Top
#654 - 08/08/09 03:30 PM Re: New to mac/defragging [Re: Virtual1]
MicroMatTech3 Offline


Registered: 08/04/09
You have raised a good question. Unfortunately, the most definitive descriptions I have seen of the automatic defragmentation predate ACLs, and until the release of the Mac OS X 10.5.8 Combo Updater, I had not seen so many references to files with permissions beginning with 000.

I applied the Combo Updater, and then repaired permissions and looked for files with permissions beginning with 000. I found quite a few by using this Terminal command:

sudo find -x / -perm 000

The easiest solution is to reapply the Combo Updater, and leave the permissions alone.

There is a lengthy discussion of the 000 permissions problem (to give it a name) in the Apple Discussions Forums.
_________________________
MicroMat Inc
Makers of TechTool

Top
#3068 - 09/06/09 08:36 AM Re: New to mac/defragging [Re: macnerd10]
JustAnnuthaDewd Offline


Registered: 09/06/09
Loc: Wilmington, NC
I'll second that recommendation for iDefrag. While it's true that OS X does defrag certain files as mentioned already, and it's not necessary to defrag often like you do in Windows, I can say I've experienced clear performance changes in OS X on occasion. In one case, I had a Powerbook that was taking well upwards of 5 minutes just to boot up. After all other troubleshooting and maintenance tricks failed to fix it, a defrag recovered my boot times back down to a more normal time of a minute or so. There are a couple other times I've benefited from defrags on other Macs, but this is the most drastic example. And a couple times, I really saw no difference.

My general impression is that people who work with a lot of large files, frequently download, save, delete large files, and so on in that vein, will see some performance improvements by defragging every so often. I'd also like to point out that iDefrag also doesn't just defrag the files, but also "optimizes" the file layout to allow for greater efficiency.

Top
#3072 - 09/06/09 09:09 AM Re: New to mac/defragging [Re: JustAnnuthaDewd]
MicroMatTech3 Offline


Registered: 08/04/09
As far as I know, both iDefrag and TechTool Pro make sure that they do not undo what adaptive hotfile clustering has already done with the volume to improve its efficiency.

It is always a plus to get a performance improvement from optimization, but the most important benefit is simplification of the disk directory. Here is some text from a recent posting in our forums:

Let me try to make it clear how important these disk directory backups are.

If a volume develops irreparable disk directory damage, then the only way to recover the files is to use a file recovery program.

When file recovery programs recover files without making use of disk directory data, they are often able to recover files that are in one piece, but the recovered files have a generic, computer-generated name that bears no relation to the original and tells the user nothing of value. If the file is not in one piece, the recovery program provides nothing, because there is no way to know where the pieces of the file, beyond the first one, are. In such cases, having a backup of the disk directory is a very useful feature.

I urge you to configure the Protection feature to save the directory for each volume to itself, and to at least one other volume, preferably on another drive. Sometimes, disk directory damage prevents the backup of the disk directory for a given volume from being found on that volume.
_________________________
MicroMat Inc
Makers of TechTool

Top

Moderator:  alternaut, dianne, dkmarsh