Member Login | Register

Navigation

Home Blog Forums FAQ

Home Home : All Forums : Hardware : APU Search Forums Go APU2C4 max throughput? Recent Posts My Posts My Subscriptions Subscribe New Topic Reply

Next 1 2

bit_shifter - Posted Apr 22nd 2016 Quote Rate Hi,

I just received my APU2C4 and I'm trying to set it up as a firewall/router. I updated the BIOS to 20160311, which seems to be the latest, My Posts and I installed OpenBSD 5.9 on the internal mSATA SSD. I have almost nothing setup or installed beyond the base OpenBSD install except Posts: 2 iperf to test performance. I've tested throughput several times on em0 and em2 interfaces, with iperf, and I seem to be maxing out around 670 mb/s as a server and 420 mb/s as a client. I'm testing to two other very different machines connected via an unmanaged gigabit switch -- an Arch desktop machine and a FreeBSD 10.3 machine. Between the Arch Linux and FreeBSD machines I can get a full ~950 mb/s both ways.

If I run on the APU while the iperf tests are running, I see that 1 out of the 4 cores is at ~100% usage from a system process -- this bounces around to different cores while it runs. So, it would seem that, at least with low mtu sizes (default 1500), this might be the cap on throughput. Is this an OpenBSD limit? Has anybody gotten better throughput using Linux or FreeBSD/pfSense?

I've tried all of the suggestions on https://calomel.org/network_performance.html as well, but they made no real difference. The only thing that got me any real performance benefit was disabling pf, which I obviously won't do once this is in production.

Once I set the NIC's MTU to 9000, I'm able to saturate the gigabit link, even with pf enabled (albeit with no rules currently). Are there any down sides to having the NICs default to 9000 MTU? I remember having compatibility issues at one point due to "jumbo frames", but I don't remember the specifics of it. I've got a mix of wired and wireless devices in the house including: PCs, game consoles, IP cameras, and Android phones. My WAN link via Comcast is only 125 mbps right now, so even the default MTU will saturate that, but I might be getting a gigabit link in the near future and I don't want the router to be the weak link.

I'm new to OpenBSD, so there's a possibility that I'm missing something obvious, but I've tried to do my homework on it. Thanks for any information.

Rhysee - Posted Apr 22nd 2016 Quote Rate What temps are you getting ?

Wondering if you are using PfSense ? .. 950mb/s seems accetable? My Posts

Posts: 15 bit_shifter - Posted Apr 23rd 2016 Quote Rate

Rhysee - Posted 16 Hours Ago

My Posts

Posts: 2 What temps are you getting ?

Wondering if you are using PfSense ? .. 950mb/s seems accetable?

For temps, it maxes out around 63C during a CPU-intensive workload like memtest. It idles around 56C.

I'm using OpenBSD 5.9 on the APU. 950 mb/s is definitely acceptable! I guess I wasn't very clear on that part -- I'm getting 950 mb/s between two desktop machines on the same network with no APU involved. I just tested that to verify that neither of those machines was the bottleneck when testing with the APU.

I AM able to max out a gigabit link (950 mb/s+) on the APU when I change the MTU to 9000. I wanted to verify that setting the MTU to a higher number wasn't going to cause compatibility issues or limit me when(/if) I get a gigabit fiber to the home connection. I guess FTTH providers would allow higher MTUs? If they don't, then this hardware (or software?) won't cut it for me when that time comes.

If it's a limitation of OpenBSD, whether the driver or TCP/IP stack, then I'll switch to something else -- preferably pfSense. I just would rather not wipe this OpenBSD install just to test pfSense to see whether it will be the same.

EDIT: Degrees C, not F...

Post last edited Apr 23rd 2016

sparkie - Posted Apr 24th 2016 Quote Rate What exactly did you test? Forwarding with firewall rules between APU2C4 ethernet ports?

In the simplest case I'm running 2 APU2C4 boards against each other on the same network (2 low-cost/unmanaged switches in between). My Posts No firewalling (iptables) at all involved in this test. One APU2C4 as iperf server the other one as iperf client gives me excellent: Posts: 31 32 root@rota2[/root] > iperf -c rota1 ------Client connecting to rota1, TCP port 5001 TCP window size: 43.8 KByte (default) ------[ 3] local 192.168.24.78 port 35547 connected with 192.168.24.79 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 1.10 GBytes 942 Mbits/sec

I'm running Debian 8.4 (i686 GNU/Linux) on both machines 24/7. Temperature stays around amazing 56C most of the time.

34 root@rota2[/root] > sensors k10temp-pci-00c3 Adapter: PCI adapter temp1: +56.1°C (high = +70.0°C) (crit = +105.0°C, hyst = +104.0°C)

Post last edited Apr 25th 2016

arfett - Posted May 17th 2016 Quote Rate I realize this isn't the most hardcore test of throughput but on my APU2C4 running Ubuntu Server 15.10 with kernel 4.5.1 I can run speed tests at 340-380mbit download and all 4 of my cores are 92% idle or more. Torrenting at these speeds with many hundreds of connections my cores are about 90% idle or more. I suspect I'll have zero issues firewalling full gigabit when that's available to me this summer. My Posts

Posts: 9 My iptables rules below:

Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 23970 2158K ACCEPT all -- enp2s0 any anywhere anywhere ctstate RELATED,ESTABLISHED 0 0 ACCEPT tcp -- enp2s0 any anywhere anywhere multiport dports REMOVED,REMOVED 3419 531K ACCEPT tcp -- br0 any anywhere anywhere multiport dports REMOVED,REMOVED,REMOVED,REMOVED,REMOVED 6516 546K ACCEPT all -- lo any anywhere anywhere 18 696 ACCEPT icmp -- enp2s0 any anywhere anywhere icmp echo-request 0 0 ACCEPT icmp -- br0 any anywhere anywhere icmp echo-request 0 0 ACCEPT icmp -- br1 any anywhere anywhere icmp echo-request 114K 24M REJECT all -- any any anywhere anywhere reject-with icmp-port-unreachable

Chain FORWARD (policy DROP 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 20M 79G ACCEPT all -- enp2s0 br0 anywhere anywhere ctstate RELATED,ESTABLISHED 1360K 4776M ACCEPT all -- enp2s0 br1 anywhere anywhere ctstate RELATED,ESTABLISHED 20M 8933M ACCEPT all -- br0 enp2s0 anywhere anywhere 3354K 187M ACCEPT all -- br1 enp2s0 anywhere anywhere 1654 89808 ACCEPT tcp -- any any anywhere REMOVED tcp dpt:REMOVED 0 0 ACCEPT udp -- any any anywhere REMOVED udp dpt:REMOVED 0 0 DROP all -- any any anywhere anywhere

Chain OUTPUT (policy ACCEPT 107K packets, 27M bytes) pkts bytes target prot opt in out source destination

Chain PREROUTING (policy ACCEPT 208K packets, 27M bytes) pkts bytes target prot opt in out source destination 1830 97244 DNAT tcp -- enp2s0 any anywhere anywhere tcp dpt:REMOVED to:REMOVED:REMOVED 0 0 DNAT tcp -- enp2s0 any anywhere anywhere tcp dpt:REMOVED to:REMOVED:REMOVED

Chain INPUT (policy ACCEPT 36 packets, 1684 bytes) pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 7537 packets, 746K bytes) pkts bytes target prot opt in out source destination

Chain POSTROUTING (policy ACCEPT 2984 packets, 304K bytes) pkts bytes target prot opt in out source destination 103K 9957K MASQUERADE all -- any enp2s0 anywhere anywhere

mattlach - Posted Jun 7th 2016 Quote Rate

bit_shifter - Posted Apr 22nd

My Posts

Posts: 11 Hi,

I just received my APU2C4 and I'm trying to set it up as a firewall/router. I updated the BIOS to 20160311, which seems to be the latest, and I installed OpenBSD 5.9 on the internal mSATA SSD. I have almost nothing setup or installed beyond the base OpenBSD install except iperf to test performance. I've tested throughput several times on em0 and em2 interfaces, with iperf, and I seem to be maxing out around 670 mb/s as a server and 420 mb/s as a client. I'm testing to two other very different machines connected via an unmanaged gigabit switch -- an Arch Linux desktop machine and a FreeBSD 10.3 machine. Between the Arch Linux and FreeBSD machines I can get a full ~950 mb/s both ways.

If I run top on the APU while the iperf tests are running, I see that 1 out of the 4 cores is at ~100% usage from a system process -- this bounces around to different cores while it runs. So, it would seem that, at least with low mtu sizes (default 1500), this might be the cap on throughput. Is this an OpenBSD limit? Has anybody gotten better throughput using Linux or FreeBSD/pfSense?

I've tried all of the suggestions on https://calomel.org/network_performance.html as well, but they made no real difference. The only thing that got me any real performance benefit was disabling pf, which I obviously won't do once this is in production.

Once I set the NIC's MTU to 9000, I'm able to saturate the gigabit link, even with pf enabled (albeit with no rules currently). Are there any down sides to having the NICs default to 9000 MTU? I remember having compatibility issues at one point due to "jumbo frames", but I don't remember the specifics of it. I've got a mix of wired and wireless devices in the house including: PCs, game consoles, IP cameras, and Android phones. My WAN link via Comcast is only 125 mbps right now, so even the default MTU will saturate that, but I might be getting a gigabit link in the near future and I don't want the router to be the weak link.

I'm new to OpenBSD, so there's a possibility that I'm missing something obvious, but I've tried to do my homework on it. Thanks for any information.

That is odd, don't all APU2C4's have i210at adadters? Those should be using the igb driver, not the em driver.

The APU2C2 - on the other hand - has i211at chips, which I believe use the em driver.

arfett - Posted Jun 8th 2016 Quote Rate

mattlach - Posted 4 Hours Ago

My Posts

Posts: 9 bit_shifter - Posted Apr 22nd

Hi,

I just received my APU2C4 and I'm trying to set it up as a firewall/router. I updated the BIOS to 20160311, which seems to be the latest, and I installed OpenBSD 5.9 on the internal mSATA SSD. I have almost nothing setup or installed beyond the base OpenBSD install except iperf to test performance. I've tested throughput several times on em0 and em2 interfaces, with iperf, and I seem to be maxing out around 670 mb/s as a server and 420 mb/s as a client. I'm testing to two other very different machines connected via an unmanaged gigabit switch -- an Arch Linux desktop machine and a FreeBSD 10.3 machine. Between the Arch Linux and FreeBSD machines I can get a full ~950 mb/s both ways.

If I run top on the APU while the iperf tests are running, I see that 1 out of the 4 cores is at ~100% usage from a system process -- this bounces around to different cores while it runs. So, it would seem that, at least with low mtu sizes (default 1500), this might be the cap on throughput. Is this an OpenBSD limit? Has anybody gotten better throughput using Linux or FreeBSD/pfSense?

I've tried all of the suggestions on https://calomel.org/network_performance.html as well, but they made no real difference. The only thing that got me any real performance benefit was disabling pf, which I obviously won't do once this is in production.

Once I set the NIC's MTU to 9000, I'm able to saturate the gigabit link, even with pf enabled (albeit with no rules currently). Are there any down sides to having the NICs default to 9000 MTU? I remember having compatibility issues at one point due to "jumbo frames", but I don't remember the specifics of it. I've got a mix of wired and wireless devices in the house including: PCs, game consoles, IP cameras, and Android phones. My WAN link via Comcast is only 125 mbps right now, so even the default MTU will saturate that, but I might be getting a gigabit link in the near future and I don't want the router to be the weak link.

I'm new to OpenBSD, so there's a possibility that I'm missing something obvious, but I've tried to do my homework on it. Thanks for any information.

That is odd, don't all APU2C4's have i210at adadters? Those should be using the igb driver, not the em driver.

The APU2C2 - on the other hand - has i211at chips, which I believe use the em driver.

Try Ubuntu 15 or 16 updated with kernel 4.5.1 like I'm using. My cores never drop below 90% idle while sending 380mbit of torrent traffic or Steam downloads through it. I'm curious to see if that improves your iperf results?

mattlach - Posted Jun 8th 2016 Quote Rate Let's just be clear on what you are trying to measure here.

My Posts A simple iperf to a port is not going to be a very good benchmark. You are really testing the quality of the ethernet chipset, the ethernet Posts: 11 cable, and any switches in between, not the system of the APU itself.

We know the APUC2X boards will perform well here because they have Intel i210at (APU2C4) or Intel i211at (APU2C2) chips. I'd expect these to give me 950+ mbit/s on any system unless there is a wire or switch fault or you are using a terrible NIC (like Realtek).

What is interesting - IMHO - is how much routed/firewalled performance you can get out of the APU.

To figure this out we need to set up some sort of routing/firewall inside the APU (pfsense is a good, easy choice) and thest through the NAT.

When I do this, I seem to get a router/firewalled performance of about 595 mbit/s through mine, which really isn't bad at all for a 6W system. I've seen much more powerful systems struggle to get far beyond this number.

Another area of interest seems to be the performance of the AES-NI implementation in the little AMD chip on this board. Many people use IPsec and OpenVPN implementattions that rely on AES-NI instructions. I have yet to test this, but judging by others experiences out there, the APU2C4 seems good for about 100mbit/s of VPN traffic.

Personally, I'd rather keep my router separate, and set up OpenVPN in a LXC container on my much more powerful server, and let this board server a simple router/firewall appliance type job, which - until Google Fiber comes to town - it should to rather admirably :p

sparkie - Posted Jun 8th 2016 Quote Rate how much iptables complexity do you want?

just out of curiosity I now setup my APU2C4 with Debian stable (debian_version 8.2) and connected a laptop to the leftmost ethernet port My Posts ($INT_IF). And another laptop to the middle ethernet port ($IN3_IF). Posts: 31 Furthermore following iptables forwarding rules are active between the two ethernet ports:

-A FORWARD -i $INT_IF -o $IN3_IF -j ACCEPT -A FORWARD -i $IN3_IF -o $INT_IF -j ACCEPT

I then started a netcat dummy write server on the first laptop (network 192.168.144.0/24 / $INT_IF):

803 [email protected][/root] > nc -l -p 9000 < /dev/zero

then I started a netcat dummy read client on the second laptop (network 192.168.147.0/24 / $IN3_IF):

844 [email protected][/root] > nc 192.168.144.11 9000 > /dev/zero

the amazing result:

massive 111MB/s being forwarded between two APU2C4 ethernet ports (result gained by iftop):

[code]

24.8MB 49.6MB 74.4MB 99.2MB 124MB └──────────────┴───────────────┴───────────────┴───────────────┴──────────────── 192.168.144.11 => 192.168.147.11 111MB 111MB 110MB <= 872KB 866KB 861KB

[...]

──────────────────────────────────────────────────────────────────────────────── TX: cum: 3.01GB peak: 112MB rates: 111MB 111MB 110MB RX: 23.5MB 875KB 872KB 866KB 861KB TOTAL: 3.03GB 113MB 112MB 112MB 111MB[

[/code]

all this on this ingenious little thing called APU2C4 whilst CPU load is kept negligible low (result gained by htop):

[code]

1 [#** 3.0%] Tasks: 21, 9 thr, 67 kthr; 1 running 2 [* 0.6%] Load average: 0.00 0.01 0.01 3 [* 1.4%] Uptime: 00:05:10 4 [** 2.4%] Mem[||#* 79/4035MB] Swp[ 0/0MB]

PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 950 root 20 0 5716 3868 2752 R 2.7 0.1 0:03.33 htop 13 root 20 0 0 0 0 S 0.7 0.0 0:00.08 ksoftirqd/1 52 root 20 0 0 0 0 S 0.7 0.0 0:00.07 kworker/u8:1 1 root 20 0 5472 3964 2916 S 0.7 0.1 0:04.56 /sbin/init 23 root 20 0 0 0 0 S 0.0 0.0 0:00.34 ksoftirqd/3 18 root 20 0 0 0 0 S 0.0 0.0 0:00.17 ksoftirqd/2

[...]

[/code]

ethernet driver in use: igb (result gained by lspci -v):

[code]

02:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) Subsystem: Intel Corporation Device 0000 Flags: bus master, fast devsel, latency 0, IRQ 28 Memory at fe500000 (32-bit, non-prefetchable) [size=128K] I/O ports at 1000 [size=32] Memory at fe520000 (32-bit, non-prefetchable) [size=16K] Capabilities: [40] Power Management version 3 Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+ Capabilities: [70] MSI-X: Enable+ Count=5 Masked- Capabilities: [a0] Express Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [140] Device Serial Number 00-0d-b9-xx-xx-xx-xx-xx Capabilities: [1a0] Transaction Processing Hints Kernel driver in use: igb

[/code]

conclusion:

on current debian stable (8.x) there are no 'performance problems' at all. The APU2C4 works like a charm. See also http://www.pcengines.info/forums/?page=post&id=F3343A08-E940-4354-8FE6-D9B8558CCD64&fid

so if you have a performance problem with APU2 series you simply use the wrong OS/distribution :-)

[UPDATE]

for those who still don't believe another test (bidirectional network speed) with iperf between 192.168.147.13 (server) and 192.168.144.202 (client).

An impressive result:

[code]

63 root@debootjessie32[/root] > iperf -c 192.168.147.13 -t 60 -d ------Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------Client connecting to 192.168.147.13, TCP port 5001 TCP window size: 83.1 KByte (default) ------[ 5] local 192.168.144.202 port 46386 connected with 192.168.147.13 port 5001 [ 4] local 192.168.144.202 port 5001 connected with 192.168.147.13 port 58766 [ ID] Interval Transfer Bandwidth [ 5] 0.0-60.0 sec 6.38 GBytes 913 Mbits/sec [ 4] 0.0-60.0 sec 6.43 GBytes 920 Mbits/sec

813 root@whyalla[/root] > iperf -s ------Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------[ 5] local 192.168.147.13 port 5001 connected with 192.168.144.202 port 46386 ------Client connecting to 192.168.144.202, TCP port 5001 TCP window size: 230 KByte (default) ------[ 6] local 192.168.147.13 port 58766 connected with 192.168.144.202 port 5001 [ 5] 0.0-60.0 sec 6.38 GBytes 913 Mbits/sec [ 6] 0.0-60.0 sec 6.43 GBytes 920 Mbits/sec

[/code]

[/UPDATE]

sorry, code tags appear not to work well (if at all) with this forum software - output appears screwed a little

Post last edited Jun 15th 2016

sparkie - Posted Jun 10th 2016 Quote Rate to cover real life conditions with my test I now replaced to 2 trivial firewall rules from above:

-A FORWARD -i $INT_IF -o $IN3_IF -j ACCEPT My Posts -A FORWARD -i $IN3_IF -o $INT_IF -j ACCEPT Posts: 31 with the typical firewall setup:

o accepting only ESTABLISHED,RELATED from the outside (interface $IN3_IF) o allowing unrestriced access to the outside (aka internet) from inside (interface $INT_IF) o natting IPs from inside to the external (aka internet) IP address (IP of $IN3_IF)

-A FORWARD -i $IN3_IF -o $INT_IF -m state --state ESTABLISHED,RELATED -j ACCEPT -A FORWARD -i $INT_IF -o $IN3_IF -j ACCEPT -t nat -A POSTROUTING -o $IN3_IF -j SNAT --to $IN3_IP

result:

the performance figures from above don't change. The performance impact of this iptables modification is not noticeable.

that means APU2C4 could even firewall an 1Gbit/s internet link with superior performance figures (about 111MB/s plse see above)

Post last edited Jun 15th 2016

Next 1 2

This website is powered by Spruz