• Guest, The rules for the P & N subforum have been updated to prohibit "ad hominem" or personal attacks against other posters. See the full details in the post "Politics and News Rules & Guidelines."

Zero-filling unused sectors on NTFS? (revitalizing HDD's performance)

pandemonium

Golden Member
Mar 17, 2011
1,777
76
91
I feel a little crazy here; but hear me out!

How often do you do it? Have you ever?

I've only done it a couple times in the years I've been playing with computers with Windows. I've usually just maintained clearing temporary files and invalid registry keys with CCleaner, but decided to go ahead and try a session of writing 0's for unused space to my boot drive (which is a WD VelociRaptor WD3000HLFS @~75% filled). The results were pretty noticeable with game load times and Windows booting to desktop. My observations are admittedly subjective, and I also performed a clean graphics driver update, so this may not have been the primary cause to the boost in performance I noticed. So I'm curious if there's any merit to this. As an aside, it may just be directly related to the firmware of the HDD in question and how their data maintenance is performed. Digression aside, it has me curious.

I looked for performance comparisons - or even mention of this being a useful maintenance task - and there doesn't seem to be much of this mentioned around the net. The only site I could find to really elaborate zero-filling is here. Not that this will be a growing issue but there's still a large portion of storage devices in use being good 'ole fashioned spindle (since SSDs are still advancing in becoming the preferred storage medium at more and more affordable prices). The obvious detriment here is if you, for whatever reason, need to recover deleted data; it won't be as easy. That's not the focus here though. I'm after improvements of user experience! Aren't we all? :awe:

I didn't think of it at the time, but I really should've benchmarked this to have some numbers. Does anyone have objective analysis of how writing 0's to unused space of a boot HDD can help its performance?

If this does help, it could be a very simple performance boost to revitalize those old HDDs.

I do have another HDD that's external (WD My Book 2TB) and is about 1/2 full. I'll try benchmarking this one to determine any benefits, but I'm not sure if it'll help prove/disprove what I'm after here.

I was thinking a good test would be the following:

1. After a fresh boot, run CrystalDiskMark 3.0.2f @1000MB with 5 passes on all 4 tests read/write
2. Reboot into Safe mode, Run CCleaner and clear temporary files (default) and registry
3. Reboot to normal OS and re-benchmark with Crystaldisk
4. Reboot to Safe mode and run CCleaner again; this time clearing temporary files (default), registry, and Write 0's to unused sectors
5. Reboot to normal OS and re-benchmark again with Crystaldisk

(Part of the problem with benchmarking to determine the level of effectiveness will be that a low-level overwrite goes hand-in-hand with clearing temporary files. Steps 2 & 3 may not be completely necessary, but to determine the efficacy of writing 0's versus simply clearing up more space, I thought it'd be helpful.)

This will indeed take a while for a 2TB spindle drive that's only ~50% full, and may not really show much improvement since it's only my media storage drive. I'll get to it sometime in the near future when I have the spare time to let the low-level writing session take place. Like I said, this'll probably be a lot more useful for a boot drive. It seemed it did for me, at least.

What do you think?
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Unused space is unused. Whether it's filled with zeroes or some old garbage doesn't matter. Clearing your temp files, updating drivers, and defragging, can all make real differences.

Your link is plain wrong, as well.

1. Low level formatting refers to writing to the disk, including writing non-zeroes in locations that a disk controller expects. We haven't had to do anything like that in a long time. When it is needed, it's handled for you (such as initializing a RAID array).

2. Zero-filling an SSD wastes writes. It's not going to quickly handle zeroes better, or at least not by much, than real data. The only mass-market exception are SF drives, which compress the zeroes, effectively giving you more over-provisioned space, without TRIM. It is wrong to generalize that to all SSDs.

Zero-filling does, however, allow detection of bad sectors. But, so will a normal write.
 

glugglug

Diamond Member
Jun 9, 2002
5,340
1
0
I can't conceive of any way in which this should make a difference for a mechanical HDD, except maybe one of the ones using the new SMR tech.

For an SSD, depending on the controller, writing zeroes might be treated the same as TRIM. I would be surprised if this wasn't the case for a hashing/compressing controller like Sandforce.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
decided to go ahead and try a session of writing 0's for unused space to my boot drive ... The results were pretty noticeable ... My observations are admittedly subjective, and I also performed a clean graphics driver update
So, subjective "it feels faster" and you combined this "optimization" with a video drivers update... you know, those things that always claim huge massive performance increase with each version.
 

pandemonium

Golden Member
Mar 17, 2011
1,777
76
91
Ouch. Crucified without even so much the courtesy of being called a savior.

Either way, I'm still curious and will do some benchmarking to see if there's any merit to it.
 

ShintaiDK

Lifer
Apr 22, 2012
20,378
134
106
No effect on HDs. Some early version SSDs might benefit. But HDs simply work entirely different. They dont need to clear before writing. They simply overwrite without any performance penalty.
 
Last edited:

pandemonium

Golden Member
Mar 17, 2011
1,777
76
91
Yup, that's how it should work, but I'm curious if there is more to be found that contradicts common knowledge. We'll see.
 

KingFatty

Diamond Member
Dec 29, 2010
3,034
1
81
I think that the initial reaction is that there is no known mechanism of how this could result in a benefit - no theory can explain why it should perform better with zeros. I mean when you think of defragging a hard drive, you could imagine the operating principle of why it would improve performance in theory, and then you confirm that it in fact does.

But with writing zeroes, I'm just at a loss. If you had a phone book and I asked you to find what page "John Doe" is on, could you do it any faster if all the phone numbers were set to zero? That's kind of how I see this. The hard drive is like a honey badger, it just doesn't care if the data is a zero or not.
 

bononos

Diamond Member
Aug 21, 2011
3,745
74
91
I feel a little crazy here; but hear me out!

How often do you do it? Have you ever?

I've only done it a couple times in the years I've been playing with computers with Windows. I've usually just maintained clearing temporary files and invalid registry keys with CCleaner, but decided to go ahead and try a session of writing 0's for unused space to my boot drive (which is a WD VelociRaptor WD3000HLFS @~75% filled). The results were pretty noticeable with game load times and Windows booting to desktop. My observations are admittedly subjective, and I also performed a clean graphics driver update, so this may not have been the primary cause to the boost in performance I noticed. So I'm curious if there's any merit to this. As an aside, it may just be directly related to the firmware of the HDD in question and how their data maintenance is performed. Digression aside, it has me curious.

.....
Its odd that zero filling slack space would give noticeable harddisk read performance improvements. Or you running however slightly out of memory and its swapping to disk?
 

pandemonium

Golden Member
Mar 17, 2011
1,777
76
91
I agree it is odd, but it happened none-the-less.

No memory issues that I'm aware of. Aside from the craziness of this being a thing, the only other explanation I can think of is the zero-write may have just cleared up some bad sectors on the disk that were inappropriately being used for the paging file.

I should be able to get to the preliminary tests today on my external drive.
 

Zaxx

Member
Jan 20, 2009
38
0
61
No effect on HDs. Some early version SSDs might benefit. But HDs simply work entirely different. They dont need to clear before writing. They simply overwrite without any performance penalty.
Totally agree. The SSD is ofc an entirely different animal. My first SSD was an old gen1 Ocz Apex SSD...it uses the infamous stuttering JMicron 602 controller (the stuttering went away post WinXP). Actually, the Apex uses 2 of them internally raided together with a massive 16KB of buffer, lmao. I use a tool called AS_freespacecleaner (yes, from the same author as as_ssd) to zero out my free space on the Apex except in order for it to be of benefit, the blank space has to be filled with 'FF' vs zeros and ver .5 has a fill with 'FF' option. Since this drive does not have trim, garbage collection, smart (except for a fixed temp readout) and probably not much wear leveling ability, I 'manually' trim it out about once every couple months by using the 'consolidate free space' option in PerfectDisk followed by a run of freespacecleaner with 'FF' ticked to keep it semi fresh. It still runs like a champ as a grunt drive...even benches the same as it did FOB but that probably has a LOT to due with the extreme durability of 51nm nand it uses...lol

/end jog down memory lane...
 

ASK THE COMMUNITY