0

I have some utility, which should regularly create medium-sized plain-text file, every 10 minutes. As I understand, it will increase HDD wearout.

(I use NTFS, i.e. NT file system).

The question itself: What will be better, from the point of view to reduce the HDD wearout:

  • Use file overwriting, or

  • Remove old file and create new?

The second way is a bit simpler in my case, but I'm afraid it will cause the fast HDD amortaization.


Also, I'm new here, so I don't actually know which tags would be better suited to this question. A bit guessly, I picked up "filesystems" and "files". If someone think that tags should be added/removed, please correct me.

john c. j.
  • 15
  • 7
  • It's not going to make a significant difference on an HDD. Pagefiles do way more writing than that. An SSD, however, has significant issues with frequent writes. Reads are cheap, writes are expensive. If you're really worrying about writing to an SSD, then consider writing to an HDD instead. – Matthew Wetmore Mar 17 '17 at 21:02
  • @MatthewWetmore Thanks, it is useful knowledge for me. – john c. j. Mar 17 '17 at 21:09
  • 1
    Unless by medium-sized you mean 50% of disk size, a few writes every 10 minutes are negligible for disk wear. If it's a Windows system drive (I'm assuming from NTFS,) I guarantee that Windows will write a lot more to disk than your application. – pilsetnieks Mar 17 '17 at 21:10

1 Answers1

2

The answer is "No Applicable Effect." Medium plain text files every 10 minutes shouldn't stress a drive, since they're designed to be read from and written to on the scale of milliseconds. So either strategy should work, and not pose a higher risk of failure than the other. In addition, while small to medium files would benefit from read/write caching (as drives most efficiently read and write in blocks or sectors, not bit by bit), this is usually only a concern if many files per second are read or written. A 10-minute interval would not be impacted.

Drives that spin constantly in a consistent environment survive longer than drives that are exposed to temperature changes or ones that are spun down, then back up again, repeatedly. This means that leaving your system running is better for the drives than powering it off every day.

Caveat: Early Solid State Drives (SSD's) had a reduced Mean Time Between Failures (MTBF) when files were repeatedly erased and rewritten, because of the way files are erased from flash memory 'drives'. There were also risks of capacity reduction of these drives, if the storage used was not properly freed up. However, most modern SSD's have had these issues corrected, or at least lessened. They are also much faster to read from than mechanical drives, which make them popular as OS or application drives.

George Erhard
  • 814
  • 6
  • 12