Copying Files from Region to Region Using RSYNC or FPSYNC is Slow

Symptom: Using rsync or fpsync to copy data from a file system in one region to a file system in another region results in slow progress.

Cause: NFS traffic from region to region is generally expensive. File copies between two NFS servers, each in a different region, can take time.

Solution: Instead of using rsync or fpsync to copy data between mounted file systems in different regions, use instance-to-instance streaming.

A standard copy command might look something like this:

fpsync /<fss_src_region>/test /<fss_dest_region>/

Instance-to-instance streaming might look like this:

fpsync -o "-e ssh --progress" /<fss_src_region>/test <ssh_user>@<remote_ip>:/<fss_dest_region>/

An example showing the performance difference between the two approaches follows:

# date; time fpsync -o "-e ssh --progress --log-file ~/speedtest.log" /fss_src_bom/test root@DR_hyd:/fss_dest_hyd/ ; date
Sun Mar 13 15:22:58 GMT 2022

real 0m1.467s
user 0m0.111s
sys 0m0.075s
Sun Mar 13 15:23:00 GMT 2022

# ls -ltrd test
drwxr-xr-x. 2 root root 1 Mar 13 15:22 test
# du -sh test
1001M test
# cp -r test test1

# date; time fpsync -o "--progress --log-file ~/speedtest1.log" /fss_src_bom/test1 /fss_dest_hyd/ ; date
Sun Mar 13 15:25:16 GMT 2022

real 1m28.847s
user 0m3.688s
sys 0m1.439s
Sun Mar 13 15:26:44 GMT 202