Defragmenting By Stale Date

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15890
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Defragmenting By Stale Date

Post by ChrisGreaves »

Did we have defragmenters back in the days of 360K 51/4” diskettes? We needed defragmentation then (“grind, Grind, GRIND!”)
I maintain that we don’t need deragmenters for laptops and strictly personal computers; I’m OK with Defragmenting network servers and Googol machines, but today’s laptop drives are super-fast, Microsoft seems to have got a grip on caching, at long last, and Defragmenting a 7200 rpm is a want rather than a need for a discernable change in speed. (I understand that Defragmenting SSM disks is bad for the health, and that’s the whole thrust of my argument: Defragmenting any device just gets you closer to the finish-line of MTBF).

We speak of “Defragmenting a hard drive” (which to my mind means “Defragmenting Free Space only”) and “Defragmenting files”,
So here are arguments about STALE files, that is, using Date Last Modified as a trigger.

Argument (1) Defragment only those files whose Date Last Modified is more than (say) three days. (Sun Microsystems did a survey around 10-15 years ago that showed 97% of files were not changed when three days had passed after their creation). These files are stable, and would include any EXEs and DLLs that came down in the latest update or installation.
Argument (2) Defragment only those files whose Date Last Modified has changed at least twice in (say) the past six days. These files are volatile, and would include any DOCs and XLLs that the user works on on a frequent basis.

In my mind, Defragmenting my logical drives is irrational; it’s something I do because I feel that something productive should be done, but I don’t want to do any work, so I set the computer to do a pointless job because it makes me feel that I am accomplishing something.
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
John Gray
PlatinumLounger
Posts: 5458
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Defragmenting By Stale Date

Post by John Gray »

I wonder whether you could explain why a large unused ZIP file which has been defragmented along with lots of others in a partition, will in the future again get defragmented...?
John Gray

I advise you not to follow my advice.​​

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Defragmenting By Stale Date

Post by Rudi »

Defragging will only be with us for a few more years...I'm sure you can hold out for a few more....
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15890
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Defragmenting By Stale Date

Post by ChrisGreaves »

John Gray wrote:I wonder whether you could explain why a large unused ZIP file which has been defragmented along with lots of others in a partition, will in the future again get defragmented...?
My point exactly (I think).
Some years ago (in another Lounge?) I suggested that defragmenting was a waste. I especially figured that once, say, MSWord is installed, it doesn't change; that is, its files don't change, and hence do not fragment.
Now I'm thinking that defragmenting files (as distinct from drives) only makes sense on a few files that are constantly changing and are in (say) more than 2 fragments.

Defragmenting a drive in the sense of defragmenting free space (I think of free space as a single file of data that is currently still assigned to the system and not yet assigned to the user) makes sense immediately prior to a system update, so that incoming files can be written as a contiguous block.

Moving all files that have not changed in over (say) 6 days to the end of the drive and hence defragmenting them as they go would make sense; the end of the drive would then be something like an archive area.

The bottom line is that if this is so, then we need not a size-based or a number-of-fragments based system, but a time-based system of defragmentation.
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15890
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Defragmenting By Stale Date

Post by ChrisGreaves »

Rudi wrote:Defragging will only be with us for a few more years...I'm sure you can hold out for a few more....
Why only a few more years?
If you mean it'll all be cloud-based, that just shunts the problem out of sight.
Or do you mean that we'll be rid of computers soon?
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
John Gray
PlatinumLounger
Posts: 5458
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Defragmenting By Stale Date

Post by John Gray »

Rudi probably refers to SSD drives, which don't need, and shouldn't be, defragged.
John Gray

I advise you not to follow my advice.​​

User avatar
StuartR
Administrator
Posts: 12706
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Defragmenting By Stale Date

Post by StuartR »

Many years ago, on an operating system that was much more aged and venerable than Windows, we had a defragger that used an algorithm that moved files that hadn't been accessed recently towards the outer tracks of the drive, and defragged recently accessed files to the inner tracks, leaving free space in between. This way the infrequently accessed files did not need to be touched on future defrag passes, and the free space tended to stay pretty contiguous too.
StuartR


User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Defragmenting By Stale Date

Post by Rudi »

John Gray wrote:Rudi probably refers to SSD drives, which don't need, and shouldn't be, defragged.
:thumbup:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15890
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Defragmenting By Stale Date

Post by ChrisGreaves »

John Gray wrote:Rudi probably refers to SSD drives, which don't need, and shouldn't be, defragged.
Oh.
Thanks John.
Why don't they "need"?
I ask because I got into defragmenting with best-fit algorithms in core memory management in CDC 3300s 40+ years ago; best-fit and defragmenting were thought to be important in the medium of what we now call RAM memory. (A mistake on two counts since Disk is an also-RAM, and "Random Access Memory memory" just doesn't sound right).

Defragmenting seemed important with those 5.25" floppies, and perhaps even with my first hard drive (a then and now unbelievable 20MB), so in my mind defragmenting isn't about the nature of the medium.

Speed of access does it for me; there is a vast difference between 5.25" floppy drives on a 4.77MHz 64KB computer and 7,200rpm 1" diameter(?) disks on a 4GB 4GHz cached laptop nowadays.

What makes SSD so special, in terms of its composition?
Thanks, in eager anticipation ...
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15890
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Defragmenting By Stale Date

Post by ChrisGreaves »

StuartR wrote:... the infrequently accessed files did not need to be touched on future defrag passes, ...
Thanks, Stuart.
I think that "infrequently accessed" is akin to my thinking that some sort of time-based defragmenting is a good thing.
We might argue (nicely) about what constitutes time-based, whether it is "has changed any time within the past six days" or "hasn't been looked at in the last ten days", or ...

"Piriform Defraggler" has an option to move large files to the "end of the disk", and when I think "large files" I think of DLLs, EXEs and so on compared to memos in MSWord (20KB give or take)
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15890
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Defragmenting By Stale Date

Post by ChrisGreaves »

Rudi wrote: :thumbup:
All very well for you to give a thumbs up when you get paid a compliment, buddy, but why are supersonic drives so special anyway? :evilgrin:
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
DaveA
GoldLounger
Posts: 2599
Joined: 24 Jan 2010, 15:26
Location: Olympia, WA

Re: Defragmenting By Stale Date

Post by DaveA »

Why do people call them SSD Drives?
When SSD stands for "solid state drive", so they are saying solid state drive drive!
I am so far behind, I think I am First :evilgrin:
Genealogy....confusing the dead and annoying the living

User avatar
HansV
Administrator
Posts: 79030
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Defragmenting By Stale Date

Post by HansV »

ChrisGreaves wrote:What makes SSD so special, in terms of its composition?
1) Defragmenting an SSD doesn't improve performance since there are no moving parts (no read/write had that has to move along the surface), and since the logical sectors of an SSD are physically scattered through the SSD.
2) Defragmenting reduces the lifespan of an SSD since the number of writes is limited.

See for example Fragging wonderful: The truth about defragging your SSD
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15890
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Defragmenting By Stale Date

Post by ChrisGreaves »

DaveA wrote:... they are saying solid state drive drive!
Well, they've been calling them that for a period of time now :flee: :flee: :flee:
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15890
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Defragmenting By Stale Date

Post by ChrisGreaves »

HansV wrote:1) Defragmenting an SSD doesn't improve performance since there are no moving parts (no read/write had that has to move along the surface), and since the logical sectors of an SSD are physically scattered through the SSD.
So if I understand this, removal of the physical device that had to move (mass, momentum, energy, time) removes any opportunity for improvement; since there can be no delay, there can be no reduction of delay.
Is that a fair paraphrase?
2) Defragmenting reduces the lifespan of an SSD since the number of writes is limited.
Likewise, (in a very crude sense), the more you burn electricity through, say, and piece of wire which is threaded through a magnetic ferrite ring, the sooner you approach the failure of that wire?

Or is the limit due to some other characteristic?
I’ve been tidying the junk out of my shed for five years, and now can hardly get into the shed

User avatar
HansV
Administrator
Posts: 79030
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Defragmenting By Stale Date

Post by HansV »

1) If you want to put it that way, yes...

2) A more nuanced overview: The real and complete story - Does Windows defragment your SSD?
In short: recent versions of Windows do optimize an SSD; there is no need for you to defragment an SSD yourself.
Best wishes,
Hans

User avatar
BobArch2
BronzeLounger
Posts: 1243
Joined: 25 Jan 2010, 22:25
Location: Pickering, Ontario, Canada

Re: Defragmenting By Stale Date

Post by BobArch2 »

HansV wrote:1) If you want to put it that way, yes...

2) A more nuanced overview: The real and complete story - Does Windows defragment your SSD?
In short: recent versions of Windows do optimize an SSD; there is no need for you to defragment an SSD yourself.
The referenced link was very interesting, but found it very "heavy reading" with a lot of view points.

Last week I bought an HP Stream 7 tablet from the Microsoft Store for Cdn$99 running Windows 8.1 and it also came with Office 365 Personal and a $25 MS Store Gift Card. Could not pass up the deal to add a new toy to the collection. The O/S and software run on a 32GB eMMC device, very similar to the SSD. Windows 8.1 ID'd the device as a SSD and the defrag setting was set to ON. I immediately turned the setting to OFF since that is how my desktop PC SSD device is configured.

After reading the many viewpoints depicted in your link, I am not too sure I needed to turn the settings off. Very confusing to say the least. :grin:
Regards,
Bob

User avatar
HansV
Administrator
Posts: 79030
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Defragmenting By Stale Date

Post by HansV »

I think you can leave it on - Windows is smart enough to know what to do with a hard disk and what to do with an SSD during its automatic disk maintenance.
I would *not* run a third-party defragmenter such as Defraggler or Auslogics Disk Defrag on an SSD.
Best wishes,
Hans

User avatar
PaulB
SilverLounger
Posts: 1610
Joined: 26 Jan 2010, 20:28
Location: Ottawa ON

Re: Defragmenting By Stale Date

Post by PaulB »

I'm having a senior's moment, Bob. Could you point me to where I can find that defrag setting.
Regards,
Paul

The pessimist complains about the wind. The optimist expects it to change. The realist adjusts his sails.

User avatar
HansV
Administrator
Posts: 79030
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Defragmenting By Stale Date

Post by HansV »

If you're on the desktop, press the Windows key or click the Start button to activate the Start screen.
Type optimize (or type defragment), then click Defragment and Optimize Drives.
Click the "Change settings" button to alter the optimization settings; you can specify which drive(s) the settings apply to.
Best wishes,
Hans