An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
New to mac/defragging
#115 08/05/09 01:17 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
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

Re: New to mac/defragging
badartdog #116 08/05/09 01:31 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
nessuk #124 08/05/09 02:06 PM
Joined: Aug 2009
Likes: 16
Moderator
Online
Moderator

Joined: Aug 2009
Likes: 16
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.


If we knew what it was we were doing, it wouldn't be called research, would it?

— Albert Einstein
Re: New to mac/defragging
badartdog #125 08/05/09 02:06 PM
Joined: Aug 2009
Moderator
Offline
Moderator

Joined: Aug 2009
Hi, badartdog

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


Back up everything you can't afford to lose: documents, mail, movies, music, photos, and other data and settings.
Re: New to mac/defragging
badartdog #127 08/05/09 02:16 PM
Joined: Aug 2009
Likes: 7
Online

Joined: Aug 2009
Likes: 7
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

macOS 11.7.10, 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
Re: New to mac/defragging
nessuk #128 08/05/09 02:22 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
jchuzi #150 08/05/09 03:57 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
joemikeb #176 08/05/09 05:18 PM
Joined: Aug 2009
Likes: 1
Online

Joined: Aug 2009
Likes: 1
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?

Re: New to mac/defragging
macnerd10 #182 08/05/09 05:26 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
nessuk #197 08/05/09 05:54 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
thanks everybody - plenty to go at there - much appreciated.

Re: New to mac/defragging
joemikeb #226 08/05/09 07:37 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
dianne #230 08/05/09 07:49 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
dianne,

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


Ness
Re: New to mac/defragging
nessuk #267 08/06/09 12:26 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
MicroMatTech3 #270 08/06/09 12:48 AM
Joined: Aug 2009
Likes: 7
Online

Joined: Aug 2009
Likes: 7
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

macOS 11.7.10, 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
Re: New to mac/defragging
badartdog #276 08/06/09 01:03 AM
Joined: Aug 2009
Likes: 1
Online

Joined: Aug 2009
Likes: 1
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.

Re: New to mac/defragging
jchuzi #287 08/06/09 01:47 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
MicroMatTech3 #291 08/06/09 02:31 AM
Joined: Aug 2009
Likes: 1
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 1
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...

Last edited by alternaut; 08/08/09 05:09 PM.

alternaut moderator
Re: New to mac/defragging
alternaut #303 08/06/09 04:16 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
nessuk #610 08/08/09 05:29 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
Virtual1 #654 08/08/09 10:30 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: New to mac/defragging
macnerd10 #3068 09/06/09 03:36 PM
Joined: Sep 2009
Offline

Joined: Sep 2009
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.

Re: New to mac/defragging
JustAnnuthaDewd #3072 09/06/09 04:09 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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

Moderated by  cyn 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.039s Queries: 58 (0.023s) Memory: 0.6864 MB (Peak: 0.8394 MB) Data Comp: Zlib Server Time: 2024-04-18 18:15:14 UTC
Valid HTML 5 and Valid CSS