The Samba-Bugzilla – Bug 6946
Last modified: 2009-12-05 00:32:10 UTC
Currently if multiple users using group write permissions update the same folder then they can't always update file timestamps. This is because the file may be owned by a separate user. Furthermore, changing the timestamp may be undesirable if files are being updated from various sources, since timestamps moving backwards can confuse some software.
Disabling timestamp updates does not impair rsync's functionality but it can severely reduce performance. It is forced to fully read each file, on both sides of the transfer, in order to obtain a checksum.
I propose caching these checksums, against a file's timestamp, in order to avoid this performance problem. This method does not require an update of the file's timestamp. It would require a database of some sort linking files and timestamps to the calculated checksum. Whenever a file's timestamp changed, the checksum would need recalculating.
To operate efficiently this would need to operate at both sides of the connection. Basically instead of reading a file to determine its timestamp the cache would first be checked. If the cache did not contain a timestamp then it would be calculated and stored in the cache for future reference.
I'd suggest specifying the cache location for local and remote connections via a parameter initially.
I intend to have a go at adding this functionality myself, although I'd be very interested to hear any comments. Also if anyone has done anything similar, or if I am missing some simpler solution to this problem.
Note that several of the maintained patches have to do with checksum caching: the ones with "checksum" in the name as well as "db.diff". See the bottom of http://rsync.samba.org/download.html for how to access these patches.