CURRENT branch and older OSes

Julien ÉLIE julien at trigofacile.com
Sun Mar 22 17:16:57 UTC 2009


Hi,

>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca < LIST active can.canet.stats
>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca > 215 Newsgroups in form "group high low flags"
>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca < LIST active can.com.ad-agencies
>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca > 215 Newsgroups in form "group high low flags"
>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca < LIST active can.com.misc
>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca > 215 Newsgroups in form "group high low flags"
>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca < LIST active can.community.asian
>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca > 215 Newsgroups in form "group high low flags"
>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca < LIST active can.community.military
>> Nov 23 09:21:55 gallifrey doctor[3]: nnrpd[1205]: doctor.nl2k.ab.ca > 215 Newsgroups in form "group high low flags"
>
> 5 LIST active per second with trn.

There were many more exchanges per second before (with INN 2.4.x).

The Doctor reports that this patch (which I adapted from something David Canzi
suggested two years ago) for nnrpd/nnrpd.c makes INN 2.5.0 as fast as INN 2.4.x
on his BSD/OS:

Index: nnrpd.c
===================================================================
--- nnrpd.c     (révision 8385)
+++ nnrpd.c     (copie de travail)
@@ -14,6 +14,7 @@
 #include "portable/wait.h"
 #include <netdb.h>
 #include <signal.h>
+#include <netinet/tcp.h>

 #if HAVE_GETSPNAM
 # include <shadow.h>
@@ -535,6 +536,7 @@
     struct sockaddr *sas = (struct sockaddr *) &sss;
     socklen_t length;
     size_t size;
+    int nodelay = 1;

     memset(&Client, 0, sizeof(Client));
     strlcpy(Client.host, "?", sizeof(Client.host));
@@ -603,6 +605,8 @@
         Client.serverport = network_sockaddr_port(sas);
     }

+    setsockopt(STDIN_FILENO, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay));
+
     notice("%s (%s) connect", Client.host, Client.ip);

     PERMgetaccess(NNRPACCESS);




I do not notice any improvement on Debian.  I assume it handles sockets differently
than BSD/OS.

Should we make that TCP_NODELAY option deactivable?
("nnrpd -d" *not* to use TCP_NODELAY)

Should TCP_NODELAY be also set to other programs?  Where?
(And Why STDIN_FILENO?)

-- 
Julien ÉLIE

« À vaincre sans péril, on évite des ennuis ! » (légionnaire romain) 




More information about the inn-workers mailing list