zaterdag 10 september 2011

jumbo frames at home


I have a home network that runs partly on gigabit. With partly I mean that a section of the network is connected by a gigabit switch, and a section is connecting with a 'home router' that services my fiberoptic internet connection (yes, I have fiber to the home aka FttH).
When transferring a file between 2 machines on the gigabit section of the network I noticed it was taking a loooong time. Actually the transferspeed was  not or not much more than 100mbit.
Because it was one large file (10GB) I suspected that turning on jumboframes would help the situation.
So, I went into the windows 7 networking hardware settings and turned jumbo frames on with a 7K max frame size and did the same for my linux machine. The transfer died. I tried to re-start it, but it wouldn't work. I could still ping the linux box from the windows box, so there was still something working properly.
SSH worked too, but I couldn't get large outputs to be displayed all at once. Only small commands with small outputs would give a result. Odd! I suspected that large frames would not be transmitted/received correctly and proceeded to lower the MTU back in steps until everything would work again. I ended up at an MTU of 3000 bytes. That's only twice the size of the standard MTU of about 1500.
It didn't help the transferspeed at all.
I decided to look a bit deeper and found that linux warns of changing the MTU on that specific network card :
[1201852.913302] r8169: WARNING! Changing of MTU on this NIC may lead to frame reception errors!

Great. This was actually happening. That's not a 'may', it's a 'will'.

For reference, this is an onboard NIC for a motherboard that I bought a month or 2 ago.
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

On the windows machine the onboard NIC is a RTL8167. Different NIC, no frame corruption? I hope so.

There are many other possible reasons for these 2 machines not being able to transfer files at high speeds. The gigabit switch I have is a cheap no-brand (actually it's an SMC switch), the NICs themselves may not be up to the task, the machines may be too busy doing other things and the windows filesharing protocol is notoriously inefficient. There may be further optimalizations to be done with offloading settings on these NICs.

I've set the MTU back to the default (1500) and later figured out the 100mbit was because the Linux machine was plugged into the wrong network segment (the 100mbit switch). *DUH*
Regardless it's still interesting to see the NIC having problems with a bigger MTU.

Geen opmerkingen:

Een reactie posten