Archive

Archive for November, 2012

File copy comparison of rsync and netcat

November 2, 2012 3 comments

# Netcat with tar and compression is the fastest; here’s the test

1 GB file test copy times
source and destination server on 1Gb link

create file on source lindb01
dd if=/dev/random of=test.file bs=1024 count=1000000

Test with rsync
time rsync -av test.file lindb02:/tmp
22.318s

time rsync -azv test.file lindb02:/tmp
15.519s

time rsync -av -e ssh test.file lindb02:/tmp
22.546s

time rsync -av -e “ssh -C” test.file lindb02:/tmp
17.188s

time rsync -azv -e “ssh -C” test.file lindb02:/tmp
15.749s

Test with Netcat
Destination:
nc -l 2342 | tar -C /tmp -xzf –
Source:
time tar cz test.file | nc lindb02 2342
9.579s

Source:
time tar c test.file | nc lindb02 2342
9.606s

# Just unsure how long nc can hold a port open, but if we continuously feed data through
# it may stay open

Advertisements
Categories: Linux, Redhat