Coffeehouse Thread

11 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Is it necessary to defrag hard drives anymore ?

Back to Forum: Coffeehouse
  • User profile image
    rodneyMc

    I'm a bit confused with hearing you don't need to defrag with regular drives or SSD. Is this also because the size of our HD now are so enormous. If we don't need them then why do they still have the built in system defrag as well as others such as Defraggler and Auslogics, etc,.  

  • User profile image
    Bas

    Doesn't Windows defrag stuff in the background nowadays? I don't think running the defrag tool manually even does anything anymore since Vista.

  • User profile image
    spivonious

    Vista+ defrags on a scheduled basis. By default, I think it's Sundays at 2AM.

    Defragging SSDs is pointless, as the access time is uniform across the drive, and would only serve to wear out the drive faster.

    Defragging HDDs is useful, as it moves the most used files to the outer edge of the disk, making them faster to access. It also ensures that all fragments of a file are physically together.

    The size of a disk has no bearing on how fast the files get fragmented.

  • User profile image
    evildictait​or

    This is a question that comes down to three things - your base operating system, filesystem and the physical medium (e.g. SSD).

    In terms of operating system, Bas is right - windows runs a scheduled task to defrag your filesystem once a week, so for end-users you shouldn't ever need to defrag your disk.

    But that doesn't answer the question of whether defragging your disk is necessary - if just means that perhaps you don't need to initiate it because your OS is doing it for you.

    The next variable is the filesystem itself. The old style FAT filesystem which is the default in Windows XP fragments much more quickly than NTFS due to differences in how NTFS allocates individual clusters and inodes - this is particularly noticable for files which are written massively out of order (the best example I can think of is torrents which download random pieces of the file out of order).

    This answers whether you need to start defragmenting yourself (you don't) and whether the filesystem gets fragmented in the first place - but it doesn't answer whether fragmentation on the disk is actually always a bad thing.

    To answer this we need to understand what fragmentation means. Suppose you have a file that is distributed in 10 places on the disk and you try and read it all into memory. On old-fashioned disk platters this might require spinning the disk up, seeking to a position, and then reading the data from the disk. You then seek to the next fragment and read it and so on until the file read is complete.

    Speeding up file access is all about reducing these times. Multi-disk platters and inode "striping" allow multiple disks to be read simultaneously (modern filesystems such as NTFS are optimised to do this) allows this to happen in parallel, reducing file-fragmentation reduces the number of seeks and high-density disks reduce spin-up time, but on modern SSDs when spin-up and seek time are almost zero - it probably doesn't even matter if your files are splattered across the disk, other than making life easier for the hardware SSD cache if the fragments are less than an SSD cache page in size (which for NTFS and REFS they aren't).

    So in essence, the answer is no. You don't need to defrag your hard-disk because on Vista and above it defrags itself, on NTFS and above it has relatively low fragmentation anyway, and on SSDs and above it probably wouldn't even matter if it were fragmented anyway.

  • User profile image
    magicalclick

    @rodneyMc:

    There are still uses for it, so, the tool is there when you need it. I rarely do it (my PC is powered off at schedule time as well). However, there are users doing defrag frequently (weekly) and thinking that will help them, so, it is very important to please those users.

    Leaving WM on 5/2018 if no apps, no dedicated billboards where I drive, no Store name.
    Last modified
  • User profile image
    Proton2
  • User profile image
    cheong

    Btw, anyone knows that will running defrag tools destroy Shadow Copies?

    Recent Achievement unlocked: Code Avenger Tier 4/6: You see dead program. A lot!
    Last modified
  • User profile image
    JoshRoss

    I would say if you have to ask, then no. And I'm not saying this just to be pertinacious. It's not like  changing the oil in your car, where if you don't then the engine will blow-up or something like this. But, I do believe that the psychological consequences of concerning yourself with such things is far worse than the reality of it. Plus, it's a slippery slope. It starts with defraging your hard drive, then you move on to registry cleaners, spyware sweepers, etc. Just say no.

    -Josh

  • User profile image
    evildictait​or

    , cheong wrote

    Btw, anyone knows that will running defrag tools destroy Shadow Copies?

    No. Defragmenting the disk only moves physical data around on the disk medium. It does not change the logical drive structure, so all files (including pseudo files such as the shadow copy, $Volume, $Corrupt, etc files) will stay the same.

  • User profile image
    blowdart

    , evildictaitor wrote

    *snip*

    No. Defragmenting the disk only moves physical data around on the disk medium. It does not change the logical drive structure, so all files (including pseudo files such as the shadow copy, $Volume, $Corrupt, etc files) will stay the same.

    Not exactly. Diskeeper, for example, has two modes, one which can remove shadow copies, one which can't. If you're defragging a large file you need contiguous space to put it on, and so shadow copies can get in the way of that, so they may get removed. Not so sure about the built in one though,

  • User profile image
    evildictait​or

    , blowdart wrote

    *snip*

    Not exactly. Diskeeper, for example, has two modes, one which can remove shadow copies, one which can't. If you're defragging a large file you need contiguous space to put it on, and so shadow copies can get in the way of that, so they may get removed. Not so sure about the built in one though,

    OK - if you're using other utilities that mess around with the on-disk storage then all bets are off. I'm sure there are ones out there that will empty the recycle bin and clear your internet cookies too if you look hard enough.

    The inbuilt NTFS one (which is the only one I know anything about) will crush the journal and NTFS-backlog and will change the cluster and disk bitmap as part of shuffling stuff around, but apart from that all of the other NTFS disk structures will be logically the same.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.