Subject: net.inet.ip.mtudisc (was: Strange upstream bandwidth problem on uploading files)
To: None <netbsd-help@netbsd.org>
From: None <ckain@iki.fi>
List: netbsd-help
Date: 05/23/2003 13:02:41
Hello.
I posted some time ago a problem, that prevent me from literally uploading files.
This problem is a very strange for me, but I discovered something.

sysctl: net.inet.ip.mtudisc: 0 -> 1

If I enable this setting, which I assume it's Maximum Transfer Unit Auto-discovery, the
upload speed gains the normal speed. HOWEVER, there's another thing then; The upload goes
so high priority that none other isn't able to communicate at the same time. Eg. if I'am
connect via ssh to other machine at the same time I'll upload something, it's impossible
to play with this other machine - I understand LAG, but this is not LAG.. It's that the
packets aren't send at all to that machine. Upload hogs the whole upstream.
So I quess my problem is MTU-related. ifconfig shows that ep0 has MTU of 1500 which is the
default one?


Below is the message that I posted back then.

> If I try to upload data from my machine to anywhere, the speed is very low and the
> connection gets stalled every 5seconds. Using SFTP/SCP I end up "- STALLED -"
> every 5seconds, and it usually stays stalled for 5-10secs, and then It uploads 15kB
> chunk and again the data transfer is stalled.
> Generally the uploading speed is 2-4KB/s (way too slow + those stalls).
> Same behavior happens with any other, httpd (apache) ftpd(proftpd)... no matter what I use
> for transferring files out of the machine, I get the same result.
> 
> I'm running NetBSD 1.6 on i486 as a NAT-machine to share internet connection for my other
> two computers.
> 
> The strange thing with this is that if I use any of those machines behind the NAT to
> upload, they'll do it fine, without any of the following problems described.
> The places are even the same, not to blame any network congestions.
> 
> I'm on a cablemodem with 2Mbps down and 256Kbps up.
> 
> I used to have a altqd on the machine with unsatisfying results, but I recompiled the
> kernel again without enabling _any_ altq options on to kernel.
> I have tried other kernel configs too (disabling BPFilter, and booting GENERIC)
> with same results.
> 
> I'am really out of clues, this can't be because of altqd ghosting around,
> since it doesn't work anymore when I recompiled the kernel, or? it's not Houdini, is it?!
> 
> I've tried to change these by sysctl, with no affection:
> 
> net.inet.tcp.ack_on_push 1 or 0
> net.inet.tcp.rfc1323 1 or 0
> net.inet.tcp.sendspace 16384 or 65536
> net.inet.tcp.recvspace 16384 or 65536
> net.inet.tcp.cwm 0 or 1
> net.inet.tcp.cwm_burstsize 4 or 32
> 
> 
> The downstream doesn't have any problems at all. Downloading works from the
> i486-machine at full speed, as well as from the machines behind the NAT.