Poor NFS performance (50% or more overhead in OMV6 vs. TrueNAS Scale)

  • I'm doing a few experiments at home using proxmox virtual machines with PCIe passthrough NVME disks to the VM. I am seeing very poor NFS performance in OpenMediaVault 6.0 when I compare the same setup with different operating systems.


    The VMs have the following hardware settings (all same):

    - 4 vCPU

    - 2GB RAM

    - MTU 9000 / jumbo frames

    - Virtio NIC driver

    - PCI passthru NVME drive 256GB Samsung PRO 950


    I use fio to test SEQUENTIAL writes using these settings

    Code
    fio --name=fiotest --filename=/samsung/test1 --size=16Gb --rw=write --bs=1M --direct=1 --numjobs=8 --ioengine=libaio --iodepth=8 --group_reporting --runtime=60 --startdelay=60


    NVME write tests from OMV 6.0 OS show expected raw-disk performance:

    Code
    Run status group 0 (all jobs):
      WRITE: bw=897MiB/s (941MB/s), 897MiB/s-897MiB/s (941MB/s-941MB/s), io=52.6GiB (56.5GB), run=60062-60062msec
    
    Run status group 0 (all jobs):
      WRITE: bw=895MiB/s (938MB/s), 895MiB/s-895MiB/s (938MB/s-938MB/s), io=52.5GiB (56.4GB), run=60072-60072msec


    The proxmox host has 10GB SFP+ uplinks to a client in LAN switch doing these NFS tests. We mount the share via

    Code
     mount -o nfsvers=4.2 192.168.1.190:/sammy /mnt/derp/


    But the performance is very poor in OpenMediaVault 6.0 - 3 separate attempts output

    Code
      WRITE: bw=273MiB/s (286MB/s), 273MiB/s-273MiB/s (286MB/s-286MB/s), io=16.0GiB (17.2GB), run=60151-60151msec
    
      WRITE: bw=208MiB/s (218MB/s), 208MiB/s-208MiB/s (218MB/s-218MB/s), io=12.8GiB (13.8GB), run=63341-63341msec
    
      WRITE: bw=282MiB/s (296MB/s), 282MiB/s-282MiB/s (296MB/s-296MB/s), io=16.7GiB (17.9GB), run=60685-60685msec

    Shutting down the OMV 6.0 VM and starting up an UNRAID VM with the same hardware settings; then mounting NFS share on client with same settings result in these speed results (very close to max performance of raw disk/fio result)

    Code
      WRITE: bw=747MiB/s (784MB/s), 747MiB/s-747MiB/s (784MB/s-784MB/s), io=43.8GiB (47.1GB), run=60057-60057msec

    A different OS, TrueNAS Scale with same hardware and using NFS share (only difference here is no brtfs support in TNS - so I had to wipe disk and make it ZFS which uses DDR cache and speeds up the performance but skews the numbers as you see here):

    Code
    WRITE: bw=1468MiB/s (1539MB/s), 1468MiB/s-1468MiB/s (1539MB/s-1539MB/s), io=91.1GiB (97.8GB), run=63547-63547msec


    I think there's some performance optimizations possibly missing in OMV for NFS? Given UNRAID is able to provide 90% of the raw-disk performance over NFS some configuration setting feels amiss to me. The only variables in my tests are operating system (and ZFS exception case for truenas as noted before but still I can almost max out my 10Gbit network with all other OS but not with OMV over NFS).

    • Offizieller Beitrag

    I think there's some performance optimizations possibly missing in OMV for NFS?

    Sure, optimizations are possible. Why not contributing them to the openmediavault project? You are already testing it, so you can also test various settings and if you think they are fine, contribute them to the project so that everyone can participate from your tests and experience. This is how open source works.

  • How do I know this is not comparing apples to oranges, or this data is simply a reflection of the sustained write characteristics of a consumer SSD? Have you used pci-e passthrough for the nvme data drive or is it passed as raw disk?


    You can dismiss the TrueNAS Scale data in this context and you only mention btrfs is in the mix towards the bottom of your post.


    How do I know the mount params for the data drive are the same in each VM? Are the nfs export params the same in each VM? Are the mount characteristics on your unamed client the same in all cases (check output of nfsstat -m on client) ? Did you check iperf3 both client to server, server to client in all cases? Did you monitor the writes in the VMs and or the network traffic ?


    OMV6 is just debian 11 under the hood, so what do you think these “optimisations” might be?

  • There is an old post on this forum with some fine tunings about Nfs.

    Check This

    "https://forum.openmediavault.org/index.php?thread/31295-10gbe-nfs-tuning/"

    Best regards,


    Daniele.

    OMV 6.X.X

    HP Microserver Gen 10 Plus, 3X2TB Data , 1x4TB Parity , Usb Thumb for OS , 32g Ecc Ram.

    Plugins : SharerootFs; Kvm; MergerFs; Ups; Snapraid; Resetperms; Fail2ban; Owntone; Flashmemory; Symlinks; Compose ;

    Docker: Prowlarr, Swag; Transmission; Filebrowser; Polaris; Wireguard; Heimdall; GlueTun;

  • siteswap423 That's a great post by micdon showing how NB TCP stack optimisation can be in 10Gbe setups, especially when virtualised. The export params used look like the OMV6 defaults to me, you don't have to explicitly state async. Whether that's applicable in Proxmox is another question.

  • Sure, optimizations are possible. Why not contributing them to the openmediavault project? You are already testing it, so you can also test various settings and if you think they are fine, contribute them to the project so that everyone can participate from your tests and experience. This is how open source works.

    I don't mind contributing and sharing what may fix the performance issues I am seeing, Sure. That's the purpose of this post actually.

    Have you used pci-e passthrough for the nvme data drive or is it passed as raw disk?

    The VMs are directly 'passed thru' to VMs - it is not "mapped as raw disk" (aka there is no overhead from proxmox OS here since its passthru). More info: https://pve.proxmox.com/wiki/PCI(e)_Passthrough

    Check This

    "https://forum.openmediavault.org/index.php?thread/31295-10gbe-nfs-tuning/"

    Thank you I will check and play with these settings this weekend.

  • Update: I have been able to improve NFS performance on OpenMediaVault 6 to double what it was; the key to this improvement is the settings on the NFS share. UNRAID off the shelf still performs much faster than OMV6 with default settings; the tweak below did improve things 50%+

    I noticed "async" is used in unraid and also mentioned in https://wiki.archlinux.org/title/NFS#Performance_tuning


    I configured my OMV share with no_subtree_check,no_root_squash,async settings.


    I found OMV's default settings use 'subtree_check' setting which the manual of NFS exports explicitly call it as a bad choice:
    "From release 1.1.0 of nfs-utils onwards, the default will be no_subtree_check as subtree_checking tends to cause more problems than it is worth. If you genuinely require subtree checking, you should explicitly put that option in the exports file. If you put neither option, exportfs will warn you that the change is pending." -- source: https://linux.die.net/man/5/exports

    Then decided to experiment with Google's TCP BRR driver.


    and the tweaks suggested


    Results after all this stuff... better than original (OMV6 defaults) but still not as great as Unraid "default" - compared to where we started sub 200Mb/s this is much better.


  • TheLinuxGuy

    Glad to see you’ve got closer to comparing apples with apples by paying attention to the basics of configuring NFS shares. But I’d suggest that anyone making serious use of NFS, especially on a 10Gbe network, would not blindly apply default NFS share options whatever product they were using. You seem to be downvoting OMV6 as it didn’t do your thinking for you.


    Talking of thinking, here’s an example of a default NFS share on OMV6 and the underlying exports file:



    Code
    root@omv6:~# cat /etc/exports
    # This file is auto-generated by openmediavault (https://www.openmediavault.org)
    # WARNING: Do not edit this file, your changes will get lost.
    
    # /etc/exports: the access control list for filesystems which may be exported
    #               to NFS clients.  See exports(5).
    /export/example_A 192.168.0.0/24(fsid=7d724a89-a243-4d51-a6e1-fccbf5994712,rw,subtree_check,insecure)
    
    # NFSv4 - pseudo filesystem root
    /export 192.168.0.0/24(ro,fsid=0,root_squash,no_subtree_check,hide)


    How do you explain the use of “no_subtree_check” here? In any case, what makes the biggest difference, using async or no_subtree_check and it what sort of application other than just streaming data? OMV6 defaults to a sane safe choice. While you've not said what unRAID's export settings are, my guess is it defaults to the potentially unsafe async mode. Also unRAID offers a rather mysterious setting of "use cache" on its NFS share settings UI. I've no idea what the does under the hood.


    In any case you’ve still only looked at half the NFS story as you’ve made no attempt to compare the NFS server configuration on OMV6 and unRaid. Nor did you show whether you are even making a NFSv4 in both cases as you didn’t want to check the output of “nfsstat –m” on your linux client mounts or add a -vvv option to your mount command.


    OMV6 is configured to allow both nfsv3 and nfsv4 connections, is unRaid?


    • Offizieller Beitrag

    unraid can also focus on one architecture. OMV runs on armhf, arm64, i386, and amd64. So, OMV's defaults have to be a little more general than other NAS. But the fact that you can tweak the settings shows OMV's flexibility.

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!