Defragmenting my iMac?

Joined
Apr 30, 2018
Messages
44
Reaction score
1
Points
8
I may have mentioned, that I have a close friend who is a retired computer programmer and PC nerd.

I bought my iMac in 2016. Had always wanted one because they are elegant and I understood that the Mac OS to be very good indeed. That is also the opinion I've formed over the last 5 years as a general user.

Over the last few years, I have been told that Macs do not need to be defragmented. My nerdy mate says this is not strictly true. That although Mac systems are less likely to become fragmented than Windows, some does occur. That it is a good idea to defragment one's Mac HDD every now and then.

Be interested in informed opinions.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,246
Reaction score
1,834
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
If your iMac is equipped with an SSD, do not defragment it. The rule is never to defragment a SSD. The same applies if you have a Fusion drive in your iMac.

If your iMac has only a regular spinning drive, you can if you wish defragment it. There is only one application that works well to defragment a Mac. It used to be payware but now is freeware. If you can find a copy, it's called "iDefrag.app". Here's the link:

 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
16,030
Reaction score
2,435
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
With current computers and their overall performance, defragmenting is not necessary at all. This was a very prevalent thing hyped up by software makers as a way to increase performance, so a lot of marketing dollars went into that.

Back in the day with slower CPU speeds, slower IO speeds and spinning disks, having the reading head of the HDD seek all over the platter for your data was indeed a potential bottleneck if you were trying to read something in a very sustained fashion.

Think about a system that has say 2 or 4GB of memory, and you were try to load a 600 or 1GB video file to play. The video player couldn't keep very much of the video in memory, so it would constantly have to go back to the disk to read more and more and buffer a little bit for smooth playback. If the data was all located near each other, the speed in which you got the data would allow for smooth playback. If the drive had to jump all over the place for the data, then you'd have delays in getting the data and thus buffering issues and choppy video playback.

Fast-forward to today, machines today have minimal 8GB of memory or more. With SSD's, the seek time has been essentially negated, so you don't pay that penalty for looking all over the drive for your data. Even spinning disks have gotten faster with multiple heads and really quick seek time. So with the combination of advancements, the potential big bump in performance you got from defragging your drive 15+ years ago is not even worth the effort today.

Part of being a smart technologist (not just a dumb PC nerd) is to evolve your understanding of things as the technology changes.
 
Last edited:
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Ignore your nerdy mate Boomer and do not let him get his hands on your iMac.
 
OP
B
Joined
Apr 30, 2018
Messages
44
Reaction score
1
Points
8
Ignore your nerdy mate Boomer and do not let him get his hands on your iMac.

Yair, I'd kind of gathered that. Hence my presence here. :rolleyes:


My iMac has a 1TB HDD, with over 800GB free space. I may have mentioned that I don't keep large files on my hard drive, on any of my computers. .They are stored on external hard drives which are connected to my router and form my internal network. Except for Mac Time Machine, for that I have a 2 TB Toshiba external drive attached to the Mac. The external back up drive for the PC is connected to the router.

In my ignorance I thought I understood that Mac and PC systems are very different and that Mac HDD are far less likely to defragment. I had reasoned that because of that Mac feature and because I'm only using about 20% of storage capacity, that there was even less likelihood of fragmentation (?)

The PC, which is relatively new, has a 1TB SSD, no HDD.
 
Joined
Jan 1, 2009
Messages
16,374
Reaction score
4,728
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 16 Pro, plus ATVs, AWatch, MacMinis (multiple)
Don't defrag either one. Don't defrag the Mac because with that much free space, you probably have very little fragmentation, if any. Don't defrag the PC because don't ever defrag SSDs. No need, and no performance improvement will happen. So. Just. Don't. Defrag.
 
OP
B
Joined
Apr 30, 2018
Messages
44
Reaction score
1
Points
8
Don't defrag either one. Don't defrag the Mac because with that much free space, you probably have very little fragmentation, if any. Don't defrag the PC because don't ever defrag SSDs. No need, and no performance improvement will happen. So. Just. Don't. Defrag.

Yair, that's pretty much what I figured, especially with the SSD. I think it might have been you who said "If it ain't broke, don't fix it" :unsure:
 
Joined
Feb 1, 2011
Messages
4,902
Reaction score
2,902
Points
113
Location
Sacramento, California
The need to defragment a rotating disk hard drive in a Macintosh is a matter of debate. The Mac OS itself does file defragmentation, but no overall disk defragmentation. There is no need to even worry about defragging your hard drive until your disk is over 50% full. But if your drive becomes full enough, and the data on it is fragmented enough, you might find that the tens of gigs of free space you have is illusory, and your drive is essentially full at something approaching 80% full or possibly even less.

Much more discussion here:


Item #5 and Note #1

Note that iDefrag is now a legacy product that is no longer being developed or supported. But you can still download it.
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,236
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
I may have mentioned, that I have a close friend who is a retired computer programmer and PC nerd.

I bought my iMac in 2016. Had always wanted one because they are elegant and I understood that the Mac OS to be very good indeed. That is also the opinion I've formed over the last 5 years as a general user.

Over the last few years, I have been told that Macs do not need to be defragmented. My nerdy mate says this is not strictly true. That although Mac systems are less likely to become fragmented than Windows, some does occur. That it is a good idea to defragment one's Mac HDD every now and then.

Be interested in informed opinions.

Here are my informed opinions.

Do Macs get fragmented? Absolutely yes they do. It is a gross misconception that they don't. What macOS does is automatically defrag files under a certain size. I forget the exact size limit, but it's small, perhaps 50 MB or so. Larger files aren't defragged, and the larger the file is, and the more fragmented it is, the more the drive has to work to read all of it.

Don't defrag an SSD. They are so fast that any fragmentation that exists will not be noticed, so there's no real need to reduce its useful life with all that activity.

Do periodically defrag your HDD, ESPECIALLY if you are a media content creator/user. For myself, the only HDD I have in use today is an external drive that mostly contains some backups and a large media library. When that drive was heavily fragmented, streaming videos at home was a pretty awful experience. This was the early days of Plex and an older router. The playback would be very choppy and virtually unusable. Defragging the drive cured the problem. Some of the more fragmented files were split up into 200+ fragments spread out all over the drive. So to read that file, the head of the drive had to move all over the platter constantly to get bits and pieces here and there. That is a real drag on read performance. Right now, the newer files on that drive have as many as 52 fragments. The drive is largely defragged, so those fragments aren't spread out as much as they could have been otherwise, so I'm not going to see any practical performance issues. But if this 8 TB drive had NEVER been defragged? Man oh man... that 8 GB file would have had a couple hundred pieces all over the place.

Back before I went all in on SSDs as my boot drives, defragging had real discernible impacts on performance, especially booting up from scratch. Contrary to what others are saying here, having more RAM available doesn't always help. That simply hasn't been my experience. It can in some ways, so they aren't WHOLLY wrong, but they aren't wholly correct on this either.

A word of note about iDefrag. Hands-down, the best there is. Period. BUT! I don't know if I would trust it today on a drive that one is booting off of if the version of OS X isn't supported. I still use it on my media drive because there are no system files on it, but I'd worry that it could introduce problems on a newer OS like Catalina or Big Sur that it wasn't vetted for.

I recommend reading over Randy Singer's web page about basic Mac maintenance, which includes a section on defragging. It's a GREAT read and I've been referencing his material there long before he was even a member on this site.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,246
Reaction score
1,834
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
A word of note about iDefrag. Hands-down, the best there is. Period. BUT! I don't know if I would trust it today on a drive that one is booting off of if the version of OS X isn't supported.

I agree and is why I recommended it to the OP. I paid a premium price for iDefrag years ago before it was released as freeware. iDefrag should be safe to use with macOS versions up to High Sierra. I would not use it with Mojave, Catalina, or Big Sur.

