Proxmox NFS Storage Is Slow

Yes, that doesn't persist a reboot. The problem is when a host boot you cannot set the value if the mount isn't done and so that could only be done later while even good for every nfs mount there could be a systemd unit which runs permanently for checking to new nfs mounts and there read_ahead.
Thanks for clarifying that. Interesting that having a systemd unit watch things live is the best approach. I'd have guessed that fstab could handle setting that property.

Though, perhaps, when Proxmox handles it through storage.cfg, fstab doesn't get a say in the matter…?
 
Yes, use systemd unit or maybe make changes into udev rules which could work also but I'm unshure as a nfs mount is no local device.
 
  • Like
Reactions: Johannes S
I have absolutely the same issue when connecting NFS share trough GUI with some manual tuning I get very slow speed when migrating VM disks from local storage to NFS on 25G network and NFS share on mdraid 10 with 12 nmve enterpise grade disks...
# My tuning
# NFS on prox speed increase
Code:
pvesm set tmp-nfs --options vers=4.2,nconnect=8

# umount and mount to apply nconnect
umount /mnt/pve/tmp-nfs
mount 10.10.8.6:/local /mnt/pve/nfs-share

# check nconnect option
cat /proc/mounts | grep tmp-nfs

# check that many connnection exists
ss -an | grep 'ESTAB' | grep '10.10.8.6:2049'

but when i created storage on same NFS export using Add > Directory in GUI, the speed increased dramatically ... TX rate in iftop jump to 3 Gb from 1Gb

It's very strange ...
 
Last edited:
I had a similar experience. Found out that Jumbo frames (MTU) were not supported end to end. Make sure you verify all settings on switches and NFS server.
Also noticed I had to set the MTI on the bridge. It's not automatically using the MTU of the nics below it.
 
Set nfs read ahead automatically to when a nfs mount is done - useful on pve node as even in any vm :
cat /etc/udev/rules.d/99-nfs.rules
SUBSYSTEM=="bdi", ACTION=="add", PROGRAM="/etc/alternatives/awk -v bdi=$kernel 'BEGIN{ret=1} {if ($4 == bdi) {ret=0}} END{exit ret}' /proc/fs/nfsfs/volumes", ATTR{read_ahead_kb}="8192"
 
Last edited: