Re: crawling network with ix driver when routing trafic

2024-03-04 Thread Stuart Henderson
On 2024-03-04, Pierre Peyronnel  wrote:
> On Mon, 4 Mar 2024 at 11:24, Claudio Jeker  wrote:
>
>>
>> Try to disable LRO on the ix(4) card:
>> ifconfig ix0 -tcplro
>>
>> Also could you try -current (with and without tcplro).
>>
>
> One sysupgrade -s later (see below), I can confirm that I have the same
> behaviour
> - slow with LRO
> - fast without LRO
>
> Now I need a way back to -stable
> Maybe when 7.5 is released ?

You can edit /usr/sbin/sysupgrade -

121 if $RELEASE && [[ ${_KERNV[1]} == '-beta' ]]; then
122 NEXT_VERSION=${_KERNV[0]}
123 else
124 NEXT_VERSION=$(echo ${_KERNV[0]} + 0.1 | bc)
125 fi

add NEXT_VERSION=7.5 after this, then you can run sysupgrade -r after release.

Alternatively run bsd.rd from release (when available) by hand.

(Maybe sysupgrade -f should work on versions which are detected as "release"
instead though...)



Re: crawling network with ix driver when routing trafic

2024-03-04 Thread Pierre Peyronnel
On Mon, 4 Mar 2024 at 11:24, Claudio Jeker  wrote:

>
> Try to disable LRO on the ix(4) card:
> ifconfig ix0 -tcplro
>
> Also could you try -current (with and without tcplro).
>

One sysupgrade -s later (see below), I can confirm that I have the same
behaviour
- slow with LRO
- fast without LRO

Now I need a way back to -stable
Maybe when 7.5 is released ?

sysctl -n kern.version
OpenBSD 7.5 (GENERIC.MP) #53: Sun Mar  3 22:36:54 MST 2024
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP


Re: crawling network with ix driver when routing trafic

2024-03-04 Thread Claudio Jeker
On Mon, Mar 04, 2024 at 11:07:37AM +1100, Aaron Mason wrote:
> Hi!
> 
> It's my understanding that the Realtek network adapters are pretty
> craptacular under load since they basically defer to the OS for
> everything, raising an interrupt each time. Try the fourth test again
> while running top and see if the interrupts (intr) spike during that
> time.
 
re(4) is not the original rl(4) that was known for being very cheap. re(4)
is decent.

-- 
:wq Claudio



Re: crawling network with ix driver when routing trafic

2024-03-04 Thread Claudio Jeker
On Sun, Mar 03, 2024 at 09:38:22PM +0100, Pierre Peyronnel wrote:
> Hey misc,
> 
> Note : I posted on this topic in r/openbsd and before I open a bug, I
> thought I'd ask you.
> 
> My OBSD router has a Realtek (onboard) and an intel (X540 pcie) network
> card, and in one particular situation I get very slow speed.
> I tested using iperf3 and also sftp put/get.
> 
> Here goes:
> (1) When I transfer from/to a host/net A to the router on re0 I get
> symmetrical 1Gbps
> (2) When I transfer from/to a host/net B to the router on ix0  I also get
> symmetrical 1Gbps
> (3) When I transfer from host/net A to host/net B through the router (re0
> -> ix0) I get 1Gbps
> (4) When I transfer from host/net B to host/net A through the router (ix0
> -> re0) I get a crawling 3Mbps
> 
> To make sure, I did a fresh install from 7.4 from scratch (okay i forgot to
> syspatch it), pfctl -d, sysctl net.ip.forwarding=1 and I got the same
> result.
> 
> When I use another OS (tried Arch linux and OPNSense) I get full 1Gbps in
> all 4 scenarios.
> 
> I'm at a loss and will appreciate any help, short of filing a bug.
> Below dmesg and pcidump.
> Thanks in advance !
> Pierre

Try to disable LRO on the ix(4) card:
ifconfig ix0 -tcplro

Also could you try -current (with and without tcplro).
-- 
:wq Claudio



Re: crawling network with ix driver when routing trafic

