14676 100% 0.00kB/s 0:00:00
Pascal Bourguignon
pjb at informatimago.com
Sat Apr 20 19:33:01 EST 2002
Hello,
When rsync'ing over an ISDN 64kb/s channel, I get reported mostly 0 kB/s:
1287 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/JavaTutorial/3.JavaDebugging/toc.html
731 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/JavaTutorial/Images/javapromo.gif
10898 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/JavaTutorial/Images/mapheader.gif
953 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/JavaTutorial/Images/number1.gif
218 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/JavaTutorial/Images/number2.gif
242 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/JavaTutorial/Images/number3.gif
247 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/JavaTutorial/JavaTutorialConcepts-1.gif
8778 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/ObjectiveC/coreobjc.htm
99105 100% 68.06kB/s 0:00:01
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/ObjectiveC/grammar.htm
12976 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Developer/YellowBox/TasksAndConcepts/ObjectiveC/introobj.htm
12867 100% 0.00kB/s 0:00:00
home/httpd/html/mirrors/developer.apple.com/techpubs/macosx/System/Documentation/Devel
(when rsync is invoked with the following option, but that's not
significant I believe:
rsync -v -c -a -l -H -p -o -g -D -t -S -x -z \
--progress \
--bwlimit 5000 \
-e ssh root at hermes.afaa.asso.fr:/ /fireball/hermes
)
I think the problem is in receive_data (receiver.c):
sum_init();
for (i=recv_token(f_in,&data); i != 0; i=recv_token(f_in,&data)) {
show_progress(offset, total_size);
A call to show_progress should be included before the for loop, that
is, before waiting for the first and often only packet in recv_token:
sum_init();
show_progress(0, total_size);
for (i=recv_token(f_in,&data); i != 0; i=recv_token(f_in,&data)) {
show_progress(offset, total_size);
Then, the show_progress call inside the for loop could be moved at the
end of the loop.
Note that inside show_progress, I believe that gettimeofday could be
called only when ofs==0 or when it's usefull:
void show_progress(OFF_T ofs, OFF_T size)
{
extern int do_progress, am_server;
struct timeval now;
if((ofs==0)||(do_progress
&& !am_server
&& ofs > last_ofs + 1000)){
gettimeofday(&now, NULL);
if (!start_time.tv_sec && !start_time.tv_usec) {
start_time.tv_sec = now.tv_sec;
start_time.tv_usec = now.tv_usec;
start_ofs = ofs;
}
if((msdiff(&print_time, &now) > 250){
rprint_progress(ofs, size, &now, False);
last_ofs = ofs;
print_time.tv_sec = now.tv_sec;
print_time.tv_usec = now.tv_usec;
}
}
}
Disclaimer: I've not tested these modifications yet.
--
__Pascal_Bourguignon__ (o_ Software patents are endangering
() ASCII ribbon against html email //\ the computer industry all around
/\ and Microsoft attachments. V_/ the world http://lpf.ai.mit.edu/
1962:DO20I=1.100 2001:my($f)=`fortune`; http://petition.eurolinux.org/
You're a web designer? Please read http://www.useit.com/alertbox/ !
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d? s++:++(+++)>++ a C+++ UB+++L++++$S+X++++>$ P- L+++ E++ W++
N++ o-- K- w------ O- M++$ V PS+E++ Y++ PGP++ t+ 5? X+ R !tv b++(+)
DI+++ D++ G++ e+++ h+(++) r? y---? UF++++
------END GEEK CODE BLOCK------
More information about the rsync
mailing list