And never use it on a SSD or Fusion drive.
 
Joined
Feb 1, 2011
Messages
4,902
Reaction score
2,902
Points
113
Location
Sacramento, California
Note than an SSD works entirely differently than a rotating disk hard drive. An SSD does not access data sequentially, and concepts of physical space don't apply to an SSD. An SSD always accesses all of the bits of a file instantly. So there is never any need to defragment an SSD.

Even more importantly, since an SSD has blocks that have a finite number of reads and writes before they expire, running defragmentation software on an SSD will shorten it's life with no return in exchange.
 
Joined
Aug 29, 2009
Messages
171
Reaction score
52
Points
28
Location
New York City
Your Mac's Specs
M1 Mini, M1 MacBook Air
An old, slow (5400 rpm) external drive that's being asked to deliver large (A-V) files might see better performance, but that's pretty much the only time you should consider defragging a drive. If it's so full of stuff that you need to defrag to gain usable space, you should be thinking about getting a new and larger drive.
It's been at least ten years since I defragged a drive. Today's tech just doesn't need it.
 
Joined
Feb 1, 2011
Messages
4,902
Reaction score
2,902
Points
113
Location
Sacramento, California
An old, slow (5400 rpm) external drive that's being asked to deliver large (A-V) files might see better performance, but that's pretty much the only time you should consider defragging a drive. If it's so full of stuff that you need to defrag to gain usable space, you should be thinking about getting a new and larger drive.
It's been at least ten years since I defragged a drive. Today's tech just doesn't need it.

That's really not been my experience. I've heard from Mac users whose drives were only about 60% full, yet their drives were terribly fragmented, running slow and flaky, and giving error messages.

Apple feels that if your drive is terribly fragmented, that you should just purchase a new, bigger drive. But when you're a user who has paid a couple hundred dollars for a large capacity hard drive that you expected to last a long time, when you are told that you should just give up on many tens of gigabytes of storage space that you thought that you had already paid for, and that you should pay a lot more, that doesn't tend to sound right. And it isn't.
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,236
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
An old, slow (5400 rpm) external drive that's being asked to deliver large (A-V) files might see better performance, but that's pretty much the only time you should consider defragging a drive. If it's so full of stuff that you need to defrag to gain usable space, you should be thinking about getting a new and larger drive.
It's been at least ten years since I defragged a drive. Today's tech just doesn't need it.

Wasn't my experience. At all.
 
Joined
Jan 1, 2009
Messages
16,374
Reaction score
4,728
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 16 Pro, plus ATVs, AWatch, MacMinis (multiple)
What causes fragmentation is the write process. When file is being written, the firmware looks for a contiguous area on the spinner drive in which to write the file. Absent that contiguous space, it starts writing into the largest space that is available, then jumps to the next largest open area and continues until the file is written. That is what fragmentation is, pieces and parts of files in multiple locations. The heads have to move and then wait for the sectors to arrive under the heads to be written to, and read from, so a fragmented file is slower to read and write. Spinner drives are the slowest bottleneck in most modern computers, so defragmenting a drive would often improve performance.

However, that performance kick was usually short-lived, particularly if the user manipulated large files as a regular operation. Once the contiguous space was again too small to hold a file that needed to be written, fragmentation would return. Add in that sometimes, at least in Windows, there were files that HAD to be contiguous and which were unmovable. Whenever they got written, they became a wall around which every other file had to maneuver for space.

Two factors are at play in fragmentation--file size is one and total free disk space is another. For the OP of this thread, this was the description:
My iMac has a 1TB HDD, with over 800GB free space. I may have mentioned that I don't keep large files on my hard drive, on any of my computers. .They are stored on external hard drives which are connected to my router and form my internal network.
So we have lots of free space and generally small files, both of which would suggest very little fragmentation at all. So that's why I suggested there was no need for defragging and doing so won't really have a big impact. Now if the opposite were true, that, let's say, there was only 100GB free and the use was editing large video files, even if they were under the 100GB limit by a lot, fragmentation would soon bring performance to its knees. In the case of the external drives on which large files are stored, I suspect the bottleneck is the interface and not the drive read/write speed. However, if the files are really large and the free space is tight on those drives, defragging may help some, but as I said, it will return if the files are volatile at all.

