Rsync, axel, cp速度对比, 第一次备份时哪个快些

一,耗时测试

测试复制一个6G的文件所需时间。

time; cp /media/root/192.168.4.177/d/temp/dbbak/6G.bak /root/Downloads/tmp/; time;

运行结果:

real 89311.29s
user 9.32s
sys 2.70s
cpu 0%
real 89311.29s
user 2911.42s
sys 67.68s
cpu 3%

real 89893.14s
user 9.32s
sys 2.70s
cpu 0%
real 89893.14s
user 2911.44s
sys 76.93s
cpu 3%

用时581.85秒

time; rsync -rvzP /media/root/192.168.4.177/d/temp/dbbak/6G.bak /root/Downloads/tmp/; time;

运行结果:

real 90017.45s
user 9.45s
sys 2.94s
cpu 0%
real 90017.45s
user 2911.45s
sys 76.94s
cpu 3%
sending incremental file list
6G.bak
6,855,880,704 100% 11.21MB/s 0:09:43 (xfr#1, to-chk=0/1)
sent 958,956,943 bytes received 35 bytes 1,643,456.69 bytes/sec
total size is 6,855,880,704 speedup is 7.15
real 90600.75s
user 9.45s
sys 2.94s
cpu 0%
real 90600.75s
user 2943.17s
sys 86.01s
cpu 3%

用时 583.30秒

time; axel -n 11 http://127.0.0.1/6G.bak; time;

运行结果:

real 234237.14s
user 20.21s
sys 5.84s
cpu 0%
real 234237.14s
user 12994.16s
sys 346.55s
cpu 5%
Initializing download: http://192.168.4.177/6G.bak
File size: 6.38504 Gigabyte(s) (6855880704 bytes)
Opening output file 6G.bak
Starting download
Connection 2 finished
[100%] […] [ 11.3MB/s] [00:00]
Downloaded 6.38504 Gigabyte(s) in 9:41 minute(s). (11521.61 KB/s)
real 234818.25s
user 20.21s
sys 5.84s
cpu 0%
real 234818.25s
user 13016.77s
sys 419.58s
cpu 5%

用时581.1秒

你可能感兴趣的:(linux)