NetBSD-Users archive

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

Re: NetBSD Network Tuning



On 22 Oct 2014 at 16:28, Michael D Spence wrote:

> I use NetBSD 5 as a firewall for my home network, connected to Time 
> Warner Cable at a
> nominal 100 MB.  With a little help (ok, a lot of help) from this group, 
> I rearranged my
> NICs and got an observed speed of 75 - 90 MB on my Windows system 
> through the firewall.
> 
> Here are my NICs (ex0 faces the cable modem):
> 
> xp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>          address: 00:e0:18:4a:51:e4
>          media: Ethernet 100baseTX full-duplex
>          status: active
>          inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
>          inet6 fe80::2e0:18ff:fe4a:51e4%fxp0 prefixlen 64 scopeid 0x1
> ex0: 
> flags=8a63<UP,BROADCAST,NOTRAILERS,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> 
> mtu 1500
>          address: 00:60:08:9a:53:6c
>          media: Ethernet 100baseTX full-duplex
>          status: active
>          inet 192.168.0.6 netmask 0xffffff00 broadcast 192.168.0.255
>          inet6 fe80::260:8ff:fe9a:536c%ex0 prefixlen 64 scopeid 0x2
> 
> 
> and here is dmesg:

snipped

> 
> Time Warner has unilaterally increased my speed from 100 MB to 300 MB 
> (was there an ice storm in the nether
> regions?).  This actually caused my observed speed to *drop* to around 
> 45 MB.  When I plug the Windows
> system into the modem directly, I get 301 MB using the same tests.
> 

Does your Winows system have 100Mbps nics or faster 1Gbps?

In 2005 when BT upgraded my line the download rate was increased 
but upload rate was same. Download speed tests were then actually 
much lower than before the upgrade. I could see from graphs
provided online by my isp that downloads were choking and that
massive latency had been introduced, > 100ms vs normal ~10ms.

After configuring NetBSDs ALTQ to give preference to incoming
ICMP the latency went back to ~10ms and downloads were almost
at the new rate. Unfortunately ALTQ config settings are coarse 
so I ended up settled at 75-95% of expected maximum rates.


David

> On the theory that there was some tuning to do, I made the following 
> setting changes:
> 
> kern.mbuf.nmbclusters = 16384
> net.inet.tcp.sendspace = 26252500
> net.inet.tcp.recvspace = 26252500
> kern.somaxkva = 33554432
> kern.sbmax = 524288
> net.inet.tcp.recvbuf_auto = 1
> net.inet.tcp.sendbuf_auto = 1
> net.inet.tcp.sendbuf_max = 16777216
> net.inet.tcp.recvbuf_max = 16777216
> 
> This gets me up to 75MB.
> 
> Here are my questions:
> 
> Are there more settings to profitably tweak?
> Are there better values for the settings I have changed than those shown 
> here?
> Will the NICs I have support these speeds in the first place?
> Will I have to get a real computer to do this (since this one is, IIRC, 
> from the last century)?
> Are there more appropriate NICs to use for this?
> 
> Thanks,
> 
> Michael D. Spence
> Mockingbird Data Systems, Inc.
> 
> 
> 




Home | Main Index | Thread Index | Old Index