Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Dec 1999 09:08:08 +1300
From:      "Juha Saarinen" <juha@saarinen.org>
To:        "daniel B" <danielb@pacex.net>
Cc:        <freebsd-questions@freebsd.org>
Subject:   RE: Not such good networking performance with FreeBSD
Message-ID:  <LNBBIBDBFFCDPLBLLLHFMEGNGGAA.juha@saarinen.org>
In-Reply-To: <Pine.BSF.4.10.9912170933560.2761-100000@almazs.pacex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Daniel,

I can only give you some general advice based on my experience with RADSL
(rate-adaptive DSL), and not anything terribly useful for FreeBSD...

My telco runs ATM over DSL over which a PPP connection to my ISP is
encapsulated, so to speak. To start with, the telco had some problems with
its DSLAMs that caused long pauses and sometimes routing timeouts, making
interactive apps like ssh unusable. The telco said this was partly due to
ATM cells being lost which is disastrous for the larger IP packets, as it
causes lots of retransmissions... not so sure about that, but anyway, it
shows the complexity of squeezing that amount of bandwidth through plain old
copper wires, I guess.

Even though the router says I've got 5.7Mbps (bits per second) to the
exchange, the telco appears to have capped each TCP session at 2Mbps max
(grrr...). That's still pretty good, but what complicates things for me is
the high latencies I see as soon as I connect to servers outside New
Zealand:

traceroute to pacex.net (204.1.219.156), 30 hops max, 40 byte packets
 1  m10 (192.168.1.254)  1.075 ms  0.993 ms  0.913 ms
 2  203-79-82-254.adsl-wns.paradise.net.nz (203.79.82.254)  86.952 ms
85.922 ms 66.505 ms
 3  192.168.253.225 (192.168.253.225)  45.744 ms  45.747 ms  45.314 ms
 4  kelly.ipnet.paradise.net.nz (203.96.153.138)  46.478 ms  45.642 ms
46.252 ms
 5  cassandra.paradise.net.nz (203.96.152.3)  46.431 ms  45.809 ms  46.426
ms
 6  a4-0-0-5.akbr1.netgate.net.nz (202.37.246.77)  55.911 ms  56.173 ms
56.100 ms
 7  a0-0-0-2.tkbr1.netgate.net.nz (202.37.246.121)  57.310 ms  56.517 ms
59.378 ms

Leaving NZ, going to LA:

 8  s1-1-4.labr1.netgate.net.nz (202.37.245.166)  238.127 ms  181.145 ms
181.776 ms
 9  s5-0-0.lsanca1-cr1.bbnplanet.net (4.24.24.17)  180.932 ms  185.284 ms
181.803 ms
10  p2-1.lsanca1-ba1.bbnplanet.net (4.24.4.5)  184.113 ms  180.490 ms
181.832 ms
11  p7-0.lsanca1-br1.bbnplanet.net (4.24.4.2)  236.089 ms  237.078 ms
236.339 ms

<snip>

22  dsl1.irvnca01.us.ra.verio.net (192.215.247.103)  218.263 ms  218.406 ms
215.212 ms
23  compappcon-dw.customer.ni.net (204.1.216.14)  216.128 ms  217.187 ms
218.471 ms
24  almazs.pacex.net (204.1.219.156)  272.606 ms  273.758 ms  272.252 ms

These are quite good roundtrip times for me actually. Sometimes they go well
into the 300-400ms range, which really makes applications that depend on
opening lots of connections and getting small files (like Web browsing)
suck, despite my multi-Mbps connection.

Anyway, what I've found to help on all operating systems apart from FreeBSD
is to enable and tune the TCP High Performance extensions settings (RFC
1323). It's less than obvious how you do this on FreeBSD, unfortunately.
This is what I've dug up so far... correct me if I'm wrong by all means.

Put:

	tcp_extensions="YES"

into /etc/rc.conf

Then, it looks like you have to use the sysctl command to check and tune
some of the TCP settings:

	sysctl -w net.inet.tcp.sendspace=65536 && sysctl -w
net.inet.tcp.recvspace=65536 should give you 65KB TCP 	windows -- for some
reason, FreeBSD defaults to 16KB which is quite small.

There are two more settings which I can't find documented anywhere, but
which I suspect affect things as well:

	net.inet.tcp.mssdflt: 512 (is this the default Maximum Segment Size?
shouldn't it be 1460 bytes?)
	net.inet.raw.recvspace: 65536 (I've bumped it up as an experiment -- think
the default is 8192).

sysctl -a | less shows you all the settings.

Other than that, having an MTU/MRU of 1500 seems to work the best, and you
might want to check that you're not using e.g. PPP compression settings that
aren't compatible with with your ISP's peer. I have no idea how well stuff
like PPP address field and header compression works with high bitrate
connections, but I suspect that enabling them would add latency.

Hope the above is of some use to you...


Cheers,

-- Juha


> -----Original Message-----
> From: daniel B [mailto:danielb@pacex.net]
> Sent: Saturday, 18 December 1999 06:41
> To: Juha Saarinen
> Cc: freebsd-questions@freebsd.org
> Subject: RE: Not such good networking performance with FreeBSD
>
>
> Sorry to intrude on this thread; but I am kinda having the same problem.
> My DSL speed was kinda OK when I wwas running 2.2.8 but ever since I
> upgraded to 3.x releases I just get poor performance and sometimes ssh
> kinda hungs up when accessing lan via ppp.
> Are there tricks and ways to get better networking performance on FreeBSD?
> this may soung very trival but I have realy noticed performance drop on
> this FreeBSD boxens.
>
> Dan



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?LNBBIBDBFFCDPLBLLLHFMEGNGGAA.juha>