Below are several digital images illustrating data degradation. All images consist of 326,272 bits. The original photo is displayed on the left. In the next image to the right, a single bit was changed from 0 to 1. In the next two images, two and three bits were flipped. On Linux systems, the binary difference between files can be revealed using 'cmp' command (e.g. 'cmp -b bitrot-original.jpg bitrot-1bit-changed.jpg').
0 bits flipped
1 bit flipped
2 bits flipped
3 bits flipped
Data degradation in dynamic random-access memory (DRAM) can occur when the electric charge of a bit in DRAM disperses, possibly altering program code or stored data. DRAM may be altered by cosmic rays or other high-energy particles. Such data degradation is known as a soft error.ECC memory can be used to mitigate this type of data degradation.
Data degradation results from the gradual decay of storage media over the course of years or longer. Causes vary by medium:
Solid-state media, such as EPROMs, flash memory and other solid-state drives, store data using electrical charges, which can slowly leak away due to imperfect insulation. The chip itself is not affected by this, so reprogramming it once per decade or so prevents decay. An undamaged copy of the master data is required for the reprogramming; by the time reprogramming is attempted, the master data may be lost.
Magnetic media, such as hard disk drives, floppy disks and magnetic tapes, may experience data decay as bits lose their magnetic orientation. Periodic refreshing by rewriting the data can alleviate this problem. In warm/humid conditions these media, especially those poorly protected against ambient air, are prone to the physical decomposition of the storage medium.
Optical media, such as CD-R, DVD-R and BD-R, may experience data decay from the breakdown of the storage medium. This can be mitigated by storing discs in a dark, cool, low humidity location. "Archival quality" discs are available with an extended lifetime, but are still not truly permanent.
Most disk, disk controller and higher-level systems are subject to a slight chance of unrecoverable failure. With ever-growing disk capacities, file sizes, and increases in the amount of data stored on a disk, the likelihood of the occurrence of data decay and other forms of uncorrected and undetected data corruption increases.
Higher-level software systems may be employed to mitigate the risk of such underlying failures by increasing redundancy and implementing integrity checking and self-repairing algorithms. The ZFSfile system was designed to address many of these data corruption issues. The Btrfs file system also includes data protection and recovery mechanisms, as does ReFS.