Re: APU2 routing speed NetBSD

2016-12-18 Thread Greg Troxel

76nem...@gmx.ch writes:

>  I am working with an APU2 board (4gb, 3 lan and AMD CPu 1Ghz
> you can see specifications here http://www.pcengines.ch/apu2.htm)
> to make a router/firewall.
>
> Before choosing the OS I want to use I have done some benchmarks.
> My first benchmark is:
>  1) Copy of a big file (17GB) compressed with gzip
> from a Windows 10 machine to a Windows 8.1 machine.
> This is done by using CIFS on Windows. Each machine
> is at one side of the router.
>
> The results are strange:
> With OpenBSD and Linux (alpine linux 3.4) I get
> the maximum speed (112Mbytes/sec) while with NetBSD
> the speed is limited to 70Mbytes/sec.

There are basically two things to see about.  One is the raw speed of
packet forwarding.  The other is whether there is any loss and how that
interacts with congestion control.  Plus then there are odd things I am
not thinking of.

NetBSD itself should be efficient.  However, you are pushing close to 1
Gb/s.  So, I would want to look at network counters to see if there is
any trouble.  Do "netstat -s" on the router to a file, before and after,
and diff -u.  Also, do the equivalent on the test machines.

This will slow it down, but run tcpudmp and save to a file, and look
over it.  If TCP, use tcpdump2xplot from xplot in pkgsrc (read the docs;
this is not really easy, but very helpful to understand TCP behavior).
If CIFS is over UDP, look at retransmission specs on the clients.

Understand what MTU is being used, with various systems.  Jumbo frames
of 8K data plus header may be faster due to amortizing per-packet
overhead and faster pack/unpack.  THose may be enabled by the others.

Finally, 70 MB/s is still half of GbE, and it may be that other
considerations are more important than the last bit of speed.  But
still, I think this should go faster.



signature.asc
Description: PGP signature


Re: APU2 routing speed NetBSD

2016-12-18 Thread Martin Husemann
On Sun, Dec 18, 2016 at 03:08:35PM +0100, 76nem...@gmx.ch wrote:
> Hi All,
>  I am working with an APU2 board (4gb, 3 lan and AMD CPu 1Ghz
> you can see specifications here http://www.pcengines.ch/apu2.htm)
> to make a router/firewall.

Can you give a few more details, e.g. the output of dmesg, and ifconfig
for the interfaces used?

Martin


APU2 routing speed NetBSD

2016-12-18 Thread 76nemo76
Hi All,
 I am working with an APU2 board (4gb, 3 lan and AMD CPu 1Ghz
you can see specifications here http://www.pcengines.ch/apu2.htm)
to make a router/firewall.

Before choosing the OS I want to use I have done some benchmarks.
My first benchmark is:
 1) Copy of a big file (17GB) compressed with gzip
from a Windows 10 machine to a Windows 8.1 machine.
This is done by using CIFS on Windows. Each machine
is at one side of the router.

The results are strange:
With OpenBSD and Linux (alpine linux 3.4) I get
the maximum speed (112Mbytes/sec) while with NetBSD
the speed is limited to 70Mbytes/sec.

All the hardware is identical and all the router OS are installed on the APU2.
To do the tests, I simply reboot the router and I choose an
other OS.

Do you have an idea why there is a such big difference? Should I
tune some specific network parameters on NetBSD?

I have done a second benchmark by transferring the same file 
with ftp, but this time the second machine was a Linux server 
(running on the same hardware as the Windows used for
the CIFS transfer) and I get similar
differences (80-85Mbytes with Linux Router,50-55Mbytes
with NetBSD).

The benchmarks were run without any firewall. 


Thank your for your help,

best regards,

Alan