On-Premises Transfers to File Storage Are Slow
When a File Storage file system is directly mounted on an on-premises server, transferring files from the on-premises server to OCI File Storage is slow.
Cause: Directly mounting a File Storage file system on an on-premises instance is very slow because the NFS protocol is chatty over the internet.
Solution: Use instance-to-instance streaming for on-premises to OCI
File Storage transfers using parallel rsync
tools such as fpsync
. For example:
- If needed, create an instance in the same subnet as the existing File Storage mount target. Then set security rules and export options so that you can mount the file system from the instance.
- Add the on-premises root user's SSH public key into the OCI instance's
~/.ssh/authorized_keys
file. For more information, see Managing Key Pairs on Linux Instances. -
Linux users can download
fpsync
from a yum repository. The commands differ depending on the version of Linux.-
Download from the repository.
Linux 8 users can download the tool using the following command:
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Linux 9 users can download the tool using the following command:
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
- Install the tool:
sudo yum install fpart -y
-
-
As the root user of the on-premises instance, run the transfer to OCI File Storage using the new OCI instance:
#oci_instance=<oci_instance_privIP> #src=<source_directory> #dest=<FSS_mount_point_in_the_instance> #fpsync -v -n `nproc` -o "-lpgtoDxXH --progress --exclude .snapshot --log-file /tmp/fpsync_ssh_instance.log" ${src} root@${oci_instance}:${dest}
Consider the following when using the
fpsync
command:- Ensure that the ${src} and ${dest} have a trailing
/
to do a content-only copy of the source. - When using a File Storage mount target as the source, exclude the
.snapshot
directory, otherwise the copy time increases significantly. - Because the current
fpsync
release doesn't accept thersync
option-a
, the command uses-lpgtoD
.
- Ensure that the ${src} and ${dest} have a trailing
For more information and options, see the fpsync
man page.