Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Slow network on evbarmv7h NetBSD 9

adr%SDF.ORG@localhost (adr) writes:

>Using iperf3 between rpi2 and orangepi I get around 94Mbit/s, which
>is ok for the rpi2. The problem is going "outside". Downloading a
>file from internet can't reach 500KB/sec on the pi and around
>1,2MB/s with orange pi.  Same hardware, just changing the sd card,
>linux goes more than 10MB/sec.

Internet speed depends on many things. Assuming that things outside
the machine stay the same, you usually have two issues:

1. TCP buffering is more aggressive with Linux.
2. Some Programs assume Linux behaviour which may result in the opposite.

The first issue can be addressed by tuning the kernel. In particular

memory used for network buffers and socket buffers
- kern.mbuf.nmbclusters
- kern.somaxkva

individual socket receive buffer sizes (start, increment, maxium)
- net.inet.tcp.recvspace
- net.inet.tcp.recvbuf_inc
- net.inet.tcp.recvbuf_max

and the corresponding send buffer sizes
- net.inet.tcp.sendspace
- net.inet.tcp.sendbuf_inc
- net.inet.tcp.sendbuf_max

and the congestion control algorithm
- net.inet.tcp.congctl.selected

The second issue is more difficult. It is caused by NetBSD
managing buffer sizes in two modes. Fixed sizes (up to the
start value) for compatibility when a program itself asks for
it, and variable sizes when a program uses default values. Programs
that try to configure buffer sizes themselves then end with
small buffers on NetBSD but not on Linux.

For web access it might be useful to run a caching web proxy on
another machine instead.

                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index