Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are the effects of continuously writing and deleting files on a magnetic hard disk? Specifically, do these files continue to be written on the recently cleared space or is there some sort of balancing mechanism to even out the wear on the drive?

Details on my situation: I have a batch of performance testing machines that constantly write and delete data to and from their individual magnetic hard drives. I keep replacements available and I'm not worried about data loss, just availability and comparable performance between drives (I can't switch to SSD, for instance). Is there anything I can do to extend the life of these drives or is uneven wear a necessary consequence of constant r/w testing?

share|improve this question
up vote 3 down vote accepted

Magnetic hard drives don't experience wear the same way SSDs do. My understanding of the physics at work say that each block can undergo on/off state changes for very long times. For workloads like you describe magnetic media should last quite some time, so long as you get enterprise drives.

Another variable here is the filesystem used. When a file is deleted it could be only a few blocks get updated in the metadata of the filesystem and the blocks of the file are never touched. Others may actually zero those blocks which would be a long write, though such configs are rare. The access patterns you describe are likely just mostly write to the disk.

As for balancing, again that depends on the filesystem in use. The blocks containing the metadata will be hit a lot more often than the blocks containing files, so if wear were an issue those would be the blocks that would wear out first. Some filesystems will purposely not overwrite recently deleted files expressly so such files are easier to recover. Others don't care. Some filesystems, such as XFS, write to the Superblock constantly; so much so that on SSDs that don't have wear-levelling that block can die within weeks. And yet, on magnetic media those blocks are seldom the first to go.

share|improve this answer

With the current hard drives there is no effect to the drive itself. The heads don't actually touch the platter surface and the magnetic properties of the platter can handle constant reads and writes up to the MTBF of the drive; no "balancing required". As for performance that depends on the OS. For windows make sure the drives are defragged as required.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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