Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 – 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
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 or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

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.