2024-03-04 Thread Pierre Peyronnel
To be thorough, on the matter of interrupts, I get less than 1%, about 2000
intr (and cs) with vmstat -w 3

the solution lies below though

On Mon, 4 Mar 2024 at 07:21, Jan Klemkow  wrote:

>
> try to disable LRO on ix0:
> ifconfig -tcplro ix0
>

That was it !!
ifconfig ix0 -tcplro

Thanks ! I did it in 7.4 -stable, not necessary to go to -current
so the LRO code is good enough for my needs in that version

If you'd like I can try and give it a go, I have another SSD with the fresh
7.4. I've never run -current though.

did you also tried the current snapshot?
> we fixed some bugs in the LRO code of ix0 in the upcoming release.
>
> Thanks again !
Pierre


Re: crawling network with ix driver when routing trafic

2024-03-03 Thread jan



On March 3, 2024 9:38:22 PM GMT+01:00, Pierre Peyronnel 
 wrote:
>Hey misc,
>
>Note : I posted on this topic in r/openbsd and before I open a bug, I
>thought I'd ask you.
>
>My OBSD router has a Realtek (onboard) and an intel (X540 pcie) network
>card, and in one particular situation I get very slow speed.
>I tested using iperf3 and also sftp put/get.
>
>Here goes:
>(1) When I transfer from/to a host/net A to the router on re0 I get
>symmetrical 1Gbps
>(2) When I transfer from/to a host/net B to the router on ix0  I also get
>symmetrical 1Gbps
>(3) When I transfer from host/net A to host/net B through the router (re0
>-> ix0) I get 1Gbps
>(4) When I transfer from host/net B to host/net A through the router (ix0
>-> re0) I get a crawling 3Mbps

try to disable LRO on ix0:
ifconfig -tcplro ix0

>To make sure, I did a fresh install from 7.4 from scratch (okay i forgot to
>syspatch it), pfctl -d, sysctl net.ip.forwarding=1 and I got the same
>result.

did you also tried the current snapshot?
we fixed some bugs in the LRO code of ix0 in the upcoming release.

>When I use another OS (tried Arch linux and OPNSense) I get full 1Gbps in
>all 4 scenarios.
>
>I'm at a loss and will appreciate any help, short of filing a bug.
>Below dmesg and pcidump.
>Thanks in advance !
>Pierre



Re: crawling network with ix driver when routing trafic

2024-03-03 Thread Aaron Mason
Hi!

It's my understanding that the Realtek network adapters are pretty
craptacular under load since they basically defer to the OS for
everything, raising an interrupt each time. Try the fourth test again
while running top and see if the interrupts (intr) spike during that
time.

On Mon, Mar 4, 2024 at 7:46 AM Pierre Peyronnel
 wrote:
>
> Hey misc,
>
> Note : I posted on this topic in r/openbsd and before I open a bug, I
> thought I'd ask you.
>
> My OBSD router has a Realtek (onboard) and an intel (X540 pcie) network
> card, and in one particular situation I get very slow speed.
> I tested using iperf3 and also sftp put/get.
>
> Here goes:
> (1) When I transfer from/to a host/net A to the router on re0 I get
> symmetrical 1Gbps
> (2) When I transfer from/to a host/net B to the router on ix0  I also get
> symmetrical 1Gbps
> (3) When I transfer from host/net A to host/net B through the router (re0
> -> ix0) I get 1Gbps
> (4) When I transfer from host/net B to host/net A through the router (ix0
> -> re0) I get a crawling 3Mbps
>
> To make sure, I did a fresh install from 7.4 from scratch (okay i forgot to
> syspatch it), pfctl -d, sysctl net.ip.forwarding=1 and I got the same
> result.
>
> When I use another OS (tried Arch linux and OPNSense) I get full 1Gbps in
> all 4 scenarios.
>
> I'm at a loss and will appreciate any help, short of filing a bug.
> Below dmesg and pcidump.
> Thanks in advance !
> Pierre
>
> {SNIP}



-- 
Aaron Mason - Programmer, open source addict
I've taken my software vows - for beta or for worse