• r8125 driver for 2.5Gbit cards


    m00nman
    • Solved Minor

    Hi, I'm wondering if it's possible to include the r8125 realtek driver for 2.5Gbit/s realtek 8125B chips with the official images. The in-tree kernel driver r8169 is pretty bad for these cards. It is supported, it works, but the throughput with r8169 driver is nowhere near the throughput of r8125 driver. I'm personally getting 1.1 Gbit/s tops with IOCREST dual 2.5 gbit adapter, while I was getting at least 2.1 with r8125 with proxmox on the same system. Unfortunately it is not that simple to compile these ourselves for unraid.

     

    The repository that is mostly used for this drive is https://github.com/awesometic/realtek-r8125-dkms




    User Feedback

    Recommended Comments

    Realtek drivers are really hit and miss. You'll have an easier time ditching any network device using that company's chipsets. Every time Limetech tried different Realtek drivers in a release in the past, it proved to be nothing but headaches all around with the sort of "Solve one problem and create dozens more" scenario.

     

    I know it's not what you want to hear and doesn't help you, but that's the reality.

    • Thanks 1
    Link to comment
    4 hours ago, BRiT said:

    Realtek drivers are really hit and miss. You'll have an easier time ditching any network device using that company's chipsets. Every time Limetech tried different Realtek drivers in a release in the past, it proved to be nothing but headaches all around with the sort of "Solve one problem and create dozens more" scenario.

     

    I know it's not what you want to hear and doesn't help you, but that's the reality.

     

    That is fair, and I get it, it's difficult to support out of tree drivers. I suppose all I'm asking is to have the *.ko included and then users can manage themselves which driver to use. r8169 can stay the default, and if someone really needs to then can blacklist it. I see a bunch of people with this chip on the forums, and frankly realtek's 8125B chip solution ended up being better than Intel's i225-V.

    • Thanks 1
    Link to comment

    The performance difference at 2.5Gbps may be caused by the fact that r8169 doesn't support RSS. All load is on one CPU. Background is that Realtek doesn't provide any data sheets.

    You may be able to improve the performance by using packet coalescing at GRO level by using the following settings.

    You can play with the values. Feedback whether this improves the performance would be appreciated.

     

    echo 20000 > /sys/class/net/<if>/gro_flush_timeout
    echo 10 > /sys/class/net/<if>/napi_defer_hard_irqs

    • Thanks 2
    Link to comment
    17 hours ago, hkall said:

    The performance difference at 2.5Gbps may be caused by the fact that r8169 doesn't support RSS. All load is on one CPU. Background is that Realtek doesn't provide any data sheets.

    You may be able to improve the performance by using packet coalescing at GRO level by using the following settings.

    You can play with the values. Feedback whether this improves the performance would be appreciated.

     

    echo 20000 > /sys/class/net/<if>/gro_flush_timeout
    echo 10 > /sys/class/net/<if>/napi_defer_hard_irqs

    Thanks, I'll try it out when I have the chance. What latency impact would this have? My unraid box has opnsense VM running which is the router for my home network for the internet.

    Link to comment
    On 11/29/2022 at 10:28 AM, m00nman said:

    Thanks, I'll try it out when I have the chance. What latency impact would this have? My unraid box has opnsense VM running which is the router for my home network for the internet.

    It should have less impact on latency than traditional hardware IRQ coalescing. However I can't quantify it. Few more details you can find in original_commit_message

    Link to comment
    On 11/28/2022 at 9:21 AM, hkall said:

    The performance difference at 2.5Gbps may be caused by the fact that r8169 doesn't support RSS. All load is on one CPU. Background is that Realtek doesn't provide any data sheets.

    You may be able to improve the performance by using packet coalescing at GRO level by using the following settings.

    You can play with the values. Feedback whether this improves the performance would be appreciated.

     

    echo 20000 > /sys/class/net/<if>/gro_flush_timeout
    echo 10 > /sys/class/net/<if>/napi_defer_hard_irqs

    Tested these out by setting these paremeters to both of my 8125B NICs and I have to say this does work very well.

     

    unraid (samsung 870 evo cache drive) to my PC speed was constant at 220MB/s (vs fluctuating 220-235 with r8125 driver) and never fell to Gigbait levels.

    PC to unraid was identical for both drivers at 283MB/s

     

    Did not notice much difference in CPU Load, it seemed to be about the same. Latency may be a little better under load with r8125. Now it's definitely worth keeping r8169 driver over the hassle of getting r8125.

    • Thanks 1
    Link to comment
    On 12/5/2022 at 11:51 PM, m00nman said:

    Tested these out by setting these paremeters to both of my 8125B NICs and I have to say this does work very well.

     

    unraid (samsung 870 evo cache drive) to my PC speed was constant at 220MB/s (vs fluctuating 220-235 with r8125 driver) and never fell to Gigbait levels.

    PC to unraid was identical for both drivers at 283MB/s

     

    Did not notice much difference in CPU Load, it seemed to be about the same. Latency may be a little better under load with r8125. Now it's definitely worth keeping r8169 driver over the hassle of getting r8125.

    Good to hear that it helped, thanks for the comprehensive feedback.

    Link to comment

    Hi,

     

    I also tried this solution and in my case I have the same bad performance with the r8169 original kernel driver as before. I use the bond0 in active backup configuration for two nics. Is this an problem? Eth0 is my Realtek 2,5GBit network card so I entered the following commands:

     

    "echo 20000 > /sys/class/net/eth0/gro_flush_timeout

    echo 10 > /sys/class/net/eth0/napi_defer_hard_irqs"

     

    In my case performance is only 35MByte/s connection is 2,5 GBit/s.

     

    best regards René

    Link to comment
    1 hour ago, rene54321 said:

     

    In my case performance is only 35MByte/s connection is 2,5 GBit/s.

     

     

    Hi,

     

    If you haven't updated to 6.12.x you can try this:

     You will probably need to use google translate.

     

    Otherwise, are you sure there are no other bottlenecks ? Are HDDs using SATA connection. 35MB/s is suspiciously similar throughput to USB 2.0 throughput.

    I have eventually rearranged my setup so that realtek NICs went into windows computers and my Aquantia 5Gbit/s NIC went into unraid server. Funnily enough Realtek has a better Windows driver, and Aquantia has a better linux driver.

    Link to comment

    Hi,

     

    thanks a lot I tried this solution with the older UNRAID 6.11.5 and it was working. But I dont want to exchange the whole bzmodules and bzimage. There could be anything included. Better way would be to have an application or directly included better driver.

     

    Best regards René

    Link to comment
    On 6/26/2023 at 8:27 PM, rene54321 said:

    I use the bond0 in active backup configuration for two nics.

    Do you have the same issue without a bond? Strange thing about this NIC is that the 8169 driver works fine for most users, including for me, I get line speed on both directions.

    Link to comment

    Hi,

     

    yes it is the same without bond0. If the 2,5GBit LAN adpater is used then the upload speed drops to approx 30MByte/s.

     

    best regards René

    Link to comment
    On 6/28/2023 at 8:40 AM, rene54321 said:

    Hi,

     

    thanks a lot I tried this solution with the older UNRAID 6.11.5 and it was working. But I dont want to exchange the whole bzmodules and bzimage. There could be anything included. Better way would be to have an application or directly included better driver.

     

    Best regards René

     

    Someone made a plugin in unraid (Thanks jinlife!). You should be able to use that now
     

    image.png

    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.