how to measure copy performance the wrong way
25.07.2019
Until now I thought a good way to measure copy performance
is to use rsync --progress /a/local /b/local
.
But… have a look:
znek@creutzfeld:(~/tmp)$ dd if=/dev/urandom of=large1 bs=64M count=64
64+0 records in
64+0 records out
4294967296 bytes transferred in 82.564186 secs (52019738 bytes/sec)
znek@creutzfeld:(~/tmp)$ time cp large1 /archive/tmp/
real 0m23.915s
user 0m0.016s
sys 0m7.577s
znek@creutzfeld:(~/tmp)$ rm /archive/tmp/large1
znek@creutzfeld:(~/tmp)$ time rsync large1 /archive/tmp/
real 0m39.464s
user 0m32.478s
sys 0m24.831s
znek@creutzfeld:(~/tmp)$ rsync --version|grep version
rsync version 3.1.3 protocol version 31
As you can see, for this specific workload rsync
is almost twice as slow.