[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] Can fetchnews un-buffer stdout?

Stefan Wiens <s.wi@xxxxxxx> writes:

> Matthias Andree <ma@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
> >> Note that leafnode's NNTP output should not be completely
> >> line buffered.
> >
> > I don't get that. NNTP is a line based protocol.
> Line buffering means each line is transmitted as a separate network
> packet. Normally, as much data as fits into MTU will be stuffed into a
> single packet. That's why leafnode has to fflush() its output after
> a reply is completed.

You mean: that's why stdio is not really suited for network
applications? That's what it boils down to.

I'll look if this is a problem, tcpdump will tell :-)

> All commands that transmit large amounts of data may suffer from line
> buffering because it increases overhead.

Systems that support it (Linux, FreeBSD) should use sendfile anyways to
reduce copying things around.

> How much this slows down transmission depends on the type of network.

True. Will hardly be noticable on a FD ethernet link :-)

Matthias Andree

leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list