[vox-tech] TCP and Linux

ME vox-tech@lists.lugod.org
Mon, 14 Apr 2003 22:26:36 -0700 (PDT)


> A question for you Linux networking gurus...
>
> Someone I know runs a game server daemon but doesn't have
> the source for it.  It has a bug that I suspect comes from
> doing send() calls to a nonblocking socket without checking
> for a buffer-full condition.  Therefore some sent data is
> lost.
>
> How would one enlarge whatever the kernel's output buffer is
> for the sent data?  I had this person try writing new values
> to /proc/sys/net/ipv4/tcp_wmem, but that does not seem to be
> the right tweak.

Since TCP/IP is an effective "sliding window protocol" you could try
extending the windows size. There was a kernel option for this during
config of a kernel in 1.2, 2.0, and 2.2, but I dont see it in 2.4. It was
something like "double maximum windows messaging size for TCP and sliding
window protocol." It was mostly useful for gateways/router (especially on
slower systems that were overworked with routing) and some sniffer tools.
By enabling this, the windows takes a bit longer to fill up while packets
are sent out to the remote host.

I can't seem to find it as a config option in 2.4 though. Closest thing I
can find is:

/proc/sys/net/ipv4/tcp_window_scaling

If this can be used to increase the windows size for TCP, it may help.

Consider that this may be an issue with max packet size across networks
that dont fragment and have max size less than oh, say 1450 or 1400. Mods
to interface's MTU may help too.

Many games that require lots of speed use UDP. I would then ask, "are you
sure the game uses TCP and not UDP?"

-ME



-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM/IT$/LS/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ PGP++
t@-(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html