>> То, что всё в одном файле - не важно, rsync умеет перегонять только изменившиеся блоки.
> вы уверены? Я вот попробовал
> Меняю пару байт в /dst/1gb.bin и запускаю rsync
> Я что то упускаю?Вероятно сказывается, что с обеих сторон - файловая система.
У меня в таком случае тоже происходит полное копирование файла.
Однако с использованием SSH всё иначе.
Результат прогрева процессора:
Создаем
root@localhost:~/tst# dd if=/dev/zero of=src/1gb.bin bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 13.3356 s, 80.5 MB/s
Копируем
root@localhost:~/tst# time rsync -av -e "ssh -c blowfish" root@localhost:/root/tst/src/ dst/
root@localhost's password:
receiving incremental file list
1gb.bin
sent 36 bytes received 1073872988 bytes 11128217.87 bytes/sec
total size is 1073741824 speedup is 1.00
real 1m35.158s
user 0m18.905s
sys 0m16.417s
Модифицируем
root@localhost:~/tst# dd if=/dev/urandom of=src/1gb.bin bs=512 count=1 oflag=append conv=notrunc
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000118674 s, 4.3 MB/s
Копируем еще раз:
root@localhost:~/tst# time rsync --inplace -av -e "ssh -c blowfish" root@localhost:/root/tst/src/ dst/
root@localhost's password:
receiving incremental file list
./
1gb.bin
sent 229409 bytes received 131683 bytes 9141.57 bytes/sec
total size is 1073742336 speedup is 2973.60
real 0m38.477s
user 0m5.692s
sys 0m3.812s
Контрольный:
root@localhost:~/tst# time rsync --inplace -av -e "ssh -c blowfish" root@localhost:/root/tst/src/ dst/
root@localhost's password:
receiving incremental file list
sent 11 bytes received 53 bytes 18.29 bytes/sec
total size is 1073742336 speedup is 16777224.00
real 0m2.544s
user 0m0.000s
sys 0m0.012s
root@localhost:~/tst# dd if=/dev/urandom of=src/1gb.bin bs=512 count=1 oflag=append conv=notrunc
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00931802 s, 54.9 kB/s
root@localhost:~/tst# time rsync --inplace -av -e "ssh -c blowfish" root@localhost:/root/tst/src/ dst/
root@localhost's password:
receiving incremental file list
1gb.bin
sent 229413 bytes received 132192 bytes 9154.56 bytes/sec
total size is 1073742848 speedup is 2969.38
real 0m38.678s
user 0m5.632s
sys 0m3.748s
root@localhost:~/tst#
Во время копирования (даже модифицированного файла) нет записи на диск, только чтение.