Date: Thu, 16 Nov 2006 19:17:53 -0500 From: Bill Moran <wmoran@collaborativefusion.com> To: freebsd-questions@freebsd.org Cc: freebsd@sopwith.solgatos.com Subject: Re: TCP parameters Message-ID: <20061116191753.bce30afb.wmoran@collaborativefusion.com> In-Reply-To: <200611162317.XAA27092@sopwith.solgatos.com> References: <200611162317.XAA27092@sopwith.solgatos.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 16 Nov 2006 15:17:26 +0000 Dieter <freebsd@sopwith.solgatos.com> wrote: > In the process of debugging a not-working-so-well TCP > application, I've been asked to provide: > > > cat /proc/sys/net/ipv4/tcp_window_scaling > > cat /proc/sys/net/ipv4/tcp_wmem > > Which of course results in "No such file or directory". > > I suspect these are from Linux. Are there equivalent > parameters in FreeBSD 6.x ? http://www.netadmintools.com/html/7tcp.man.html Window scaling is enabled by default. I'd assumed that there would be a sysctl to disable it, but I can't seem to find one. It looks as if tcp_wmem is the equivalent of recvspace, although the description in that document is somewhat befuddling. > The other end (non-FreeBSD non-open-source) is sending > real-time data, and apparently is not able to keep up, > its memory fills up, and it starts dropping packets. I > suspect the problem is a combination of too much latency > (FreeBSD not sending ACKs fast enough) and not enough window > size. Can you get some tcpdumps of the traffic? If the problem is what you suspect, it should be evident in a packet dump. > net.inet.tcp.recvspace and .sendspace seem relevant, > anything else? I'm not a TCP wizard, so please feel free > to point out things that should be obvious. :-) Those are maximum values, perhaps your application is not actually allocating that much? Calling getsockopt() on SO_SNDBUF and SO_RCVBUF will tell you, and setsockopt() can be used to change them. > I doubt that the BSD network stack has anything to do with this, > but perhaps there is something that could be tweaked to help out. > I'm hoping that updating the Ethernet device drivers (bge, nve) > will result in less latency. Latency isn't the only factor. If your window size is enough, a little extra latency shouldn't hurt. Of course, if the thing is unable to maintain the required throughput, that'll kill you every time. > Then there is userland: > > Anyone want to code review a very simple 80 line TCP-to-stdout utility? Sure, post it ... I'll have a look.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061116191753.bce30afb.wmoran>