Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Terrible SR-IOV Performance

    Scheduled Pinned Locked Moved Virtualization
    5 Posts 3 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • v1k0d3nV
      v1k0d3n
      last edited by v1k0d3n

      I've seen some discussions around SR-IOV issues with pfSense in the past, but I wanted to revisit this again. Here are some details on the setup...

      pfSense (in this case) is essentially running as a KVM workload, but all the instantiation of the virtual machine (i.e. the KVM XML config) is being orchestrated by KubeVirt/OpenShift. Yes, pfSense is running via Kubernetes in this case. Why? Because using this deployment strategy, I can leverage a GitOps deployment model for pfSense and run a Kubernetes job to configure pfSense at the time of boot. In testing (I tweeted some of my findings HERE.

      I found that pfSense running with SR-IOV-based interfaces has ridiculously poor performance. Considering that these interfaces are leveraging 25G XXV710-DA2 NICs...this is kind of terrible:
      f262cd1a-4af9-4d04-ada9-544d38aa83e2-image.png

      But if I remove SR-IOV in favor of a standard KVM-based Linux bridge, I start seeing much better performance. It's still not 25G, but it's more reasonable.
      68d7ce72-ea12-47a0-875a-54c629abdf69-image.png

      With 2 Fedora hosts, and using the exact same SR-IOV-based configuration (called a NetworkConfigurationPolicy + NetworkAttachementDefinition in KubeVirt/OpenShift), I am able to saturate the 25G link running a bidirectional iperf3 test.
      9c5b7962-92d8-49a8-81fa-078447090bcd-image.png

      Should I assume that pfSense network performance is just this bad when using SR-IOV, or is there some tunable other than what I've read/followed on the Netgate wiki? I have seen complaints in the past about poor pfSense SR-IOV performance with other hypervisors, but SR-IOV is a really common use case at this point and it's incredibly useful to have for a security device. As we start to use pfSense in more virtualized deployment scenarios, it would be nice to see things like SR-IOV-based performance improved.

      Dobby_D 1 Reply Last reply Reply Quote 0
      • Dobby_D
        Dobby_ @v1k0d3n
        last edited by

        @v1k0d3n

        I found that pfSense running with SR-IOV-based interfaces has ridiculously poor performance.

        Perhaps it is not really made for that "perfromance"
        and/or throughput? Did you consider to give TNSR
        a try out?

        Considering that these interfaces are leveraging 25G XXV710-DA2 NICs...this is kind of terrible:

        I have seen and heart about peoples were getting out
        with a10 GBit/s port NIC something around ~2 GBit/s
        in "real life" and 4 GBit/s till 4,7 GBit/s with measuring
        as entire throughput. So if you get out now something
        around nearly 7 GBit/s with a 25 GBit/s adapter, you
        have at my counting +1 GBit/s on top of the others
        using "only" 10 GBit/s hardware.

        Should I assume that pfSense network performance
        is just this bad when using SR-IOV, or is there some
        tunable other than what I've read/followed on the
        Netgate wiki?

        Perhaps you could be getting out here and there
        something more (throughput) with one or more
        tunings, for sure this must be testet out again and
        again so that all tunings will be matching fine.

        As we start to use pfSense in more virtualized
        deployment scenarios, it would be nice to see
        things like SR-IOV-based performance improved.

        pfSense is using FreeBSD as underlying OS and if
        this will be a driver related "thing" they can´t much
        do in that case. But again did you thinking on TNSR
        in that case? It is more for that higher throughput
        made as I am informed.

        #~. @Dobby

        Turris Omnia - 4 Ports - 2 GB RAM / TurrisOS 7 Release (Btrfs)
        PC Engines APU4D4 - 4 Ports - 4 GB RAM / pfSense CE 2.7.2 Release (ZFS)
        PC Engines APU6B4 - 4 Ports - 4 GB RAM / pfSense+ (Plus) 24.03_1 Release (ZFS)

        v1k0d3nV 1 Reply Last reply Reply Quote 0
        • v1k0d3nV
          v1k0d3n @Dobby_
          last edited by

          @dobby_ I would expect TNSR to work as advertised. This initial test/demo was to see where pfSense is at in terms of SR-IOV, since it’s still Netgate’s answer to a virtualized firewall. Fair response/questions - thanks for the feedback.

          johnpozJ 1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @v1k0d3n
            last edited by

            @v1k0d3n Curious what was your speed when you actually used pfsense as a router vs a host..

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            v1k0d3nV 1 Reply Last reply Reply Quote 0
            • v1k0d3nV
              v1k0d3n @johnpoz
              last edited by

              @johnpoz with or without SR-IOV? Maybe you're asking for both scenarios, but in the case with SR-IOV I don't even know if it's worth testing with what I'm able to tell at this point...

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.