Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The equivalent linux question reminded me of the bad performance of my MacBookPro. I'm not even sure what the default FS nowadays is. I read somewhere that there is a cron job which runs on friday or saturday which does such stuff.

So do I need to defrag my disk? And if, How would I do that?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

With the default file system JHFS+ or Mac OS Extended (journaled), recent versions of Mac OS X defragment some things automatically. However, if you use large files or have a very full disk you may benefit from defragmenting.

If large amounts of contiguous space are occupied by multiple swapfiles at /private/var/vm then restarting the System can temporarily free the space used by all but one of those files, and so possibly allow other types of file to be written — without fragmentation — in that space.

See "About disk optimization with Mac OS X"

iDefrag is one product listed in Apple database that also states it doesn't touch the "Hot Zone" which is an area of the disk used by OS X to optimize disk access. They have a demo version you could try.

share|improve this answer
    
A very good tool for general OS X disk management is prosofteng.com/products/drive_genius.php – in addition to defragmentation, it also does error recovery, scanning and similar maintenance tasks – and you can burn a bootable DVD with it, which'll come in handy if you ever have disk problems :) –  mikl Apr 30 '09 at 14:50
    
The gist of the answer "… you may benefit …" gets my vote up. The article referenced has been archived and is no longer updated by Apple. (February 2010 edition removed a reference to another archived article; it's otherwise no different from the June 2008 edition (crawled around that time) — not applicable to Snow Leopard Mac OS X 10.6 or Lion Mac OS X 10.7. –  Graham Perrin Aug 18 '11 at 8:44

Adding to Glenn's answer, Amit Singh has done thorough testing and written a tool hfsdebug. In his results, he concludes:

Defragmentation on HFS+ volumes should not be necessary at all, or worthwhile, in most cases, because the system seems to do a very good job of avoiding/countering fragmentation.

share|improve this answer
1  
The conclusion is reasonable based on results, but the author begins with a note: "… sampled too few a volume to generalize my "results" …". –  Graham Perrin Aug 18 '11 at 8:25

protected by Michael Hampton Sep 16 '13 at 6:15

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.