I will say that there are some obvious exceptions to the small file/lots free general rule. I remember one user in particular who complained about his machine going slower and slower over the work of each day and nothing we did fixed it for him. Finally, we asked what he was doing and the answer was that he was editing large graphic files in Photoshop, with the history level set to the maximum. So basically, for every edit there were 10 copies of the graphic file being saved on the drive in the background, driving up disk usage and driving down free space. Then when the file was finalized and saved at the end of the process, the final save would be terribly fragmented into nooks and corners of the drive because the history was still kept until the write was finalized. Only after the final write was done and the file closed in PS did those history versions get released. In the meantime, the final file was fragmented everywhere and caused problems for him when he opened the next graphic file to do the same thing. After one or two of these editing sessions, the drive would be hopelessly fragmented and performance would fall off the table. We "fixed" the problem by getting him to back down from the max history to something more workable and the fragmentation slowed down to where his drive didn't need defragging every day, just a couple of times a month. The deceptive nature of this story was that the final files were relatively small (as opposed to his free space available) but the workspace needed for PS to hold the history was consuming the drive space in large chunks, leading to fragmentation.

All of this discussion has confirmed in my mind that when it comes to drives, bigger is better. Size matters.
 
Joined
Feb 7, 2020
Messages
260
Reaction score
84
Points
28
Location
Norwich, UK
Your Mac's Specs
2008 Mac Pro 3,1 (2 x 2.8GHz Quad-core Xeon) / 16GB RAM / ATI Radeon HD 2600 XT / El Capitan 10.11.6
I've found this thread fascinating, and as a result I've downloaded the correct version of iDefrag for my OS and am now using it to defrag my main storage (spinny) drive.

I have a side-query. I have an external spinny drive that I use for Time Machine backup. Without sparking a big old debate (I hope), may I ask: is it worth defragging a TM backup drive? And even if it is, are there any potential risks in doing so? Common sense (or what feels liek it) tell me it shouldn't cause any problems, but I thought it best to ask. :)
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,236
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
I've found this thread fascinating, and as a result I've downloaded the correct version of iDefrag for my OS and am now using it to defrag my main storage (spinny) drive.

Make sure to use the "Full Defrag" option. It will give the most benefit.

I have a side-query. I have an external spinny drive that I use for Time Machine backup. Without sparking a big old debate (I hope), may I ask: is it worth defragging a TM backup drive? And even if it is, are there any potential risks in doing so? Common sense (or what feels liek it) tell me it shouldn't cause any problems, but I thought it best to ask. :)

I've never tried it myself since mine is a Time Capsule and thus on wifi, but yeah, it should. CNET has an article reviewing iDefrag from some time back and they specifically recommend it for this.
 
Joined
Feb 7, 2020
Messages
260
Reaction score
84
Points
28
Location
Norwich, UK
Your Mac's Specs
2008 Mac Pro 3,1 (2 x 2.8GHz Quad-core Xeon) / 16GB RAM / ATI Radeon HD 2600 XT / El Capitan 10.11.6
Lifeisabeach - many thanks for the info. Cute hound! :)
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,236
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
Hey, lookie what I re-discovered!
 
Joined
Feb 7, 2020
Messages
260
Reaction score
84
Points
28
Location
Norwich, UK
Your Mac's Specs
2008 Mac Pro 3,1 (2 x 2.8GHz Quad-core Xeon) / 16GB RAM / ATI Radeon HD 2600 XT / El Capitan 10.11.6
That was a really interesting read - thanks! Something to do while my drive gradually turns from red to blue! 😊
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top