🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
56 messages
56 total messages Page 2 of 2 Started by Sylvio Runge Fri, 29 Oct 1999 00:00
Page 2 of 2 • 56 total messages
Re: NoCeM & INN2.3
#41379
Author: Brian Edmonds
Date: Mon, 08 Nov 1999 00:00
54 lines
4295 bytes
bill davidsen <davidsen@tmr.com> writes:
> Do you have any numbers to show what your tradeoffs were in this area?
> I presume you worked up to 4MB, and that you would go larger if it
> were really a big win.

Unfortunately I don't have any particular testing on this, though that
would be interesting to try out someday.  I came up with that number
pretty much by saying, "Hmm, I'm pretty short of RAM already on this
machine with only 128MB, so how much can I spare for a cache assuming
bigger is better?"  And 4MB seemed reasonable.

It usually seems to be the case that some cache is the important thing,
with the actual amount (ususally beyond a surprisingly small value) is
less significant.  Compared to what a couple people have posted here
lately I'm getting much lower history times from the INN timer, and my
cache hit ratio was quite a bit higher than Russ', but how much of that
is feed and peer differences, I don't know.  From last night:

Incoming Feeds (INN):
Server                Connects  Offered   Taken Refused  Reject %Accpt  Elapsed
TOTAL: 33                11600  4714619  187019 4289494  238106    3% 1388:48:38

Outgoing Feeds (innfeed):
Server             Offered   Taken Refused Reject   Miss   Spool %Took  Elapsed
TOTAL: 37          5400352 1392477 3018876 235956   2981  522070  25% 1778:25:15

History cache:
Reason                                                         Count     %Count
Positive hits                                                4368611      69.5%
Negative hits                                                1346350      21.4%
Do not exist                                                  481934       7.7%
Cache misses                                                   87261       1.4%

INND timer:
Code region                   Time    Pct    Invoked  Min(ms)  Avg(ms)  Max(ms)
history grep          00:00:18.994   0.0%       9669    0.080    1.964    6.009
history lookup        00:16:43.169   1.2%    6275109    0.100    0.160    1.151
history sync          00:00:28.057   0.0%      48228    0.293    0.582   17.002
history write         00:01:37.952   0.1%     480568    0.186    0.204    0.222
perl filter           02:30:20.622  10.4%     466814   16.155   19.324   22.508
idle                  18:09:45.551  75.7%    4749579   10.665   13.767   20.898

For reference, my transit server (a lowly Pentium 166) carries a full
feed, minus alt.binaries and minus bofh.int path stamps (aka Cosmo
cancels, since my filter gets pretty much all of those), with about 10
reasonably highly speed peers (maxwell, berkeley, remarq, direct, etc.),
and a bunch of slower or partial feed ones.

-- 
 o         Brian Edmonds <bedmonds@cs.ubc.ca>, Team Jubal Mech Labs
 \\_/\_,   Moderator: rec.arts.anime.creative, rec.music.info/reviews
(*)   (*)  Are you tired of spam?  Visit http://www.spam.abuse.net/spam/

Re: NoCeM & INN2.3
#41385
Author: Brian Edmonds
Date: Mon, 08 Nov 1999 00:00
15 lines
2044 bytes
Russ Allbery <rra@stanford.edu> writes:
> How many peers do you have who are using nntpsend or some similar
> time-delayed feed?

I don't run anything but innfeed, and in general don't know what me
peers are sending to me with.  Outside of a handful of very slow peers
who are regularly backlogged, I don't know of any intentionally running
delayed feeds.

-- 
 o         Brian Edmonds <bedmonds@cs.ubc.ca>, Team Jubal Mech Labs
 \\_/\_,   Moderator: rec.arts.anime.creative, rec.music.info/reviews
(*)   (*)  Are you tired of spam?  Visit http://www.spam.abuse.net/spam/

