Rsync and DTrace

Carles Pina i Estany carles at pina.cat
Fri Dec 1 17:14:52 GMT 2006


Hi,

On Nov/30/2006, Matt McCutchen wrote:
> On 11/30/06, diversos <diversos at posix.brte.com.br> wrote:
> > The performance was terrible. After some tests with raid0, raid1, 
> > non-SATA discs, and using DTrace, i have realized that the problem was 
> > the "gnome-terminal". Basically the "-v" switch.
> 
> I've noticed something similar on my Linux machine.  If I run "rsync
> -v" at a virtual terminal (not through X) to back up my hard disk to a
> locally attached external disk, rsync runs considerably faster when I
> select a virtual terminal other than the one to which it is printing
> its messages.  I don't know what is going on here but I agree with
> Carles that it probably isn't specific to rsync.

for example:
#include <stdio.h>

int main () {
        int i;

        for (i=0;i<30000;i++) {
                printf("This is a test. How it takes to print 30000 times a line?\n");
        }
        return 0;
}

gcc test.c
time ./a.out: (in a xterm)
real    0m1.817s
user    0m0.004s
sys     0m0.080s

in konsole: (!!)
real    0m0.838s
user    0m0.008s
sys     0m0.064s

In a standard console (text one) real takes 8.5 sec!!! (no frame buffer)


stdout is bufferes but usually only line by line. So each new line 
I think that flush the buffer and it takes time here. Anyway, is not a 
rsync issue :-)

-- 
Carles Pina i Estany		GPG id: 0x8CBDAE64
	http://pinux.info	Manresa - Barcelona


More information about the rsync mailing list