nnrpd and TCP nagle

christian mock cm at tahina.priv.at
Wed Mar 23 07:52:56 UTC 2016


Dear workers,

I've been debugging a slow reader issue with a friend and we've found
that when his tin does a "listgroup", each and every article number is
going over the wire in its own packet. That, of course, is pretty
inefficient.

I've found the following in nnrpd.c (line 614):

    /* Setting TCP_NODELAY to nnrpd fixes a problem of slow downloading
     * of overviews and slow answers on some architectures (like BSD/OS). */
    setsockopt(STDIN_FILENO, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay));

Which, when removed, makes for way better performance, about an order
of magnitude down in number of packets and time for the group we've
been testing with.

The last time I ran INN on BSD/OS was 20 years ago, and BSD/OS has
been discontinued in 2003, which indicates this line is somewhat
historic. And for NNTP TCP_NODELAY makes no sense in the first place.

So I suggest removing this.

cm.

-- 
** christian mock in vienna, austria -- http://www.tahina.priv.at/
What other OS provides not one but two INTERCAL compilers as part of
the standard distribution?
 Mark Brown about Debian


More information about the inn-workers mailing list