{"id":974,"date":"2025-02-24T16:39:31","date_gmt":"2025-02-24T16:39:31","guid":{"rendered":"https:\/\/blog.eu.enginyr.ing\/?p=974"},"modified":"2025-02-24T16:39:35","modified_gmt":"2025-02-24T16:39:35","slug":"advanced-remote-storage-optimization-making-remote-storage-feel-like-local-nvme","status":"publish","type":"post","link":"https:\/\/www.serverspan.com\/en\/blog\/advanced-remote-storage-optimization-making-remote-storage-feel-like-local-nvme\/","title":{"rendered":"Advanced Remote Storage Optimization: Making Remote Storage Feel Like Local NVMe"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Ever wanted your remote storage to perform like a local NVMe drive? This guide will show you several approaches to optimize remote storage performance on Debian\/RHEL-based systems, with benchmark-proven results.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Table of Contents<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#benchmark-results\">Benchmark Results<\/a><\/li>\n\n\n\n<li><a href=\"#method-1-optimized-rclone-caching\">Method 1: Optimized Rclone Caching<\/a><\/li>\n\n\n\n<li><a href=\"#method-2-nfs-with-local-caching\">Method 2: NFS with Local Caching<\/a><\/li>\n\n\n\n<li><a href=\"#method-3-wireguard--advanced-io\">Method 3: Wireguard + Advanced I\/O<\/a><\/li>\n\n\n\n<li><a href=\"#method-4-hybrid-localremote-approach\">Method 4: Hybrid Local\/Remote Approach<\/a><\/li>\n\n\n\n<li><a href=\"#troubleshooting\">Troubleshooting<\/a><\/li>\n\n\n\n<li><a href=\"#security-considerations\">Security Considerations<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Benchmark Results<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s what you can achieve with these optimization techniques:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Traditional Remote Mounting (No Optimization)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dd if=\/dev\/zero of=.\/testfile bs=1M count=100\n104857600 bytes (105 MB, 100 MiB) copied, 29.1344 s, 3.6 MB\/s<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>With Advanced Optimization Techniques<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dd if=\/dev\/zero of=.\/testfile bs=1M count=100\n104857600 bytes (105 MB, 100 MiB) copied, 0.144608 s, 725 MB\/s<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Method 1: Optimized Rclone Caching<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This method uses rclone with fine-tuned parameters for maximum performance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Remote storage with SFTP access<\/li>\n\n\n\n<li>10GB+ free local disk space for caching<\/li>\n\n\n\n<li>Debian\/Ubuntu: <code>apt install rclone fuse<\/code><\/li>\n\n\n\n<li>RHEL\/CentOS\/Fedora: <code>dnf install epel-release &amp;&amp; dnf install rclone fuse<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Setup<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Create necessary directories<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/mnt\/storage \/mnt\/.cache<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Configure rclone<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">For headless servers:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rclone config<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For GUI configuration (home desktop):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rclone rcd --rc-web-gui<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new remote with these settings:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>name = storage-sftp\nstorage type = sftp\nhost = &#91;Storage Server IP-address]\nusername = &#91;Username]\nport = &#91;SSH Port - usually 22]\npassword = &#91;Password]<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Mount with optimized parameters<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>rclone mount storage-sftp:\/remote\/path \/mnt\/storage --daemon \\\n    --dir-cache-time 72h --cache-dir=\/mnt\/.cache \\\n    --vfs-cache-mode full --vfs-cache-max-size 10G \\\n    --buffer-size 256M --vfs-read-ahead 512M \\\n    --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 1G \\\n    --transfers 4 --checkers 8 --contimeout 60s \\\n    --timeout 300s --low-level-retries 10<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Create systemd service for automatic mounting<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Create file <code>\/etc\/systemd\/system\/storage-mount.service<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=Optimized Rclone Remote Mount\nAssertPathIsDirectory=\/mnt\/storage\nAfter=network-online.target\nWants=network-online.target\n\n&#91;Service]\nType=notify\nExecStart=\/usr\/bin\/rclone mount storage-sftp:\/remote\/path \/mnt\/storage \\\n    --dir-cache-time 72h --cache-dir=\/mnt\/.cache \\\n    --vfs-cache-mode full --vfs-cache-max-size 10G \\\n    --buffer-size 256M --vfs-read-ahead 512M \\\n    --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 1G \\\n    --transfers 4 --checkers 8 --contimeout 60s \\\n    --timeout 300s --low-level-retries 10\nExecStop=\/bin\/fusermount -u \/mnt\/storage\nRestart=on-failure\nRestartSec=10\n\n&#91;Install]\nWantedBy=multi-user.target<\/code><\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li><strong>Enable and start the service<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl daemon-reload\nsystemctl enable storage-mount\nsystemctl start storage-mount<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Method 2: NFS with Local Caching<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If your storage provider supports NFS, this method often provides better performance than SFTP.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Remote storage with NFS support<\/li>\n\n\n\n<li>Debian\/Ubuntu: <code>apt install nfs-common<\/code><\/li>\n\n\n\n<li>RHEL\/CentOS\/Fedora: <code>dnf install nfs-utils<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Setup<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Install required packages<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># Debian\/Ubuntu\napt install nfs-common bcache-tools\n\n# RHEL\/CentOS\/Fedora\ndnf install nfs-utils bcache-tools<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Create an NVMe cache partition<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Warning: This will erase data on the specified partition!<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Identify your NVMe device\nlsblk\n\n# Create a bcache device\n# \/dev\/nvme0n1p1 is your NVMe partition for caching\n# Replace X with your actual device\nmake-bcache -C \/dev\/nvme0n1p1<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Mount the NFS share<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/mnt\/storage-backend\nmount -t nfs storage.server:\/path \/mnt\/storage-backend<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Set up bcache with the NFS as backend<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># Register the NFS mount as a bcache backend device\necho \/mnt\/storage-backend &gt; \/sys\/fs\/bcache\/register\n\n# Find the bcache device name\nls \/dev\/bcache*\nmkdir -p \/mnt\/storage\nmount \/dev\/bcache0 \/mnt\/storage<\/code><\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li><strong>Create systemd service files for automatic mounting<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Create file <code>\/etc\/systemd\/system\/storage-nfs-backend.service<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=NFS Backend Mount\nAfter=network-online.target\nWants=network-online.target\n\n&#91;Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=\/bin\/mount -t nfs storage.server:\/path \/mnt\/storage-backend\nExecStop=\/bin\/umount \/mnt\/storage-backend\n\n&#91;Install]\nWantedBy=multi-user.target<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create file <code>\/etc\/systemd\/system\/storage-cached.service<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=Bcache NFS Mount\nAfter=storage-nfs-backend.service\nRequires=storage-nfs-backend.service\n\n&#91;Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=\/bin\/sh -c 'echo \/mnt\/storage-backend &gt; \/sys\/fs\/bcache\/register &amp;&amp; mount \/dev\/bcache0 \/mnt\/storage'\nExecStop=\/bin\/umount \/mnt\/storage\n\n&#91;Install]\nWantedBy=multi-user.target<\/code><\/pre>\n\n\n\n<ol start=\"6\" class=\"wp-block-list\">\n<li><strong>Enable and start the services<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl daemon-reload\nsystemctl enable storage-nfs-backend storage-cached\nsystemctl start storage-nfs-backend storage-cached<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Method 3: Wireguard + Advanced I\/O<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Using Wireguard instead of traditional SSH reduces encryption overhead while maintaining security.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Control over both the client and remote server<\/li>\n\n\n\n<li>Debian\/Ubuntu: <code>apt install wireguard-tools<\/code><\/li>\n\n\n\n<li>RHEL\/CentOS\/Fedora: <code>dnf install wireguard-tools<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Setup<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Install Wireguard on both systems<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># Debian\/Ubuntu\napt install wireguard-tools\n\n# RHEL\/CentOS\/Fedora\ndnf install wireguard-tools<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Generate keys on local system<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>wg genkey | tee local-private.key | wg pubkey &gt; local-public.key<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Generate keys on remote storage server<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>wg genkey | tee remote-private.key | wg pubkey &gt; remote-public.key<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Configure Wireguard on local system<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Create file <code>\/etc\/wireguard\/wg0.conf<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Interface]\nPrivateKey = &lt;local-private-key&gt;\nAddress = 10.10.10.1\/24\nListenPort = 51820\n\n&#91;Peer]\nPublicKey = &lt;remote-public-key&gt;\nAllowedIPs = 10.10.10.2\/32\nEndpoint = &lt;remote-server-ip&gt;:51820\nPersistentKeepalive = 25<\/code><\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li><strong>Configure Wireguard on remote storage server<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Create file <code>\/etc\/wireguard\/wg0.conf<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Interface]\nPrivateKey = &lt;remote-private-key&gt;\nAddress = 10.10.10.2\/24\nListenPort = 51820\n\n&#91;Peer]\nPublicKey = &lt;local-public-key&gt;\nAllowedIPs = 10.10.10.1\/32<\/code><\/pre>\n\n\n\n<ol start=\"6\" class=\"wp-block-list\">\n<li><strong>Start Wireguard on both systems<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>wg-quick up wg0\nsystemctl enable wg-quick@wg0<\/code><\/pre>\n\n\n\n<ol start=\"7\" class=\"wp-block-list\">\n<li><strong>Optimize network parameters on both systems<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># Create a file \/etc\/sysctl.d\/99-network-performance.conf with these contents:\ncat &gt; \/etc\/sysctl.d\/99-network-performance.conf &lt;&lt; EOF\nnet.core.rmem_max = 16777216\nnet.core.wmem_max = 16777216\nnet.ipv4.tcp_rmem = 4096 87380 16777216\nnet.ipv4.tcp_wmem = 4096 65536 16777216\nnet.ipv4.tcp_congestion_control = bbr\nnet.core.netdev_max_backlog = 5000\nEOF\n\n# Apply changes\nsysctl -p \/etc\/sysctl.d\/99-network-performance.conf<\/code><\/pre>\n\n\n\n<ol start=\"8\" class=\"wp-block-list\">\n<li><strong>Mount using NFS over Wireguard with io_uring<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">On the remote storage server, configure NFS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Debian\/Ubuntu\napt install nfs-kernel-server\n\n# RHEL\/CentOS\/Fedora\ndnf install nfs-utils\n\n# Export the directory\necho '\/storage 10.10.10.1(rw,sync,no_subtree_check)' &gt;&gt; \/etc\/exports\nexportfs -a\nsystemctl restart nfs-server<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On the local system:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/mnt\/storage\nmount -t nfs -o vers=4.2,fsc,nocto,noatime,nodiratime 10.10.10.2:\/storage \/mnt\/storage\n\n# For Linux kernel 5.1+ with io_uring support\nmount -t nfs -o vers=4.2,fsc,nocto,noatime,nodiratime,io_uring 10.10.10.2:\/storage \/mnt\/storage<\/code><\/pre>\n\n\n\n<ol start=\"9\" class=\"wp-block-list\">\n<li><strong>Create systemd service for automatic mounting<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Create file <code>\/etc\/systemd\/system\/storage-wireguard.service<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=Mount storage over Wireguard\nAfter=network-online.target wg-quick@wg0.service\nRequires=wg-quick@wg0.service\n\n&#91;Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=\/bin\/mount -t nfs -o vers=4.2,fsc,nocto,noatime,nodiratime 10.10.10.2:\/storage \/mnt\/storage\nExecStop=\/bin\/umount \/mnt\/storage\n\n&#91;Install]\nWantedBy=multi-user.target<\/code><\/pre>\n\n\n\n<ol start=\"10\" class=\"wp-block-list\">\n<li><strong>Enable and start the service<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl daemon-reload\nsystemctl enable storage-wireguard\nsystemctl start storage-wireguard<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Method 4: Hybrid Local\/Remote Approach<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This approach gives you true local NVMe performance while automatically syncing to remote storage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Debian\/Ubuntu: <code>apt install lsyncd<\/code><\/li>\n\n\n\n<li>RHEL\/CentOS\/Fedora: <code>dnf install epel-release &amp;&amp; dnf install lsyncd<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Setup<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Install required packages<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># Debian\/Ubuntu\napt install lsyncd\n\n# RHEL\/CentOS\/Fedora\ndnf install epel-release\ndnf install lsyncd<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Create local and remote mount points<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/mnt\/local-nvme \/mnt\/remote-storage<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Mount your local NVMe drive<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># Replace with your actual NVMe partition\nmount \/dev\/nvme0n1p1 \/mnt\/local-nvme<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>Mount your remote storage using one of the previous methods<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># Example using rclone\nrclone mount storage-sftp:\/remote\/path \/mnt\/remote-storage --daemon<\/code><\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li><strong>Configure lsyncd for real-time synchronization<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Create file <code>\/etc\/lsyncd\/lsyncd.conf.lua<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>settings {\n   logfile = \"\/var\/log\/lsyncd\/lsyncd.log\",\n   statusFile = \"\/var\/log\/lsyncd\/lsyncd-status.log\",\n   statusInterval = 10\n}\n\nsync {\n   default.rsync,\n   source = \"\/mnt\/local-nvme\/\",\n   target = \"\/mnt\/remote-storage\/\",\n   delay = 5,\n   rsync = {\n      archive = true,\n      compress = true,\n      bwlimit = 10000  -- 10MB\/s bandwidth limit\n   }\n}<\/code><\/pre>\n\n\n\n<ol start=\"6\" class=\"wp-block-list\">\n<li><strong>Create necessary log directories<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/var\/log\/lsyncd<\/code><\/pre>\n\n\n\n<ol start=\"7\" class=\"wp-block-list\">\n<li><strong>Start and enable lsyncd<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start lsyncd\nsystemctl enable lsyncd<\/code><\/pre>\n\n\n\n<ol start=\"8\" class=\"wp-block-list\">\n<li><strong>Create convenience symbolic links (optional)<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>ln -s \/mnt\/local-nvme \/storage<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Connection Issues<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Check if the mount is responsive\nls -la \/mnt\/storage\n\n# Check system logs for errors\njournalctl -u storage-mount -n 50\n\n# Restart the mount service\nsystemctl restart storage-mount\n\n# Force unmount if stuck\nfusermount -uz \/mnt\/storage<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Performance Degradation<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Check disk space for cache\ndf -h \/mnt\/.cache\n\n# Clear rclone cache (if using rclone)\nrm -rf \/mnt\/.cache\/*\nsystemctl restart storage-mount\n\n# Check network performance\niperf3 -c &lt;remote-server-ip&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Monitoring Mount Health<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Monitor ongoing transfers with rclone\nrclone rc core\/stats\n\n# Watch real-time I\/O activity\niostat -xm 2<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Security Considerations<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Use key-based authentication instead of password<\/strong> Generate an SSH key pair:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   ssh-keygen -t ed25519 -f ~\/.ssh\/storage_key<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For rclone, update your config to use the key:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   rclone config<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Choose your remote, then:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   key_file = \/root\/.ssh\/storage_key\n   key_use_agent = false<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Encrypt sensitive data<\/strong> If storing sensitive data, use rclone crypt:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   rclone config<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new remote of type &#8220;crypt&#8221; that points to your existing remote.<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Restrict mount permissions<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   chmod 700 \/mnt\/storage<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Remember that while these methods create the impression of local access speeds, actual file transfers to the remote storage still happen in the background. For the best experience, ensure a stable and fast internet connection.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever wanted your remote storage to perform like a local NVMe drive? This guide will show you several approaches to optimize remote storage performance on Debian\/RHEL-based systems, with benchmark-proven results. Table of Contents Benchmark Results Here&#8217;s what you can achieve with these optimization techniques: Traditional Remote Mounting (No Optimization) With Advanced Optimization Techniques Method 1: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":975,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12],"tags":[5267,5265,5271,5264,5259,5253,5260,5256,5277,5286,5258,5268,4034,5272,5284,5279,5255,5281,5261,5252,5270,5280,5257,5278,5250,5263,5266,5274,5251,5276,5285,3931,5282,5283,5269,5273,5254,3876,5262,5275],"class_list":["post-974","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-virtual-servers","tag-bandwidth-optimization","tag-bcache","tag-buffer-configuration","tag-caching-mechanism","tag-cloud-storage","tag-data-streaming","tag-debian","tag-disk-io","tag-distributed-storage","tag-filesystem-caching","tag-high-speed-transfer","tag-io_uring","tag-linux-server","tag-local-disk-emulation","tag-low-latency-access","tag-memory-mapping","tag-network-latency","tag-network-tuning","tag-nfs-mount","tag-nvme-performance","tag-parallel-transfers","tag-persistent-mount","tag-rclone-optimization","tag-read-ahead-buffer","tag-remote-storage","tag-rhel","tag-seamless-file-access","tag-sftp-acceleration","tag-ssd-cache","tag-ssh-tunneling","tag-storage-virtualization","tag-system-administration","tag-systemd-service","tag-tcp-optimization","tag-throughput-enhancement","tag-transparent-caching","tag-virtual-filesystem","tag-vps-optimization","tag-wireguard","tag-zero-copy-transfer"],"_links":{"self":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=974"}],"version-history":[{"count":1,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/974\/revisions"}],"predecessor-version":[{"id":976,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/974\/revisions\/976"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/975"}],"wp:attachment":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}