🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #26326

Re: Found out why diablo's dnewslink had non-optimal performance

#26326
From: Garrett Wollman
Date: Mon, 16 Feb 1998 00:00
38 lines
2467 bytes
In article <34E8D894.8FB0ACFD@spinne.com>,
Jeff Garzik  <jeff.garzik@spinne.com> wrote:

>If your OS is smart, write() and writev() will dump into the TCP
>buffer.  If your feeder is fast (and the TCP buffer large), you can keep
>the buffer full enough so that a packet contains more than a single
>CHECK.

Traditional TCP implementations (read: 4BSD) send one packet with the
PSH bit set for every write when congestion-control allows it to send
at least that much data.  If you have an operating system which
implements Transaction TCP along the lines of the Reference
Implementation (e.g., FreeBSD), you can set TCP_NOPUSH to disable this
behavior.  I have not tried it to see what sort of effect, if any,
this has on dnewslink.  

(My hacked dnewslink uses FreeBSD-current's poll(2) option POLLEXTEND
to watch the queue files; it's quite impressive to see the
``thundering herd'' awaken immediately in systat whenever an article
comes in.  It also uses setproctitle() to set the process title to
something useful, and I am currently trying out TCP_NODELAY to see
what effect, if any, it has.  My previous experience was that, when
dnewslink is talking to my fast peers, little streaming happens---I
send at most four or five CHECKs, and they all reply ``no thanks'' to
all of them immediately, returning the connection to idle state.  My
modification is a little too aggressive in that it sets TCP_NODELAY
even for non-realtime feeds, which is a waste.)

-GAWollman

-- 
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
wollman@lcs.mit.edu  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick

Technical Details
Message-ID: <6cao71$bgc$1@khavrinen.lcs.mit.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <6c4t4e$o8j$1@flea.best.net> <6c63vf$pq8$1@flea.best.net> <6cadmt$i8q$1@bigred.inka.de> <34E8D894.8FB0ACFD@spinne.com>

Show Full Headers
Complete Article Headers
Message-ID: <6cao71$bgc$1@khavrinen.lcs.mit.edu>
Subject: Re: Found out why diablo's dnewslink had non-optimal performance
Date: Mon, 16 Feb 1998 00:00:00 +0000
From: wollman@khavrinen.lcs.mit.edu (Garrett Wollman)
References: <6c4t4e$o8j$1@flea.best.net> <6c63vf$pq8$1@flea.best.net> <6cadmt$i8q$1@bigred.inka.de> <34E8D894.8FB0ACFD@spinne.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 325721578
Organization: MIT Laboratory for Computer Science
Newsgroups: news.software.nntp