Resolved Question about defragging

Discussion in 'Mac Pro' started by UncleSchnitty, May 13, 2014.

  1. UncleSchnitty, May 13, 2014
    Last edited: May 15, 2014

    UncleSchnitty macrumors 6502a

    UncleSchnitty

    Joined:
    Oct 26, 2007
    #1
    I know questions about defragging have been asked before but I'm having trouble finding an answer on this. I am wondering if defragging will help on my secondary/media drive. Its a 3tb drive that has been slowing down recently, scrolling thru files while watching a movie off it will cause the movie to jitter as I scan. The drive is about 3 years old and is 2/3 full but thats 1tb of free space.
    Again this is NOT my system drive, thats a ssd so I know it shouldn't be touched with defrag.
    Like always any suggestions would be appreciated.
     
  2. Yahooligan macrumors 6502a

    Yahooligan

    Joined:
    Aug 7, 2011
    Location:
    Illinois
    #2
    This is the official answer from Apple.

    http://support.apple.com/kb/ht1375

    So, if you do think it's a problem then you could use a 3rd party app to defrag the drive and see if it helps but chances are it probably won't help.
     
  3. UncleSchnitty thread starter macrumors 6502a

    UncleSchnitty

    Joined:
    Oct 26, 2007
    #3
    I read that about an hour ago and unfortunately it doesn't really help because that addresses osx slowing and not a secondary drive that has many large files on it. In fact most of the articles I read were about system drives and how small files are automatically "defraged" also a lot of the suggestions were verify permissions if you have performance issues. Well obviously that doesn't pertain to secondary/media drives either.
     
  4. AidenShaw, May 13, 2014
    Last edited: May 13, 2014

    AidenShaw macrumors P6

    AidenShaw

    Joined:
    Feb 8, 2003
    Location:
    The Peninsula
    #4
    Actually, occasional (say every few months) defragging of an SSD is beneficial. (Daily/hourly/continuous is not a good idea.)

    Although an SSD has no "head motion" penalty -- it costs CPU and latency for each fragment of a file that has to be written or fetched.

    If a file is in tens or hundreds of thousands of fragments, access is significantly slower than for files in a few fragments. This slowdown is at the OS filesystem level - many more IOs are needed (each with a CPU and latency cost), and when writing a file the filesystem has to work harder to find free space if it's only available in small chunks scattered across the LBA range.

    Note that the standard advice is not to run the SSD close to full -- it's not a coincidence that disks with a small percentage of free space suffer from much more fragmentation. (Although, TBH, if you have TRIM enabled a nice buffer of unused space also helps the internal garbage collection on the SSD.)

    SSDs are not the fragile "OMG don't write to it" devices that some believe - a little housecleaning doesn't really affect the life of the drive.
     
  5. paulrbeers macrumors 68040

    Joined:
    Dec 17, 2009
    #5
    No. Media is not something you constantly delete and write to. Even if you do, the files are "large" thus you are leaving "large" gaps (not just a sector or two like what happens with system files and/or documents and/or internet cache). Therefore, there is usually very little benefit to defragging a Media Drive. I have 18+ TB worth of media that has never been defragged.

    Now, if you have 3TB of Media that is on a drive that is 3+ years old, it might be time to consider getting yourself a backup drive if you don't have it already or else.....
     
  6. AidenShaw macrumors P6

    AidenShaw

    Joined:
    Feb 8, 2003
    Location:
    The Peninsula
    #6
    You're mostly on-target - but defragging as an experiment won't do any damage. To UncleSchnitty - if you can find a reputable defragger with a trial period - see if it helps.

    But you (PaulRBeers) are off-target on the quoted bit - modern filesystems allocate space in units of a handful or four of sectors. (New AF drives have increased the sector size to the typical allocation unit size, which doesn't get you the bulls-eye but at least you're hitting the target.)

    Once you pass the 16 TiB filesystem size, even the AF sector size can be too small for an allocation unit. When I put my new 6-core E5-1650v2 system online, I used a 20 TB volume for one filesystem. It raised the base allocation unit to 8 KiB (two AF sectors, sixteen traditional sectors).

    Things have changed since the 90's, you need to keep up.
     
  7. flowrider macrumors 601

    flowrider

    Joined:
    Nov 23, 2012
    #7
    I believe using TRIM sort of obviates the need to defragg an SSD.

    Lou
     
  8. paulrbeers macrumors 68040

    Joined:
    Dec 17, 2009
    #8
    So let's recap.... I took time out of my day to provide an ACCURATE assessment to a stranger on the internet that I will never meet.

    However, you needed to flex your extensive knowledge of file systems to prove your superiority simply because I used sector vs allocation unit. Got it.

    Then you insulted me. Got it.

    You win the internet today sir!
     
  9. UncleSchnitty thread starter macrumors 6502a

    UncleSchnitty

    Joined:
    Oct 26, 2007
    #9
    I would just like to say thank you to everyone for taking the time to talk about this with me. In fact I think it helps me learn a lot when people on here have apposing stances. All of this is very useful to me
     
  10. macuser453787 macrumors 6502

    Joined:
    May 19, 2012
    Location:
    Galatians 3:13-14
    #10
    FWIW, I've seen defrags make somewhat of a difference in performance, albeit not a large leap, but some. And just FYI if you're not already aware, Drive Genius is a great utility for defragging among several other things.
     
  11. UncleSchnitty thread starter macrumors 6502a

    UncleSchnitty

    Joined:
    Oct 26, 2007
    #11
    Thank you, I have a copy of idefrag I never used. Iactually don't remember how I got it hah I use onyx for all other maitanence.
    I think I'm going to run the defrag to see what happens. I have a backup if things go terribly wrong. Hopefully after it runs I can report back if I noticed a difference
     
  12. macuser453787 macrumors 6502

    Joined:
    May 19, 2012
    Location:
    Galatians 3:13-14
    #12
    Haven't heard of idefrag, but okay that sounds like a plan. Please do let us know if you see a difference. :)
     
  13. AidenShaw macrumors P6

    AidenShaw

    Joined:
    Feb 8, 2003
    Location:
    The Peninsula
    #13
    TRIM is unrelated to defrag - the two do completely different things.
     
  14. phrehdd macrumors 68040

    phrehdd

    Joined:
    Oct 25, 2008
    #14
    This is a rather broad topic as to why drives seem "slow" at times.

    Here is a little test you can do if you have an extra drive - back up that drive in question and then (assuming you backed it up properly) restore it to the drive in question. You might want to before restoring do a disk utility check to make sure the drive is performing correctly.

    What this will do is typically repack the drive without significant numbers of fragments. This is an old way of doing things that some I.T. folks use.
    1) back up
    2) check drive in question
    3) restore

    As for iDefrag, a reasonable tool with some additional features related to the OS db/indexes that can be rebuilt or packed.

    Where SSD is concerned, I am in the other camp and would not bother defragging but might do the above. Defragging moves data around and as such, SSDs have their own write life cycles being shortened (though probably not too significant if only done once in a while). Also, SSD is not the same as an electro-mechanical drive where fragments are concerned and the amount of CPU cycles is not too relevant or rather insignificant for a "fragged" SSD.
     
  15. AidenShaw macrumors P6

    AidenShaw

    Joined:
    Feb 8, 2003
    Location:
    The Peninsula
    #15
    But the additional CPU cycles and latency are significant for a heavily fragmented SSD.

    The filesystem has to create an IO request, send it over serial lines to the disk, the disk has to decode the packet, do the transfer, and send the response to the filesystem.

    This has to be done for each fragment, and if the filesystem isn't heavily multi-threaded, the latency can be significant with an SSD. (The latency for a spinner is of course much higher, since disk rotation and head movement are involved.)
     
  16. flowrider macrumors 601

    flowrider

    Joined:
    Nov 23, 2012
    #16
    I understand they're different things. But, IMO, they are not unrelated. TRIM erases SSD previously used space using garbage collection techniques thereby releasing that space for use. That was what was meant by my comment.

    However, both techniques strive for the same goal. To Improve Performance.

    Lou
     
  17. UncleSchnitty thread starter macrumors 6502a

    UncleSchnitty

    Joined:
    Oct 26, 2007
    #17
    I have checked the drive with diskutil and disk warrior, I backed up, now I'm running the defrag(its been going about 12 hours hah)
    My original question was rather simple, should I defrag a large mechanical drive after years of use with large files that have been moved offten? It got a little conveluted with the fact that its not my system drive that's a ssd. I don't defrag my ssd because its newish and only has about 65gb of data. But I am also in the other camp that I don't really have to.
    Either way I'll post the results of my defraging on the large drive after I check it out(its about 3/4 done)
     
  18. AidenShaw macrumors P6

    AidenShaw

    Joined:
    Feb 8, 2003
    Location:
    The Peninsula
    #18
    I consider them unrelated since TRIM does nothing to reduce the extra CPU cost and latencies associated with fragmented files.

    Cache has the goal of improving performance, does that make it related to TRIM and defrag? ;)

    In any event, I was talking about severely fragmented SSDs benefiting from an occasional defrag.
     
  19. phrehdd macrumors 68040

    phrehdd

    Joined:
    Oct 25, 2008
    #19
    Again, if you backed up the entire drive, then restored it using a tool like CCC or SuperDuper, it repacks the drive. This would take far less time than a defrag. The restore goes by file and not position on a given disk. This means that if you have 10,000 files, each one is copied over and thus avoids a fragmented state (for the most part). Given that this is not your primary disk with the OS but a storage disk, you really should try the repacking process.

    If I understand correctly you have some larger files on your drive (media files) and that would explain the lengthy time required for defragging as quite a bit of movement is required to gain space to make files contiguous. Also, defragging is heavily dependent on percentage* free space available.

    Having used iDefrag in the past I found it works reasonably well. Then again, I have also used the back up and restore (copy back the back up to the original disk) with excellent results.
     
  20. UncleSchnitty thread starter macrumors 6502a

    UncleSchnitty

    Joined:
    Oct 26, 2007
    #20
    That is an excellent suggestion and it makes a lot of sense. If I hadn't started the defrag last night I definetly would have tried that out. Its funny my first instinct would have been that CCC copy's sector by sector including the fragmented and blank spaces but that would take hours and hours when CCC takes a fraction of that. Hmm excellent point.
     
  21. phrehdd macrumors 68040

    phrehdd

    Joined:
    Oct 25, 2008
    #21
    Always a next time. Best luck to you on your defrag and gaining some better results from your drive. Many of us have gone through similar issues one time or another and its all a learning experience.
     
  22. UncleSchnitty thread starter macrumors 6502a

    UncleSchnitty

    Joined:
    Oct 26, 2007
    #22
    So I let the defrag run and after many many hours it finished. After looking around folders and loading a few things it seems that it DID end up fixing the slowdown I was experiencing. There is less lag when opening files, previews for pictures pop up quickly, when watching a video and simultaneously searching for a file I don't get the lag there either.
    I would like to thank everyone for their time and suggestions. I guess we can now say on a healthy large drive with many many large files that doing a defrag will help with some slow down.
     
  23. macuser453787 macrumors 6502

    Joined:
    May 19, 2012
    Location:
    Galatians 3:13-14
    #23
    And there you have it! :)
     
  24. Dr. Stealth macrumors 6502

    Joined:
    Sep 14, 2004
    Location:
    SoCal
    #24
    Ding Ding Ding.... This is the correct answer! :D
     
  25. crjackson2134 macrumors 68020

    crjackson2134

    Joined:
    Mar 6, 2013
    Location:
    Charlotte, NC
    #25
    I'm going to put in my 2¢ worth of input just because I'm bored. I have a lot of years of wasted time playing with defraggers and have learned that when dealing with the various popular file systems for Unix derivatives it's generally a waste of time. If you have modified and replaced so much data that it's actually causing a performance problem, there is a faster and safer alternative that won't overheat your drive (I have to assume we're discussing electro-mechanical spinners), or rely on the quality of the tool which sometimes proves to be not so great when working with many Terabytes, and may cause data loss.

    I find it much more efficient to copy the data to a different drive, reformat the fragmented drive, then copy the data back. This is generally much faster, and gets mostly similar results. This also produces less wear to the actuator parts and less internal heat.

    IMHO it's much better to use the copy method if you REALLY need to reduce data fragmentation.

    If it's a system drive, a backup & restore can accomplish the same thing.
     

Share This Page