2

Does hard disk drive get any damage if I open a file, append some short data to it and close it many times in a second?
A program actually does that, not me...

3

Hard drives have buffers which 'buffer' this type of activity. Even though your app may be telling the HDD to write data several times a second it is only actually writing as often as it wants to (which also happens to be several times a second but that'll still likely be less than you are writing).

Even though I've just said this is OK, I would also like to point out that this is a bad software design. You should really do this sort of thing in memory then write to the disk only occasionally. IO operations will block other IO operations, writing to a drive this frequently is going to cause other things running on your system to wait for their turn a lot.

2

Any file operation will decrease the lifespan of your HDD.

Considering if it is "harmful" is subjective, but you could easily compare it to your browser caching pages.

2

No, why should it? Disks are made for reading and writing. It doesn't harm more or less than any other activity on your disk.

You also won't overload your disk (or anything like that) since the controller will determine how many read/write operations it can take.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.