Scott Rotondo wrote: > Garrett D'Amore wrote: >> Scott Rotondo wrote: >>> In any case, I think it's safe to conclude that SHA-256 is more than >>> adequate for filesystem block equality comparisons. >> >> That's true today. At what point will Moore's law catch up >> though? (In other words, how long will it take for storage >> densities to reach the point where where the risk of a collision >> becomes significant?) Start from a petabyte (probably about the >> largest practical filesystem size in use today), and double every 12 >> months. (I think storage has been outpacing Moore somewhat.) >> > > To answer that question, consult the table Krishna provided: > http://en.wikipedia.org/wiki/Birthday_paradox#Probability_table > > First, select an acceptable collision probability. Let's choose > 10^-18, which is the smallest probability found in the table, and > (according to the same article) at the low end of the uncorrectable > bit error rate for a typical hard disk. > > According to the table, SHA-256 can handle 4.8 x 10^29 (approx 2^98) > blocks given our acceptable collision probability. That exceeds the > ZFS limit of 2^64 *bytes* per filesystem. > > If we ignore the ZFS limit on filesystem size, and assume a disk block > is 2K bytes, that's 2^59 petabytes. Your assumed rate of filesystem > growth means we'll need a new plan in 60 years.
The fact that it exceeds the 2^64 limit is good enough for me. :-) -- Garrett > > Scott >