2

I am using rsync on fedora 20 to sync my directories. I am using the command below:-

$ rsync --progress -a srcDir DestDir

But, as rsync copies files, copy speed decreases significantly. Here is my output:-

sending incremental file list
./
ABCD.01.Episode.06.Xvid.avi
    112,523,264 100%   23.32MB/s    0:00:04 (xfr#1, to-chk=69/76)
ABCD.01.Episode.07.Xvid.avi
    159,942,656 100%   31.08MB/s    0:00:04 (xfr#2, to-chk=68/76)
ABCD.02.Episode.08.Xvid.avi
    135,442,432 100%   25.37MB/s    0:00:05 (xfr#3, to-chk=67/76)
ABCD.02.Episode.09.Xvid.avi
    155,904,000 100%    2.09MB/s    0:01:11 (xfr#4, to-chk=66/76)
ABCD.02.Episode.10.Xvid.avi
    206,614,528 100%    1.01MB/s    0:03:15 (xfr#5, to-chk=65/76)
ABCD.02.Episode.11.Xvid.avi
    167,616,512 100%    1.00MB/s    0:02:39 (xfr#6, to-chk=64/76)
ABCD.02.Episode.12.Xvid.avi
    144,068,608 100%    1.00MB/s    0:02:16 (xfr#7, to-chk=63/76)
ABCD.02.Episode.13.Xvid.avi
    176,902,144 100% 1021.79kB/s    0:02:49 (xfr#8, to-chk=62/76)
ABCD.02.Episode.14.Xvid.avi
    171,210,752 100%    1.00MB/s    0:02:42 (xfr#9, to-chk=61/76)
ABCD.03.Episode.15.Xvid.avi
    176,295,936 100%  999.01kB/s    0:02:52 (xfr#10, to-chk=60/76)

Can anybody please tell me what might be causing it? Or, how can I get a constant speed while using rsync or any other tool?

8
  • Where are the two directories mounted? What filesystems are on both? Nov 8, 2014 at 8:15
  • ext4 to ntfs. Internal Hard drive to External Backup drive (WD My Passport Ultra). Nov 8, 2014 at 8:24
  • This answer may help you: unix.stackexchange.com/questions/89318/… Nov 8, 2014 at 8:35
  • You mean to say that I should write a for loop in a shell file and copy each file one by one. Or, If I use * in place of file name in cp command, bash will execute cp command for each file. That way, there won't be multiple files getting copied in parallel. Still, it seems like rsync itself is copying files sequentially, isn't it? Nov 8, 2014 at 8:55
  • If you can, why not (as an experiment) reformat (or shrink a partition to make space for another) the external drive as ext4 and run your test again. Also, try using cp instead of rsync. You may be able to narrow down where the bottleneck is. 1Mb/s over USB is pretty poor. Nov 8, 2014 at 9:27

1 Answer 1

4

The speed doesn't decrease. It slowly approaches the real speed that was there from the start.

Such copies normally involve buffers at the OS level and these need to be pushed out for real, what the application doesn't notice. Before they fill up, they are measuring how fast things get copied in the output buffer, and once that is filled your network speed starts to show up (varying a bit, often depending on what else you are doing).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .