As Routing, NAT and any other features are all handled within the kernel and so on the CPU adding more complexity (i.e. adding NAT) will reduce the total throughput achievable. You'll see this on most devices (even the Cisco ISR routers I've used will slow down as you add NAT etc.) as it's expected most people designing such hardware will take that into account when choosing the CPU and other dedicated hardware (some higher end routers can offload some work into ASICs leaving more CPU cycles free for the more complex stuff).rfreire wrote: ↑Sat Mar 17, 2018 11:11 pmAnyone here benchmarked Pi 3B+ NAT performance?
I have a Pi 3 which is my NAT device, where I had 10 Mbps until last week. And then got upgraded to 100 Mbps.
I can barely exceed 60-70 Mbps. My bottleneck seem to be ksoftirqd/0.
I'm pointing NAT to blame because I can reach close to 100 Mbps when doing tests in the same network, without routing or NATing involved.
What's your findings in Pi 3B+?
Code: Select all
#!/bin/sh CPUS="f" SOCK_FLOW_ENTRIES=32768 echo $SOCK_FLOW_ENTRIES > /proc/sys/net/core/rps_sock_flow_entries echo $CPUS > /proc/sys/net/core/flow_limit_cpu_bitmap for DEVICE in /sys/class/net/* do echo $CPUS > "$DEVICE/queues/rx-0/rps_cpus" echo $SOCK_FLOW_ENTRIES > "$DEVICE/queues/rx-0/rps_flow_cnt" done exit 0