Re: NoCeM & INN2.3
#41505
Author: Forrest J. Cavalier III
Date: Fri, 12 Nov 1999 00:00
126 lines
4972 bytes
In article <yl66zlnugn.fsf@windlord.stanford.edu>, rra@stanford.edu wrote...
>
>greg andruk <gerglery@usa.net> writes:
>
>> The possiblities I'm thinking about are being able to pull the database
>> writes out of innd without all the pain that currently entails.  With
>> that pesky detail out of the way, all sorts of interesting opportunities
>> for innd hackage open up.
>
>Precisely.  :)  Any API will obviously be designed with some eye to thread
>safeness as well.  (A thread-safe header parsing library that doesn't use
>the ugly globals that INN currently uses to parse headers is the other
>thing that's going through my mind.)

I don't INN hack much anymore for a number of reasons.  This code described
below was developed for something else.  (It's c++, so that is a barrier to
placing it into INN anyway...)

I always get shot down whenever I suggest anything of the sort, (hi
marc) but if there is any possibility that ISC, or another sponsor (or
even cosource.com project) would attract paying interest, then I have
time to work on major fixes to INN.  Lots of ideas, but I have no
need to work on INN as a hobby.

Russ, let me know if you want the code.

Forrest.



CLibmibMsgProc
	General purpose RFC-822 message header handling class.

Features:
	Very fast lookup of message headers, based on a hash table.

	Very low initialization and reinitialization overhead.  
        Efficient in processing one article, or many.  (INN expireover
        needs to init a table.)

	No need to load entire message if just the headers are needed.

	Limited number of buffer copies. Returns pointers to message
        headers in place.

	Segmented message buffer holds body.  
              Does not make multiple reallocs of a single larger and
              larger block as message is read in.  Instead the message
              is stored in multiple (smaller) segments.

	Parcelled memory management: handles many small allocations
        and housekeeping with one single malloc(),free()

Measured Performance:
    I don't run a news spool at the moment, and the hardware I have
    is a bit dated, but it tests very well.  I tested against
    1500 messages..

    From disk: creates INN style overview at 150 messages a second of
         wall clock time.  (Measured CPU user+system ~ 4 seconds, so
         disk was definitely slowing things.)

    From memory (or disk cache): not tested extensively, but seems
    to be over 1500 messages a second, including the fwrites of
    the overview data to a file (which probably slows things down quite
    a bit.)


Example use:
	long cbSize;
	msgproc.Begin();

	do {
	    char *pBuf = msgproc.BufPrep(&cbSize);
	    if (cbSize > 4096) { /* Don't do a lot of disk transfer, because
				    often headers will completely appear in
				    first bit of file.
				 */
		cbSize = 4096;
	    }
	    cbSize = read(fileno(f),pBuf,cbSize);
	    if (cbSize > 0) {
		msgproc.BufCommit(cbSize);
	    }
	    if (msgproc.HasAllHeaders()) {
		break; /* Don't need to read more */
	    }
	} while (cbSize > 0);
	fclose(f);
	if (!msgproc.HasAllHeaders()) {
	    fprintf(stderr,"Message is only headers\n");
	}

    /* Generate overview */
	printf("%s\t",pszName);
	int ind = 0;
	while(schema[ind]) {
	    int cnt;
	    if (ind > 0) {
		printf("\t");
	    }
	    ptr = msgproc.pchHeaderByName(schema[ind],&end,&cnt);
	    if (ptr) {
		if (cnt != 1) {
		    fprintf(stderr,"%s Multiple %s headers\n",pszName,schema[ind]);
		}
		ptr += counttowh(ptr);
		ptr += countbl(ptr);
		while(ptr < end) { /* collapse multi-line headers */
		    fwrite(ptr,1,counttoeol(ptr),stdout);
		    ptr += countln(ptr);
		}
	    }
	    ind++;
	}

	printf("\n");








Re: NoCeM & INN2.3
#41521
Author: Kai Henningsen
Date: Sat, 13 Nov 1999 00:00
17 lines
1481 bytes
andrew+news@supernews.com (Andrew)  wrote on 04.11.99 in <slrn823m6e.42i.andrew+news@uk21.supernews.com>:

> Actually it should work just as well with a hash - remember that it's
> _exactly the same_ ID which is being looked up. Btrees are nice if a
> lookup on one item is likely to result in the lookup of _different_
> but nearby values; this isn't going to happen with message-ids except
> by chance.

Or maybe by spammer.

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)

Re: NoCeM & INN2.3
#41525
Author: Kai Henningsen
Date: Sat, 13 Nov 1999 00:00
33 lines
2239 bytes
andrew+news@supernews.com (Andrew)  wrote on 04.11.99 in <slrn8244io.42i.andrew+news@uk21.supernews.com>:

> In article <7vt2nm$dkv$1@newssvr02.news.prodigy.com>, bill davidsen wrote:
> >In article <slrn821emt.edk.andrew+news@uk21.supernews.com>,
> >Andrew <andrew@supernews.com> wrote:
> >
> >| The main problem with fcntl and threads is that fcntl locks don't
> >| work between threads in the same process; any lock acquired via
> >| fcntl belongs to the whole process, not to the calling thread.
> >
> >I assume you mean user level threads (MIT style) rather than kernel
> >thread (Linux style).
>
> No, I mean threads as defined by the relevent standards.
>
> If Linux has things called "threads" that don't share resources like file
> descriptors, file locks, working directory etc., then they are nonstandard
> and irrelevent to me.

Linux has both, of course. Or to be more precise, you can control what's  
shared through flags to the clone() syscall, and that's what the POSIX  
thread implementing library (LinuxThreads) uses.

*Of course* you share file descriptors when doing POSIX threads under  
Linux, with real kernel-level threads.

Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)

Page 2 of 2 • 56 total messages
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads