daemon sizes
Matt McCutchen
hashproduct+rsync at gmail.com
Sat Jan 27 14:21:57 GMT 2007
On 1/26/07, Julian Pace Ross <linux at prisma.com.mt> wrote:
> I'm still getting strange sizes on the daemon logs.
> After transferring around 1.66GB over 14 hours (256kbit link) to an
> absolutely empty directory, I get:
>
> 2007/01/26 04:13:43 [26441] sent 57014 bytes received 44708 bytes total
> size 1947222268
>
> du reports the final size of the directory on the daemon side as 1.6 G, and
> the "received" bytes can't be 44708?!
I can reproduce this problem! I also figured out what is causing it.
Any daemon process that calls exit_cleanup(0) prints a statistics line
in log_exit, but the receiver doesn't exit: it waits for the generator
to kill it. Thus, only the generator prints statistics. However, the
generator's value of "bytes received" is incorrect because it does not
include bytes received by the receiver since the generator forked.
Furthermore, the statistic printing can't simply be moved to the
receiver because the receiver's "bytes sent" does not include bytes
sent by the generator after the fork. I think the best fix is for the
receiver to tell the generator how many bytes it has received in a
message just before the second MSG_DONE; then the generator can
correctly print the statistics.
Matt
More information about the rsync
mailing list