Realtek 8139: Unpredictable, Best to Avoid
-
I stepped into the Pfsense (2.0.1) a few months ago and it's been an interesting ride and a long learning curve for me. I started out with a $25 P4-2.6-1Gb-40Gb gig I picked up and a $1.5 Realtek NIC. At this point I didn't know much about Pfsense, just saw this card in the bin and I remember seeing realtek everywhere in the recent years. After a quick hardware support list, it was naturally the card I picked.
The first Realtek card I got contained a Realtek 8139B chipset, made by Buffalo. The card actually ran very stably in the gig during the 4 week testing inside a 25 people guesthouse here in Japan. I don't really remembered a crash where I had to reboot the Pfsense box. However I started to suspect that my Pfsense box was the bottleneck for the bandwidth. We have a 65Mbps line, when I tested it directly from the cable modem. However right after the Pfsense LAN interface, it's a 30Mbps. This is when I learned that the Realtek 8139B card was only putting out 30Mbps in real life, although stable.
Since I have 4 different WAP (2 more daisy-chained), I thought I'll just get more 8139 NIC to share the load, so I went to the local computer junk bin and purchased 2 more Realtek 8139 NIC's. The second card of an unknown brand contained a Realtek 8139C chipset. Upon testing, I realized that it was actually outputting 100% of my internet connection at 65Mbps. This became my LAN interface card from then on. Then I noticed I was getting a lot of error message in the system log. The machine would slow down to a crawl after many broken pipes (sometimes up to 20) during rush hour and the webconfigurator would stop to respond. At that point, I lost all control of the box unless I reboot it. The internet would work, but very very slowly. I had to reboot the Pfsense box at least once a day to rid of this sudden slow down, and sometimes 2-3 times during rush hour. The other tenants were not happy. After about 4 weeks of Realtek 8139C, I've decided I'm just gonna hunt for a reliable card, although they're becoming a bit of a rarity here in Japan.
I was lucky enough to have found one Intel card in the bin that store just pulled out. It contained a giant Intel 82558B chip. It has been running stably for the past 3 days without any of the previous errors. Through this personal experience, I'd recommend AGAINST the 8139 family. They are not reliable enough for any major setup IMO. Yes they are cheap, but they are definitely not worth the hours you'll be wasting troubleshooting.
Still working on:
There are some testing I haven't finished with the current setup. For example the bandwidth right at the Intel LAN interface. (Tenants not happy about me unplugging their internet) I've also found out that wireless G is only good for 19Mbps in real life. I had initially thought that it'll be fine since I have 6 locations each with their own G router. This physical bottleneck would prevent any one device from utilizing the full bandwidth of 65Mbps. However I think my understanding is still flawed in this sense, I haven't seen the total network traffic went higher than 19Mbps, which is suspicious to me. -
You'll find no arguments here. :)
@FreeBSD:
- The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is
* probably the worst PCI ethernet controller ever made, with the possible
* exception of the FEAST chip made by SMC. The 8139 supports bus-master
* DMA, but it has a terrible interface that nullifies any performance
* gains that bus-master DMA usually offers.
However the newer Gigabit Realtek NICs are much better.
Steve
- The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is
-
You'll find no arguments here. :)
@FreeBSD:
- The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is
* probably the worst PCI ethernet controller ever made, with the possible
* exception of the FEAST chip made by SMC. The 8139 supports bus-master
* DMA, but it has a terrible interface that nullifies any performance
* gains that bus-master DMA usually offers.
However the newer Gigabit Realtek NICs are much better.
Steve
Can you recommend a few Realtek chip that I can look for? I am in Japan, so almost all home networks are operating at 100Mbit speed.
I found that the speed coming out of Intel 82558B chip is only 20Mbit, the lowest I've seen out of all cards. I'd have to put in maybe 4 of these cards to fully utilize the 70Mbps line I have here. It'd be nice to have just 1 Gigacard. I have 3 more builds coming up and I hope to be using all gigacards from now on.
- The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is
-
@kyu:
I found that the speed coming out of Intel 82558B chip is only 20Mbit, the lowest I've seen out of all cards.
I tried a 82559 Intel card in the box, same old 20-22Mbit. I thought I'd put in all 3 8255x Intel cards that I had into the box. Then after a reboot and install of PFsense, suddenly the speed of the first card jumped to the highest speed I've ever gotten 75Mbit. Then I figured maybe it was the PCI playing tricks with me. I unplugged the 2 extra cards and left the original one in there. Went into bios and disabled whatever built-in device I could. Turned off the PCI ROM (whatever that was) for the slots not being used. Now the PFsense box is outputting 75Mbit as it should.
At all ends of the network I can pull 70Mbit. Mystery solved. It was just the PC gig not keeping up with the PCI bandwidth through some odd setting.
-
@kyu:
I tried a 82559 Intel card in the box, same old 20-22Mbit. I thought I'd put in all 3 8255x Intel cards that I had into the box. Then after a reboot and install of PFsense, suddenly the speed of the first card jumped to the highest speed I've ever gotten 75Mbit. Then I figured maybe it was the PCI playing tricks with me. I unplugged the 2 extra cards and left the original one in there. Went into bios and disabled whatever built-in device I could. Turned off the PCI ROM (whatever that was) for the slots not being used. Now the PFsense box is outputting 75Mbit as it should.
At all ends of the network I can pull 70Mbit. Mystery solved. It was just the PC gig not keeping up with the PCI bandwidth through some odd setting.
See if you can find a setting in the bios called "PCI latency timer". It usually defaults to 32. You can try raising it to 128 clocks. Also, disable any unused hardware like audio/ parallel ports.
You should be able to pick-up Intel GBe nics from second hand stores for dirt cheap. I recall seeing several at the small alleys just outside of Akiba.
-
See if you can find a setting in the bios called "PCI latency timer". It usually defaults to 32. You can try raising it to 128 clocks. Also, disable any unused hardware like audio/ parallel ports.
You should be able to pick-up Intel GBe nics from second hand stores for dirt cheap. I recall seeing several at the small alleys just outside of Akiba.
Do you mind telling me roughly which side out of Akiba you saw them? I was flipping through the bins of all the shops I could find within 3 blocks west from the main street (Chuo Dori) in Akiba and all I found was probably 4 network cards and the two Intel 82550 at 300 a piece. Most shops don't carry used network cards anymore since there's little profit in them.. Thanks in advance.
-
Overnight the PC decided that the network card should be limited to 20Mbit, so I am back at the drawing board on how to make it 100Mbps.. odd prob..
-
I see that there may have been an issue with TSO in the fxp(4) driver specifically affecting the 8255X chip. Looks like it was patched in 2011. FreeBSD 8.1, the base for pfSense 2.0.2, is older than that but I know that more recent Intel drivers have been brought in. I don't know if that included fxp.
Try disabling TSO in System: Advanced: Networking: or try one of the 2.1 snapshots which will have newer drivers.The box I have here has 7 Intel 10/100 interfaces and has never given any trouble. :-\
fxp0: <intel 10="" 100="" 82559er="" embedded="" ethernet="">port 0xd000-0xd03f mem 0xfdbf0000-0xfdbf0fff,0xfdb00000-0xfdb1ffff irq 19 at device 9.0 on pci4 fxp1: <intel 10="" 100="" 82559er="" embedded="" ethernet="">port 0xd100-0xd13f mem 0xfdbf4000-0xfdbf4fff,0xfdb20000-0xfdb3ffff irq 18 at device 10.0 on pci4 fxp2: <intel 10="" 100="" 82559er="" embedded="" ethernet="">port 0xd200-0xd23f mem 0xfdbf2000-0xfdbf2fff,0xfdb40000-0xfdb5ffff irq 17 at device 11.0 on pci4 fxp3: <intel 10="" 100="" 82559er="" embedded="" ethernet="">port 0xd300-0xd33f mem 0xfdbf6000-0xfdbf6fff,0xfdb60000-0xfdb7ffff irq 16 at device 12.0 on pci4 fxp4: <intel 10="" 100="" 82559er="" embedded="" ethernet="">port 0xd400-0xd43f mem 0xfdbf1000-0xfdbf1fff,0xfdb80000-0xfdb9ffff irq 19 at device 13.0 on pci4 fxp5: <intel 10="" 100="" 82559er="" embedded="" ethernet="">port 0xd500-0xd53f mem 0xfdbf3000-0xfdbf3fff,0xfdba0000-0xfdbbffff irq 18 at device 14.0 on pci4 fxp6: <intel 10="" 100="" 82559er="" embedded="" ethernet="">port 0xd600-0xd63f mem 0xfdbf5000-0xfdbf5fff,0xfdbc0000-0xfdbdffff irq 17 at device 15.0 on pci4</intel></intel></intel></intel></intel></intel></intel>
Steve
Edit: Hmmm, reading the fxp(4) man page I'm not sure the 82558 actaully supports TSO at all. :-\
-
@kyu:
Do you mind telling me roughly which side out of Akiba you saw them? I was flipping through the bins of all the shops I could find within 3 blocks west from the main street (Chuo Dori) in Akiba and all I found was probably 4 network cards and the two Intel 82550 at 300 a piece. Most shops don't carry used network cards anymore since there's little profit in them.. Thanks in advance.
Been a while and I was only on a short holiday there.
Better luck asking this guy:
http://xmms.jp/blog/index.php?entry=entry101126-144051Added advantage that it seems he runs & experiments with pfSense as well..
-
I disabled TSO and it didn't help and I believe I've upgraded to 2.0.2 previously and it didn't help. I will try again in a few hours when everyone's off.
The odd thing was that when I put in extra cards (without using them), the speed of the first 82558 jumped to 100Mbit range. I suppose the worst case is I'll put in the garbage Realtek 8139 as dummies and see if that helps the speed. They were going to the dump anyway…. :)
Thanks for your help. I'll track down that guy in Japan and ask him about where he sources his NICs
-
2.0.2 is current stable release, based on FreeBSD 8.1.
The snapshots based on FreeBSD 8.3 are for pfSense 2.1. See: http://snapshots.pfsense.org/Steve
-
I just realized my fubar.
It was the traffic shaper limiting the speed to 20Mbit, not some "naturally" slowed down to 20Mbit. I started out with 65Mbit+ without the shaper, thought it was good enough and put in the shaper. Never did I suspect that the shaper actually put a cap on the speed of the LAN despite having the correct number put in….
Sorry guys, it's my fubar. The LAN card is fine and the PC wasn't doing anything weird. It's just me overlooking many things..
-
Easily done. Glad you got it sorted. :)
Steve
-
Easily done. Glad you got it sorted. :)
Steve
There's P2p abuse on the network, I will have to put in a shaper. Now the question is how to get the Shaper in place without limiting the potential of any router on the network accessing the available resource of the 65Mbit line… :-\
Good to know that the tried trust and true Intel 8255x are holding up though....
-
This should not be limiting to 20Mbps.
However this does put extra load on the cpu. It should be well within the capabilities of your P4 but check the output of 'top -SH' when it's limiting to make sure.Steve
-
This should not be limiting to 20Mbps.
However this does put extra load on the cpu. It should be well within the capabilities of your P4 but check the output of 'top -SH' when it's limiting to make sure.Steve
when I do top-Sh I can see the top going to 100%.. not exactly sure what i'm lookign at. If I just look at the output of top, everything's below 1%.
Without the shaper, the speed seems to vary (from 1 of the port of he switch) from 20 to 45Mbit as there are other traffic on the network. But whatever shaper I put in, it'll drop the speed down to below 20Mbit. I've tried different wizard, but they all seem to throttle the overall bandwidth even when I put in the correct up/down numbers.
My question is no longer with the hardware. Therefore I'll hop over to the other sub forum to troubleshoot traffic shaper.
Conclusion: Realtek 8139 can do the 100Mbit, but is unstable, a lot of crashes and resets. Intel 82559 is stable and able to do the 100Mbit throughput.