Hetzner Storage Box provides CIFS/SMB network storage with cross-datacenter access. Default mount options often result in poor throughput, particularly when accessing storage across geographic distance. A Storage Box in Finland accessed from a server in Germany encounters higher latency than local storage. CIFS mount parameters can be tuned based on the connection characteristics to improve transfer speeds.
This guide covers identifying CIFS share characteristics, adjusting mount options for better performance, and validating throughput improvements. Instructions apply to Debian-based distributions including Ubuntu and Debian itself. While SSHFS offers an alternative mounting method, CIFS/SMB remains the actively maintained protocol for Storage Box access and provides better performance when configured correctly.
Prerequisites
This guide was written in January 2025 using Debian 12 and Ubuntu 22.04 LTS. You need root or sudo access to mount filesystems and install packages. An active Hetzner Storage Box with CIFS/SMB enabled is required. The Storage Box credentials and hostname are available in the Hetzner Robot panel under the Storage Box settings.
Install the required CIFS utilities if not already present:
apt update
apt install cifs-utilsCreate a credentials file to store Storage Box authentication details. This prevents passwords from appearing in mount commands or /etc/fstab:
mkdir -p /root/.smb
chmod 700 /root/.smbCreate /root/.smb/storagebox with the following content:
username=u123456
password=your_passwordReplace u123456 with your Storage Box username and your_password with the actual password. Set restrictive permissions:
chmod 600 /root/.smb/storageboxIdentify Connection Characteristics
CIFS performance tuning requires understanding the network path between client and server. Three characteristics matter most: latency, bandwidth, and packet loss.
Test latency to the Storage Box hostname:
ping -c 20 u123456.your-storagebox.deNote the average round-trip time. Cross-datacenter connections within Hetzner typically show 10-30ms latency. Higher latency requires larger read and write buffer sizes to maintain throughput.
Measure available bandwidth with iperf3 if the Storage Box supported it, but Storage Box does not expose iperf3 endpoints. Instead, perform a baseline transfer test with default CIFS settings to establish current throughput.
Create a test mount point and mount with default options:
mkdir -p /mnt/storagebox-test
mount -t cifs //u123456.your-storagebox.de/backup /mnt/storagebox-test -o credentials=/root/.smb/storageboxTest write performance with a large file:
dd if=/dev/zero of=/mnt/storagebox-test/testfile bs=1M count=1024 conv=fdatasyncNote the transfer speed reported by dd. This establishes the baseline. Test read performance:
dd if=/mnt/storagebox-test/testfile of=/dev/null bs=1MRecord both values. These represent performance with default mount options. Clean up the test file:
rm /mnt/storagebox-test/testfile
umount /mnt/storagebox-testDetermine CIFS Protocol Version
Hetzner Storage Box supports SMB protocol versions 2.1 and 3.0. Newer protocol versions offer better performance and security. Check which version a mount negotiates by mounting with default options and examining the connection:
mount -t cifs //u123456.your-storagebox.de/backup /mnt/storagebox-test -o credentials=/root/.smb/storageboxCheck the negotiated protocol version:
mount | grep storageboxThe output shows mount options including the SMB version. Look for vers=2.1 or vers=3.0 in the output. If no version appears explicitly, check dmesg for CIFS connection messages:
dmesg | grep -i cifs | tail -20Force SMB 3.0 for better performance if not already negotiated. Unmount the test mount:
umount /mnt/storagebox-testConfigure Optimized Mount Options
CIFS mount options control buffer sizes, caching behavior, and protocol features. The following options improve performance for high-latency connections:
vers=3.0 – Forces SMB 3.0 protocol, which includes performance improvements over SMB 2.1.
cache=loose – Enables optimistic caching. The client caches read and write operations more aggressively. This improves performance but reduces consistency guarantees. Acceptable for backup storage and media files where strict consistency is not required.
rsize=130048 – Sets read buffer size to 127KB. Larger buffers reduce the number of round trips required to transfer data. The maximum effective value depends on network MTU and server capabilities. 130048 bytes (127KB) works well for most scenarios.
wsize=130048 – Sets write buffer size to 127KB. Matches rsize for balanced read/write performance.
actimeo=30 – Sets attribute cache timeout to 30 seconds. The client caches file metadata (size, permissions, timestamps) for this duration before querying the server again. Reduces metadata operation overhead.
nostrictsync – Allows the client to skip some sync operations. Improves write performance for applications that perform many small writes. Data remains durable but sync semantics are relaxed.
nodfs – Disables DFS support. Storage Box does not use DFS, so disabling it removes unnecessary lookups.
_netdev – Indicates the mount requires network access. This option belongs in /etc/fstab to prevent boot issues if the network is not ready. Not used in manual mount commands.
Mount with optimized options for testing:
mount -t cifs //u123456.your-storagebox.de/backup /mnt/storagebox-test -o credentials=/root/.smb/storagebox,vers=3.0,cache=loose,rsize=130048,wsize=130048,actimeo=30,nostrictsync,nodfsThe mount point /mnt/storagebox-test must exist before mounting.
Test Optimized Performance
Repeat the dd tests with optimized mount options to measure improvement. Test write performance:
dd if=/dev/zero of=/mnt/storagebox-test/testfile bs=1M count=1024 conv=fdatasyncCompare the transfer speed to the baseline test. Typical improvements range from 2x to 5x depending on latency and baseline configuration. Test read performance:
dd if=/mnt/storagebox-test/testfile of=/dev/null bs=1MRead performance often shows more dramatic improvement than write performance due to caching effects. For more realistic testing with smaller files, use a directory copy operation:
mkdir /tmp/testdata
for i in {1..100}; do dd if=/dev/urandom of=/tmp/testdata/file$i bs=1M count=10; done
time cp -r /tmp/testdata /mnt/storagebox-test/
time cp -r /mnt/storagebox-test/testdata /tmp/testdata-copyThis creates 100 files of 10MB each and measures the time to copy them to and from the Storage Box. The time command shows real elapsed time and CPU time consumed.
Clean up test files:
rm /mnt/storagebox-test/testfile
rm -rf /mnt/storagebox-test/testdata
rm -rf /tmp/testdata /tmp/testdata-copyConfigure Persistent Mount
Add the optimized mount to /etc/fstab for automatic mounting at boot. Create the permanent mount point:
mkdir -p /mnt/storagebox
chmod 755 /mnt/storageboxAdd this line to /etc/fstab:
//u123456.your-storagebox.de/backup /mnt/storagebox cifs credentials=/root/.smb/storagebox,vers=3.0,cache=loose,rsize=130048,wsize=130048,actimeo=30,nostrictsync,nodfs,_netdev 0 0The entry must be a single line. The final two zeros indicate the filesystem should not be dumped by backup tools and should not be checked at boot by fsck.
Test the fstab entry without rebooting:
umount /mnt/storagebox-test
mount /mnt/storageboxVerify the mount succeeded:
mount | grep storagebox
df -h /mnt/storageboxThe mount options should match those specified in fstab. The df command confirms the Storage Box capacity and usage.
Additional Tuning Options
Some scenarios benefit from additional mount options beyond the standard optimized set. Consider these based on your use case:
seal – Enables SMB 3.0 encryption. This adds CPU overhead but protects data in transit. Use when transferring sensitive data over untrusted networks. Hetzner internal network is generally trustworthy, so encryption may be unnecessary.
noperm – Disables client-side permission checks. The server still enforces permissions. This option can improve performance when the client and server have different user ID mappings.
noserverino – Disables server-provided inode numbers. Use this if applications report issues with file identity or if hardlinks behave unexpectedly. Has minor performance impact.
mfsymlinks – Enables symbolic link support through Minshall+French symlink format. Storage Box may not support standard CIFS symlinks, so this option allows symlink functionality. Only needed if your use case requires symlinks.
Test each option individually to determine if it improves or degrades performance for your workload. Some options interact in non-obvious ways.
Monitoring Mount Performance
Monitor ongoing mount performance with standard Linux tools. The /proc/fs/cifs/Stats file contains per-mount statistics:
cat /proc/fs/cifs/StatsThis shows total operations, bytes transferred, and error counts for each CIFS mount. Compare values before and after large transfers to identify bottlenecks.
The nfsiostat tool works with CIFS mounts despite its name. Install it:
apt install nfs-commonMonitor CIFS mount statistics in real-time:
nfsiostat -h 2This displays operations per second and throughput every 2 seconds. Useful for observing performance during active transfers.
System-level monitoring with tools like iotop and nethogs shows which processes consume storage and network bandwidth:
apt install iotop nethogs
iotop -o
nethogsThese tools require root access and show real-time resource usage by process.
Troubleshooting Performance Issues
If optimized mount options do not improve performance significantly, investigate these common issues:
Network congestion – Other traffic on the same network path can limit available bandwidth. Test during off-peak hours to determine if congestion is a factor.
Server-side throttling – Hetzner may rate-limit Storage Box connections under some circumstances. Contact support if sustained throughput seems artificially limited.
MTU mismatches – Check network interface MTU settings. Mismatched MTU between client and network path causes packet fragmentation:
ip link showStandard Ethernet MTU is 1500 bytes. Some networks support jumbo frames with MTU up to 9000 bytes. Ensure all devices in the path support the same MTU if using non-standard values.
DNS resolution delays – Slow DNS lookups add latency to mount operations. Test DNS resolution speed:
time nslookup u123456.your-storagebox.deResolution should complete in under 100ms. Add the Storage Box hostname to /etc/hosts to bypass DNS if resolution is slow:
echo "78.46.123.456 u123456.your-storagebox.de" >> /etc/hostsReplace the IP address with your Storage Box IP address, found in the Hetzner Robot panel.
File locking overhead – Applications that use extensive file locking may perform poorly over CIFS. The nolock mount option disables file locking but can cause corruption if multiple clients access the same files simultaneously. Only use nolock for single-client scenarios where the application handles locking internally.
Comparing with SSHFS
SSHFS mounts remote filesystems over SSH. It was popular for Hetzner Storage Box access before CIFS support matured. SSHFS development has slowed, with the last release in 2020. The project README states it is in maintenance mode.
CIFS offers better performance than SSHFS for large transfers due to protocol optimizations for bulk data. SSHFS performs better for operations involving many small files due to lower per-operation overhead.
CIFS integrates better with Linux virtual filesystem layer. Standard tools like file managers and backup software work without modification. SSHFS can trigger bugs in applications that make assumptions about local filesystem behavior.
Security considerations differ between protocols. SSHFS encrypts all traffic by default. CIFS requires the seal mount option for encryption. Both protocols authenticate securely when configured properly.
Choose CIFS for general-purpose Storage Box access. Consider SSHFS only if specific application compatibility issues arise with CIFS mounts.
Benchmark Documentation
Document baseline and optimized performance measurements for future reference. Create a simple log file:
cat > /root/storagebox-performance.txt <<EOF
Storage Box Performance Baseline
Date: $(date +%Y-%m-%d)
Client: $(hostname)
Storage Box: u123456.your-storagebox.de
Latency: $(ping -c 10 u123456.your-storagebox.de | grep avg | awk '{print $4}' | cut -d'/' -f2) ms
Baseline (default options):
Write: [record dd output]
Read: [record dd output]
Optimized (custom options):
Write: [record dd output]
Read: [record dd output]
Mount options used:
vers=3.0,cache=loose,rsize=130048,wsize=130048,actimeo=30,nostrictsync,nodfs
EOFFill in the benchmark results. This documentation helps troubleshoot future performance degradation and validates that optimization efforts produced measurable improvements.
AI assistance is used on this site for language, formatting, and turning research into a consistent template. It is not used to perform the underlying research or verify technical claims. Every command, configuration, and step in this post is tested by hand before publication.