Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

stuart2102

macrumors regular
Original poster
May 29, 2011
205
0
Can we defrag our disk in mac just like in PC? if there is how or how are we going to taking care for our hard drive? im a new shifter user from PC to Mac so my concern is if there is the caring of hard drive in Mac as i do in PC
 

GGJstudios

macrumors Westmere
May 16, 2008
44,545
943

Intell

macrumors P6
Jan 24, 2010
18,955
509
Inside
The HFS+ filesystem automatically defragments the hard drive to a certain degree. That coupled with modern drives not benefiting much from defragmenting, makes it rather unnecessary on Macs.
 

stuart2102

macrumors regular
Original poster
May 29, 2011
205
0
Ahh okay thanks for this info oh yeah i might be wondering on partitioning i have 150gb on my booth camp and it seems i dont used it anymore is there anyways to delete from booth camp and recover that 150gb to put back on my mac as additional drive?
 

monkeybagel

macrumors 65816
Jul 24, 2011
1,141
61
United States
I agree with the other statements about the need to do it - Windows machines are bad to load a lot of code during startup and make startup slow. Defragging helps startup times and application load times on occasion. OS X doesn't seem to suffer from the same performance hits in these areas.

You can do it with a third party applications

http://www.coriolis-systems.com/iDefrag.php

I have used this application as mentioned above to consolidate data and partition the drive, and it worked fine.
 

sk8r1230

macrumors 6502
Aug 3, 2010
351
49
Indiana
i still defrag my hdd's in my macs osx only takes care of certain files and has file size limits on what it auto defrags. ur statement about not being needed on new tech hard drives is very incorrect unless you are referring to ssd's. a hard drive is a hard drive. it spins and reads and write files. if files are fragmented then it finds them slower which in turn creates a slower working environment. i use drive genius 3 to keep an eye on fragmentation and run as needed
 

forty2j

macrumors 68030
Jul 11, 2008
2,585
2
NJ
i still defrag my hdd's in my macs osx only takes care of certain files and has file size limits on what it auto defrags. ur statement about not being needed on new tech hard drives is very incorrect unless you are referring to ssd's. a hard drive is a hard drive. it spins and reads and write files. if files are fragmented then it finds them slower which in turn creates a slower working environment. i use drive genius 3 to keep an eye on fragmentation and run as needed

Did you read the links GGJstudios posted? In those, it's pretty clear that for normal use, defrag is not at all required; between HFS+'s method of storage and caching, there's no additional benefit. However, they do state that if you routinely use large media files, then there is a benefit.
 

Fishrrman

macrumors Penryn
Feb 20, 2009
28,442
12,555
Others will reply that you "don't have to defrag with the Mac OS", but that's "bending the truth", as Mr. Twain would say.

EVERY OS, no matter which one, eventually gets fragmented and slows down. The current Mac OS is no exception.

OS X has the ability to automatically defragment -some- files, but there are limitations to what it does. For example, only smaller files are so defragmented, and the OS does NOTHING to re-concactenate fragmented "open space" on the drive platters.

For Macs, you might look into "iDefrag":
http://www.coriolis-systems.com/iDefrag.php
(disclaimer: I have no association with this company)

"Drive Genius" can also defrag (but does not offer all the options of iDefrag).

I'm not certain if the free iDefrag demo will do this (without paying the registration fee), but it -might- permit you to "view" your drive, and check the condition of the platters insofar as fragmentation is concerned. If it permits this, you may be shocked at just how "broken up" the data is on the drive.
 

forty2j

macrumors 68030
Jul 11, 2008
2,585
2
NJ
I'm not certain if the free iDefrag demo will do this (without paying the registration fee), but it -might- permit you to "view" your drive, and check the condition of the platters insofar as fragmentation is concerned. If it permits this, you may be shocked at just how "broken up" the data is on the drive.

It doesn't make a lick of difference how far apart individual files are on the drive. All that matters is if a particular file gets spread all over the drive. In OS X, that only happens on extremely full drives, or if you are editing large media files. Again, read the readily-available information.
 

sk8r1230

macrumors 6502
Aug 3, 2010
351
49
Indiana
Did you read the links GGJstudios posted? In those, it's pretty clear that for normal use, defrag is not at all required; between HFS+'s method of storage and caching, there's no additional benefit. However, they do state that if you routinely use large media files, then there is a benefit.

