The home of William Rendell

Improve Proxmox NFS Performance with nconnect=4

NFS is widely used to provide shared storage for Proxmox VE clusters. However, a standard NFS mount may use only one TCP connection between each Proxmox node and the storage server.

On a fast network—particularly 10GbE—that single connection can sometimes limit performance. Linux provides an NFS mount option called nconnect, which allows the client to establish several TCP connections to the same NFS server.

For example:

nconnect=4

This allows the Proxmox node to use up to four TCP connections for its NFS traffic.

It will not necessarily make storage four times faster. Performance still depends on the NAS, disks, network, workload and synchronous-write behaviour. However, multiple connections can improve throughput and concurrency, especially when several virtual machines are accessing the same storage.

Diagram showing four parallel TCP streams connecting a Proxmox VE host to an NFS storage server

Before enabling nconnect

Check that:

  • The Proxmox host uses a modern Linux kernel.
  • The NAS supports NFSv4.1 or NFSv4.2.
  • The storage network is functioning correctly.
  • Any jumbo-frame configuration is consistent end-to-end.
  • The NAS and its disks can handle the additional traffic.

Choose an NFS version that the server officially supports. NFSv4.1 is often a safe choice, while NFSv4.2 may be used if it is fully supported by both client and server.

Which file should be edited?

NFS storage added through Proxmox is defined in:

/etc/pve/storage.cfg

This is a cluster-wide configuration file, so a change made there applies across the Proxmox cluster.

Do not add the same Proxmox-managed storage to /etc/fstab. Creating a second manual mount can cause conflicts and make storage problems harder to diagnose.

Where possible, change the mount options through the Proxmox web interface:

Datacenter → Storage → select the NFS storage → Edit → Advanced

Example configuration

An NFS storage definition with four connections could look like this:

nfs: shared-nfs
        export /proxmox
        path /mnt/pve/shared-nfs
        server 192.168.10.20
        content images,rootdir
        options vers=4.1,nconnect=4

The important line is:

options vers=4.1,nconnect=4

Replace the storage name, server address and export path with the values for the relevant environment.

If the server reliably supports NFSv4.2, the options could instead be:

options vers=4.2,nconnect=4

Applying the change safely

Changing the configuration does not alter the options of a filesystem that is already mounted. The NFS share must be unmounted and mounted again.

Before doing this:

  1. Migrate or shut down any virtual machines and containers using the storage.
  2. Confirm that no backup, replication, migration or restore task is running.
  3. Disable the storage temporarily in Proxmox.
  4. Check whether it remains mounted.
  5. Unmount it cleanly if necessary.
  6. Add the new mount options.
  7. Re-enable the storage.

Check the existing mount with:

findmnt /mnt/pve/shared-nfs

If it is still mounted and nothing is using it:

umount /mnt/pve/shared-nfs

Do not force or lazily unmount a busy NFS filesystem simply to bypass an error. First identify what is still accessing the storage.

Confirming that nconnect=4 is active

After re-enabling the storage, examine the active NFS mount:

nfsstat -m

Alternatively:

findmnt -t nfs,nfs4 -o TARGET,SOURCE,FSTYPE,OPTIONS

The mount options should include:

nconnect=4

TCP connections to the NFS server can also be checked with:

ss -tan dst 192.168.10.20:2049

Replace the example address with the NFS server’s actual IP address. When the storage is active, up to four established TCP connections should be visible.

Multiple exports from the same server

Linux can share its NFS client connection between multiple exports provided by the same server. This means the first share mounted from a particular server address can influence the connection settings used by subsequent mounts.

If several Proxmox storage definitions use the same NAS address, apply consistent NFS version and nconnect settings to all of them and remount them together.

Using different nconnect values for exports reached through the same server IP may not produce the expected result.

Measuring the result

nconnect=4 is most likely to help when:

  • Proxmox connects to storage over 10GbE.
  • Several virtual machines generate NFS traffic simultaneously.
  • A single TCP connection is limiting throughput.
  • The NAS has sufficient CPU and disk performance.
  • There is enough latency for one connection to become restrictive.

It may make little difference when performance is limited by slow disks, NAS CPU usage or synchronous-write latency.

Test before and after using the same workload. Measure latency and virtual-machine responsiveness as well as headline transfer speed.

Conclusion

For a Proxmox-managed NFS share, the main configuration change is:

options vers=4.1,nconnect=4

The setting belongs in /etc/pve/storage.cfg, preferably added through the Proxmox web interface. The share must then be remounted before the new option becomes active.

Finally, verify the mount with nfsstat or findmnt, and inspect port 2049 connections with ss.

Multiple NFS connections can help a Proxmox node use a fast storage network more effectively, but they work best when the NAS and underlying disks are capable of sustaining the additional workload.