[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] 2.0b8_ma3 leafnode very slow
John Covici <covici@xxxxxxxxxxxxxx> writes:
> Its so slow that its almost useless.
>
> It took about 10 minutes to read about 400k according to gnus which is
> what I am using to read the news.
>
> The official 2.08b was much much faster.
Well, I looked again, after my initial reply, and found that on my
machine, leafnode was operating in line-buffered mode, for whatever
reason (it did not request that).
I changed it, my leafnode is currently setting fully-buffered mode and
it's /slightly/ faster here, but depending on (possibly broken) network
stacks and network cards, the speed improvement by buffering XOVER
replies (which is what gnus shows when you're entering a group) might be
significant.
Short: "It depends".
I'll not release 2.0b8_ma5 for just this change, but 2.0b8_ma5 will
incorporate this.
Grab 2.0b8_ma4, use your favourite text editor on nntpd.c and insert
these lines (without the "----"-bars) after the declarations in main:
----------------------------------------------------------------------
const long bufsize = BLOCKSIZE;
char *buf = critmalloc(bufsize, "main_loop");
/* set buffer */
fflush(stdout);
setvbuf(stdout, buf, _IOFBF, bufsize);
----------------------------------------------------------------------
If you don't know what this is about, here's a detailed HOWTO:
search for main(int (at line 1991), and change this:
----------------------------------------------------------------------
int main(int argc, char **argv)
{
int option, reply, err;
socklen_t fodder;
char conffile[PATH_MAX+1];
char peername[256];
struct hostent *he;
FILE *se;
#ifdef HAVE_IPV6
----------------------------------------------------------------------
by inserting lines between FILE * and #ifdef to (do not insert the
-------- -bars):
----------------------------------------------------------------------
int main(int argc, char **argv)
{
int option, reply, err;
socklen_t fodder;
char conffile[PATH_MAX+1];
char peername[256];
struct hostent *he;
FILE *se;
const long bufsize = BLOCKSIZE;
char *buf = critmalloc(bufsize, "main_loop");
/* set buffer */
fflush(stdout);
setvbuf(stdout, buf, _IOFBF, bufsize);
#ifdef HAVE_IPV6
----------------------------------------------------------------------
The new lines shown above are identical, you can just cut them and
insert them.
--
Matthias Andree
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list