times difference causes write

tim.conway at philips.com tim.conway at philips.com
Wed Nov 14 08:58:56 EST 2001


-W and -C are actually kind of opposite effects... -W means never 
checksum... if it's different in length or time, send it.
-c means ALWAYS checksum, even if time and length are identical.
use neither.  the default behaviour is to compare date/length, and if they 
are different, do the rolling checksum.  This is done in chunks, then 
compares the sums, and sends the different blocks, with instructions on 
where to insert them.  If the difference was simply timestamp, and in 
fact, the data is unchanged, the rolling checksum will sort of say "never 
mind", and leave the file alone.
Unfortunately for your situation, it builds tne new file next to the 
existing file, no matter what you do, then deletes the existing file and 
renames the new file to the old name.  Every file done by rsync involves a 
full write.  You're going to put a lot of cycles on your flash.  I'm 
thinking rsync might not be the best solution for what you're doing. Flash 
is not suited to frequently-updated data.

Tim Conway
tim.conway at philips.com
303.682.4917
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn, 
19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), 
".\n" '
"There are some who call me.... Tim?"




Don Mahurin <dmahurin at berkeley.innomedia.com>
Sent by: dmahurin at pc16.berkeley.innomedia.com
11/13/2001 02:36 PM

 
        To:     Tim Conway/LMT/SC/PHILIPS at AMEC
        cc:     rsync at lists.samba.org
        Subject:        Re: times difference causes write
        Classification: 



My first problem is that I am writing to compact flash, so I want the 
minimal
number of writes.
My second problem is that the flash is of limited size, so I need some 
sort
of patch rsync that does not keep the old file before writing the new one.
My patch now just unlinks the file ahead, and implies -W.

So my wish was that a time discrepancy would lead to a checksum, where the
files would match.
This is not the case, however, as you say.

So for now, I must use -c.  It's slow, but I know that I get the minimum
number of writes.

-don

tim.conway at philips.com wrote:

> In the example you give, yes, a time difference causes a write.  You are
> using the -W (--whole-file) option, which directs rsync to simply send 
the
> file, in its entirety, if there is a discrepency in mtime (ctime too?), 
or
> extent.  It is used for situations where file access is slow enough that
> trying to do an incremental update would take more time/resources than
> simply sending the file... primary example being nfs-mounted 
filesystems.
> If you have fast dasd/slow network, you should probably just drop the 
-W.








More information about the rsync mailing list