Raspberry PI 4 vs EdgeRouter X

yep... and i'm laughing right back at them... you all have good points... and some nic's will be flakey or overheat or crap out if being pumped non-stop... but we are talking maybe 1 in 7 users on the forum max... it's almost superstition not reality...

Not sure what your budget is, but I have some older, never used Gateworks Ventana 5410 from a project that never went forward. They were over $350 but I would part with some for $100. Note I had a special stuffing to remove the serial ports and video to cut down on heat and cost.

They have 2 X GbE, 512 MB ram, 256 GB Flash, a quad core 1 GHz CPU and a whopping SIX mini PCIe slots for wireless. One slot can be set for a mSata device and I have used 16GB and 485 GB quite nicely. I also lose 1 PCI because I put a heat sink over the PCI bridge chip. With a very small 2" fan they run nice and cool and then you don't really need the PCI Bridge heat sink, so you gain that PCIe back. For home use I don't need any more than 3 wifi, so I keep the heat sink. The boards are 5.5" X 4". Power can be Power Over Ethernet but it cuts one Ethernet to 100 mbps or use the DC jack for 12V to 48V input.

These were destined for a Wireless ISP product with 6 Wifi Radios to build a multiple AP and back haul application. Find a high spot and you can cover a lot of ground.

Openwrt runs very well and Gateworks has a build that can show all of the onboard sensors. I have used 802.11n and 802.11ac cards, as supported by Openwrt.

@remlei I'm afraid the only laughter is that your 'extensive experience' dates back to a 21 year old USB standard on a netbook. Not one - note, not ONE - person who's ever done the "USB bad, mmmmmkay" bit on this forum has even produced one iota of real-world evidence, just pure conjecture and anecdotal data.

I, on the other hand, will put my reputation where my mouth us. My dmesg:

[    7.710910] usbcore: registered new interface driver r8152
[    7.717950] usbcore: registered new interface driver usbhid
[    7.723593] usbhid: USB HID core driver
[    7.730151] xt_time: kernel timezone is -0000
[    7.745834] PPP generic driver version 2.4.2
[    7.750558] NET: Registered protocol family 24
[    7.756439] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    7.764280] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    7.780118] usbcore: registered new interface driver brcmfmac
[    7.787126] kmodloader: done loading kernel modules from /etc/modules.d/*
[    7.856426] usb 2-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[    7.938258] r8152 2-1:1.0 eth1: v1.10.11
[    9.365753] bcmgenet: Skipping UMAC reset
[    9.371207] bcmgenet fd580000.ethernet: configuring instance for external RGMII
[    9.378736] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[    9.387455] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   11.313394] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   11.319990] r8152 2-1:1.0 eth1: carrier on

(note the complete absence of any USB errors of any kind, that's the end of the console log)

My ifconfig:

eth0      Link encap:Ethernet  HWaddr DC:A6:32:E4:68:99
          inet addr:172.16.0.1  Bcast:172.16.255.255  Mask:255.255.0.0
          inet6 addr: fe80::dea6:32ff:fee4:6899/64 Scope:Link
          inet6 addr: fdee:8f3f:ad91::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:657734145 errors:312 dropped:313 overruns:0 frame:0
          TX packets:645733546 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:807074791210 (751.6 GiB)  TX bytes:535439342514 (498.6 GiB)

Please note those errors are from upstream that occurred during the most severe thunderstorm of the past two decades.

Uptime:

21:27:24 up 8 days, 5:45, load average: 0.00, 0.01, 0.00

which is when I flipped to RC4.

This is all connected to a bidirectional gigabit fiber setup over FiOS with direct ONT hookup.

Feel free to show evidence of all the USB failures you've experienced on OpenWRT so the community can benefit, but please no more stories about you got a tummyache from a peanut butter and jelly sandwich in primary school and thus you don't trust modern-era technology you've never used or likely seen.

6 Likes

Hi all,
Please forgive my ignorance since I don't know much about cpu architectures but isn't there a huge "horse power" difference -at least on paper- between the processors of these two devices?
How can the two devices be compared? I'm so confused.
BCM2711 (ARM Cortex-A72 1.5 GHz, 4 cores-4 threads)
vs.
MT7621AT (MIPS 1004Kc 880MHz, 2 cores-4 threads)

ulpian

Yes, however, remember, we are talking about networking equipment. And running network workloads may or may not be much related to pure CPU "horse power". Lot's of those rather "under-powered" SoCs like the MT7621AT do have special network engines which tremendously accelerate certain network workloads. But, of course, this usually also requires driver support.
Anyway, this may actually be one of them few valid points against using USB as the overhead there is completely contrary to anything being accelerated. On the other hand, if pure CPU "horse power" is enough to make a certain use-case work, why not?

2 Likes

There most definitely is a huge difference. But it all comes down to what you need. An AMD Ryzen 32 core "Thread Ripper" CPU has a lot of horsepower, but if all you are doing is e-mail, internet and some word processing, maybe a spreadsheet or two, its tremendous over-kill for a desktop PC.

In this case, the OP's router will be in a small enclosed wall cabinet, so a cool running ER-X or Microtik RB750GR3 (essentially an ER-X with a plastic case and harder OpenWrt install process) that meets all performance needs can be a better solution than a hot running RPI4. The RPI4 also needs a switch that has to fit in that small wall cabinet and - I hate to even bring it up given the tangent this thread has drifted off onto - a USB ethernet dongle.

@dynamiccarrots The Microtik RB750GR3 might be another one to consider if you decide on an ER-X, but can't find an ER-X or it is too expensive. Like the ER-X, it is tiny, has 5 ports, runs cool (same SoC as the ER-X) and can have a second life as an overpowered switch someday if you later upgrade to an RPI4 or NanoPi R4S. The downside is OpenWrt installation looks a bit more complicated the first time. Speaking of which, be sure an ER-X is on EdgeOS 2.x and the bootloader has also been upgraded to the Ubiquity v2 bootloader BEFORE you flash OpenWrt. The Ubiquity v2 bootloader is far easier to recover your ER-X with if you accidentally brick it.

2 Likes

Oh I see what you mean. I learned something new today! Thank you so much for your detailed explanation.

ulpian

Yes I understand what you mean exactly. So er-x or rb750gr3 are the most ideal routers in this specific use case. Runs cooler, has small footprint in overall, powerful enough to do it's job etc.
Thanks for you message! I appreciate it. Have a good one.
ulpian

There is no disputing the Raspberry Pi 4 for performance, its quad core SoC is a beast and should do shaping up to at or near a gigabit where almost no other OpenWrt "router" will do that. A few will come close like the Mvebu (WRT32X / WRT3200ACM) and R7800 with NSS core drivers, but not much else. The Rpi4 also has a massive amount more ram and storage.

If you don't mind tinkinering go with the Rpi4, usb gigabit ethernet dongle, gigabit switch, and wifi6 access point combo. I have this as a fun project and it works extremely well. It'll be a seriously good setup but a lot of things hanging around. If you want something more simple/straight forward albiet with lower performance ERX of course.

2 Likes

The CPU cores are a part of the SoC, like a car there's more than just the engine that contributes to the overall experience and performance.

There's no "clean cut" way to compare SoCs on paper as they can behave very differently depending on workload. In general you can consider MIPS overall slower than ARM however there are many variants of ARM cores /SoCs around and as far as performance goes MIPS can be perfectly fine for your workload however overall development is much more focused on ARM (mainly 64-bit) compared MIPS.

In general MT7621 can handle about 500mbit/s in terms of traffic, most ARM SoCs that are dual core or better can do gbit speeds fine however depending on driver support performance can be very different between SoCs despite looking "beefy" on paper.

Hi,
Thank you for your detailed and clear explanation. It was very helpful and understandable.

ulpian

Hi ulpian.

I have exactly this setup (Raspberry Pi 4 with an Anker USB3 ethernet dongle) and it flies with absolutely no problems. It is way better than the stock router my ISP provided. I’m running SQM, so even when my connection is maxed out (which is rare) applications remain very responsive. Despite being a tinkerer, I’ve had very little to do. It all works very well out of the box. The only sticky bit, which wasn’t very sticky, was working out what chipset was in the dongle and installing the drivers.
If your WAN connection is more than 600Mbits, I understand that in some cases USB overhead may cause a bottleneck, but in that case, you could look at DFRobot’s Raspberry Pi Compute Module 4 IoT Router Carrier Board, which gives you a second ethernet port via the PCIe bus rather than USB.

2 Likes

Nah, on a Pi 4, it'll do full gigabit over USB. The real 'price' to be paid is the additional 1ms latency on the dongle side of the house, but other than that it's just as fast in every other respect as onboard.

You might want to consider irqbalance or hand-pinning the onboard RX/TX interrupts to cores other than 0, though. That will limit aggregate throughput if you don't. Unfortunately you can't move USB off 0, but in practice that makes no difference.

4 Likes

I think Ubiquiti erx has support for hardware flow offloading that will give this device gigabit support. But then you can't use Sqm.

Another option mentioned earlier is rockpro 64. I've used it for "home production" for some time now, seems to work good. There's two annoying things though:

  1. I have to compile custom images to get support for my Intel mic (Intel i350, Fujitsu D3045-A11). You could also download all the required packages, connect to the onboard Realtek port, and do an offline installation of the drivers. First option is imo easier though.
  2. There's no (or was no) good compact cases for housing a single low-profile pci card. Had to build my own - it's basically a box with holes for all network ports.

EDIT: One more thing, I got obsessed by SQM, ran OpenWrt using a 6:th gen I5. Now I'm not even using it. Off course it depends on your situation, but in my case, in practise, I never noticed any real gain. Sometimes the chase is better than the ... :wink:

EDIT2: Just discovered that after a power-loss the device will not boot automatically. This is could definitely be a deal-breaker for this type of device.

In that case RockPro64 and a PCIe NIC is a cheaper option and it also does hardware crypto....

This isn't a recommendation as I haven't benchmarked the effect of the change, but I added pci=nomsi to the kernel command line in /boot/cmdline.txt, and the net effect was to move the usb3 xhci interrupts to the GiCv2 space and allowed their core affinity to be set.

I think this is something you would probably not want to do on any conventional motherboard with PCIe slots populated with graphics cards and NiCs and what have you, and I'd test carefully if using additional usb devices that generate more activity than, say, an HID device, but for this application it's been performing well for months with no evident side effects.

2 Likes

Good info! I will test this out ASAP.

hAP ac² is also interesting, it is supported since 21.02. I don't know how it performs with OpenWRT against those MT7621AT devices though

1 Like

Gave this a shot - haven't benched it either, but it's working well/as expected otherwise. Thanks for the tip!

1 Like

Having used Mikrotik hap AC, Edgerouter lite (with Openwrt) previously and currently on Raspberry Pi4, I wouldn't be going back to either Mikrotik / Ubiquiti. If you have a typical home network Mikrotik / Ubiquiti are overkill and if you got a more complex setup like VLANs, VPNs, MultiWAN etc then things starts to go wrong.

The entry level Mikrotiks require "Fasttrack" (acceleration) to be disabled when any kind of policy routing is used. Same for MultiWAN. The Mikrotik hap AC when used without acceleration would spike to 100% cpu with just 100 Mbps WAN and QoS. The Edgerouter lite was somewhat better but still would struggle with 200 Mbps

I am very happy with Raspberry Pi4 running 21.02 release. I have dual WANs controlled by MWAN3 and SQM. The WAN connections come through TP-Link UE300. I am also using LXC to run Pi-hole and Grafana in containers. The Pi temps hardly reaches 45 degrees and there is hardly any cpu load with all this. The UE300 also runs very cool but then my WAN connections are just 100 Mbps each

Apologies for the long post !!

5 Likes