How To Defrag Your OS X?
If you feel that your OS X has slowed down, you can use defragmenting software for OS X. Apple does not provide any defragmentin g utility with OS X, but you can search for available Mac OS X defrag software in the Macintosh Products Guide . I personally use iDefrag, a very nice Mac OS X defrag utility. It is easy-to-use and comes with plenty of options. iDefrag supports HFS+, case sensitive filenames, and journaling. The demo version of iDefrag is free to use, the full version of costs $37.
You should plan to run your defragging software during a time when you'll not need to use your Mac. It can take several hours for any software to defrag a Mac hard drive; therefore I recommend you run the program overnight.
Defragmenting a hard drive requires a large amount of data to be rearranged. When you run the defragging software, there is a very slight risk of losing specific data if the software fails in recovering the data while the portion of it is in transit. So, you should keep a backup of your hard drive before running defragmentation software.
Once the defragmentation completes, notice whether your hard drive improved the Mac’s performance. Running applications and opening large files should be faster by a few seconds. When more than 75% of disk is full and then defragmented, the performance increase will be more noticeable.