I didn't need to read the link as I have already done the research and made up my mind. Ur posts just proves what I already said just in different words. In the end check ur drive. If it needs it do it. Seems simple
 

stuart2102

macrumors regular
Original poster
May 29, 2011
205
0
im actually doing HD video editing on my imac so for now im still gathering information and search on which is which defrag or not to be defrag hehehe
 

theSeb

macrumors 604
Aug 10, 2010
7,466
1,893
none
Drive Genius 3 is the best application for this. It's a bit pricy, but it's what the Apple Store techs use as well.
 

throAU

macrumors G3
Feb 13, 2012
8,944
7,103
Perth, Western Australia
The HFS+ filesystem automatically defragments the hard drive to a certain degree. That coupled with modern drives not benefiting much from defragmenting, makes it rather unnecessary on Macs.

This is a crock.

HFS, or any FS can only do so much (HFS is allegedly better than NTFS), and putting frequently accessed files at the start of the disk can increase access speed to said files on a spinning disk by a factor of 2x vs them residing at the end of the disk. I've shrunk and re-expanded my drive to force this to occur and it has sped my mac up significantly.

Defragmentation is not "necessary" but to say there is no performance benefit from proper file placement, and non-fragmented files is simply wrong and impossible without violating the laws of physics - no matter how old the disk - if it spins and has a head it still will benefit from proper file placement. If a file is split into noncontiguous areas of the disk, it takes longer to access. if it is at the end of the disk, it takes longer to access.

And OS can attempt to minimise splitting files up, but it WILL eventually happen - especially so if you have little free space.

If you save a file, save another file, then increase the size of the first file, it will fragment. To not fragment, the OS would need to re-read the entire file and copy it to another contiguous area of the disk of adequate size (which may not exist) and this would take longer than simply creating a fragment, killing IO. Or, if the entire file contents is in ram, write the entire contents again vs update a small area that was changed / added. Either way, interactive IO is shot to pieces. So that's not what happens - and files get fragmented.

time machine local snapshots on a portable mac (with Lion) probably make this even worse - as even if the file doesn't grow, the new writes are NOT written to the original sectors - they're appended elsewhere on the disk and then rolled back into the original file (?) when the old snapshot is expired. thus, the file is fragmented.


SSD? Different story...


If you're looking to do video editing on spinning disks, here's a tip:

create a scratch partition at the start of your disk for this as a temporary work area. Format it when you're done working on the file(s) and have copied them to permanent storage. You'll maintain a non-fragmented area of your drive, and the start of the drive is the fastest part.


Apple/users can attempt to spin this all they like. Fragmentation happens - and yes it hurts spinning disk performance.

No matter how big the amount of data you are reading/writing is - a SATA 7200 rpm drive can only do about 150 random seeks per second (5400 rpm = worse). As an extreme example: If it has to do say, 50 random seeks to read your file it doesn't matter if it is 150k or 15mb, it will be read into memory in about the same time. Sequential transfer speed is pretty fast. It is seek time that kills it.

Microsoft claimed that NTFS didn't need defragmentation either. Until they included defrag tools for it :D
 
Last edited:

forty2j

macrumors 68030
Jul 11, 2008
2,585
2
NJ
If you save a file, save another file, then increase the size of the first file, it will fragment. To not fragment, the OS would need to re-read the entire file and copy it to another contiguous area of the disk of adequate size (which may not exist) and this would take longer than simply creating a fragment, killing IO. Or, if the entire file contents is in ram, write the entire contents again vs update a small area that was changed / added. Either way, interactive IO is shot to pieces. So that's not what happens - and files get fragmented.

One of the things HFS+ does is make sure files aren't directly adjacent. If there's room on the disk, it will keep the files spread out, so that there will be room for them to grow if needed.

It is, in some situations, possible for files in HFS+ to become fragmented.. but I think what we're saying here is that the typical user needn't worry about it and that adding a defrag into regular maintenance is far from necessary. In fact, I believe a standard defrag would then begin to defeat HFS+'s own fragmentation protection.

Also, from Apple's support article:
Apple said:
Note:Mac OS X systems use hundreds of thousands of small files, many of which are rarely accessed. Optimizing them can be a major effort for very little practical gain. There is also a chance that one of the files placed in the "hot band" for rapid reads during system startup might be moved during defragmentation, which would decrease performance.
(Emphasis mine)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.