A Defrag Simulator In Your Browser
Disk Defragmenter was a wonderful utility that Microsoft included with Windows back in the day. Back then, you’d use it to theoretically speed up disk access. Today, you can run a fun simulation right in your browser thanks to [Dennis Morello].
The theory behind defragmenting hard disks was simple. Your hard drive would store data on spinning magnetic platters. Sometimes, a given file or group of files would end up with their different parts scattered across different parts of a platter, or even multiple platters, as the file system tried to slot everything into the space available over time. On a drive accessed with a literal physical mechanism, this fragmentation of files across multiple areas of a disk could cause functional read speeds to drop. To solve this, you could defragment the drive, wherein a utility would grab disparate bits of different files and put them physically closer together on the drive platters, such that the read heads could access larger contiguous chunks of files more easily.
[Dennis’s] project does none of that. It just simulates the visuals and sound of running Microsoft’s disk defragmenter tool from Windows 98. It’s got the little rows of squares that get rearranged, blue for unoptimized data, dark blue for defragmented data, and white boxes for free space. It’s got the progress bar along the bottom, too, and a nice little simulated sound of a hard disk ca-chunking away as it shuffles little bits of data to and fro. This was the kind of thing you’d do on a rainy Saturday afternoon in the 1990s, just watching your PC make itself a few percent faster while you drank coffee and wondered if your ex-wife Jacinta was ever coming back. She never did, but you did notice that Age of Empires II loaded a fair bit quicker after you ran a full defrag on your main drive. Sometimes, that’s as good as it gets.
Modern file systems are better at managing issues like fragmentation, and the virtually instant seek speeds of solid-state drives essentially eliminated the need for defragmentation for good. Still, it’s fun to visit an ancient tool from yesteryear and remember what it meant to us way back when. Maybe you could give Jacinta a call, too, just for old times sake, and discuss that time a Janet Jackson song started crashing brand-new Windows laptops right out of the box…
Hi! On DOS 6.x there also was DEFRAG. It was based on a Symantec tool.
In the 80s and 90s, the rival product was PC-Tools COMPRESS.
Here are examples how they looked..
Defrag (DOS, ASMR video): https://www.youtube.com/watch?v=Nidwz3BzFCM
Compress (v6, DOS, real HW): https://www.youtube.com/watch?v=cDDh7l3uXXM
Compress (v7, DOS): https://www.youtube.com/watch?v=FIwrCLJSbRg
That defrag video is really odd. The disk starts out nearly empty; then magically fills ups with a lot of data. Not sure what is being optimized there. Painful to watch. Also the legend isn’t correct either. I recall the yellow hue, but wasn’t that in the legend as well?
Hi, on a closer look I noticed that, too! Thanks for pointing it out! 🙂
I mainly choosed the video because of the ASMR tag.
I thought people would enjoy that..
Here’s another one, a retro PC (CRT, real HDD) running DOS Defrag.
https://www.youtube.com/watch?v=lhjgVovLkXY
FreeDOS has a similar looking defragmenter, interestingly.
https://www.youtube.com/watch?v=dB10Rokgnnw
The irony that running a disk defragmenter on a modern computer would just shorten the lifetime of its SSD.
Hi! Well, yes and no. It depends, I think. 🙂
While defragmentation on a regularbasis surely does wear an SSD down, it’s not exactly destructive per se.
If I remember correctly, a defragmentation once a year or so isn’t bad.
It also helps to clean up the filesystem..
Especially older ones, which were not designed to have a file splittered into a thousand pieces.
(But yeah, the SSD itself doesn’t care about filesystem. It’s all about LBA sectors to it.)
Doing a disk defragmentation on 90s PCs and Macs (Norton Utilities?) might be recommended, thus, even if it has a CF/SD card or an SSD.
Again, not on a regular basis! Just once the filesystem has reached a very messy state.
In Mac world, without third-party tools (Norton, iDefrag etc),
a drive content was simple copied from A to B (to A) to cause a defragmentation effect.
Because on drive B, the copied files were written in an orderly fashion.
Or maybe I’m just talking nonsense here. It’s been a while! 😅
Newer SSDs tend to self level, prolonging their operating time. Sometimes they have more capacity than they actually display, using a chunk for replacing worn out areas. It’s all managed in the background and generally people can’t see or control the behaviour. I bet the spy agencies like it though.
On Windows (10 & 11 at least) the defrag utility can recognize SSD’s and run TRIM on them instead of the normal defrag.
to think a defrag is in the past is fairly silly..
Both ext4 and NTFS need defrag on spinning disks, and spinning disks aren’t going anywhere!
There was a brief time that ssd’s looked like they were going to replace spinning disks for data – the ssd price/GB was really starting to get there. But during the AI bubble that is simply not the case – I could buy a car (a reasonable one) for the same price that it would take to replace my spinning rust with ssds..
So defrag is alive and well – it makes quite a lot of difference to how fast your access is if the files are 1) in contiguous tracks 2) near each other on the disk, and 3) near each other in the MFT (for NTFS)…
The you read them in the right order – I do ‘platter’ walking on both ntfs and ext4….
yes, bott drive and a working directory might (should) be on a ssd, but lot’s of data isn’t…
intuitively, this strikes me as bogus. i believe — for no reason i can put my finger on — that ext2 and above do a good enough job at avoiding fragmentation in the first place, especially if your filesystem is not chronicly 95% full (like mine always was before about 2010). so i’m curious if you have any sense of actual improvements from defragging ext4??
but the real reason i know it doesn’t matter for me is that almost every read() comes from cache. that’s why i love having insanely large 32GB of RAM. maybe it was fragmented the first time it was read but that was literally months ago.
I remember reading somewhere (not sure if true) that Microsoft removed that particular visualization from the defrag tool because it proved very hypnotic. Anecdotally, I do remember watching it for what felt like hours at a time back in the early naughties. Same kind of feeling as looking at a fire burn.
There are more basic ways to achieve the same thing. In the very early days of my using DOS computers I used to back up the entire file system to a QIC tape, then format the drive and write it all back. Of course, it took a while, but that way you got a backup and defragmentation in one ;-)
Back in those days, I regularly ran defrag to increase my odds of successful data recovery in case some disaster wipes the file allocation table.
Ah yes. I remember those days. Good times. (And Jacinta never came back, thank God).
How it works
Once you click Generate, Ollama reads this article and crafts 5 comprehension questions. Your answers are graded against the article content — general knowledge won't be enough. Score 70+ to count toward your certificate.
Questions are cached — you'll always get the same 5 for this article.