[ccache] Why not using MD5?

Martin Pool mbp at sourcefrog.net
Mon Nov 15 07:25:49 GMT 2004


On 15 Nov 2004, Gunnar Ritter <Gunnar.Ritter at pluto.uni-freiburg.de> wrote:

> But a million lies within reasonable bounds. For example, compiling
> a Linux kernel produces about 1000 objects in a typical setup. Then
> if one uses a cache for two years for twenty-five projects of that
> size in the average, changing the compiler version four times within
> that period, ten versions of each project that change a global header
> will suffice to produce one million different objects. A compilation
> server for a Linux distribution with that usage pattern will then
> reach a 50 % probability of a ccache collision within these two years.

The other factor is whether the cache will grow to include a million
files.  I have a 403MB cache containing 15196 object files, for an
average of 26kB per file.  To get to a million files would be on the
order of 26GB, which is probably larger than most people would use.
There is additionally a limit on the number of files in the cache.

But regardless of this, I agree it would be better to use MD5.

--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/ccache/attachments/20041115/899ce0b1/attachment.bin


More information about the ccache mailing list