[MUD-Dev] Re: [Tech] socket slowdown solved
J C Lawrence
claw at kanga.nu
Wed Oct 14 23:02:43 New Zealand Daylight Time 1998
On Tue, 13 Oct 1998 23:26:06 -0600
Chris Gray<cg at ami-cg.GraySage.Edmonton.AB.CA> wrote:
> Back in August (I was checking the archives), under the thread
> "Ethernet NICS, maximum connections..mud testing", I had indicated a
> performance problem I was having with communication between my
> server and client, when running on the same Linux machine. Very
> little of the CPU time was used, but there was no explanation for
> the slowdown.
> ...I came across the
> TCP_NODELAY option to setsockopt for the TCP protocol layer. Since
> the work stuff is UDP, not TCP, that was no help, but I decided to
> try it on my test client and server. Voila! Drastic improvement in
Stevens of course has a nice bit to say about this in his TCP/IP books
(I'd quote but my copies are at work and I'm not). Vic Metcalfe's
"Programming UNIX Sockets in C - Frequently Asked Questions" also
covers this area, its strictures, the relevant and affecting RFC's,
and implementation concerns fairly well. Among a great many other
places you can find the FAQ at:
With most of the good stuff from question 2.11 thru 2.17, starting at:
Aside: I found the (brief) discussion of out-of-band data streams in
those sections and later questions (cf 5.8) useful for my musings on
error-tolerant protocol designs.
> Now I can get on with real work on my MUD!
J C Lawrence Internet: claw at kanga.nu
----------(*) Internet: coder at kanga.nu
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...
More information about the MUD-Dev