Article View: news.software.nntp
Article #10414Re: Probs with innfeed 0.8.5b on Solaris
From: Joe Greco
Date: Mon, 26 Aug 1996 00:00
Date: Mon, 26 Aug 1996 00:00
55 lines
2814 bytes
2814 bytes
In news.software.nntp article <4vl6b3$8b0@data.ramona.vix.com>, brister@velo.pp.vix.com (James Brister) wrote:
:I agree with Rich that it's time to change the on-disk format of
:articles to match NNTP's requirements so that mmap() will be most
:useful. Probably in 1.6. There shouldn't be any non-NNTP readers
:left (note: I didn't say "aren't" I said "shouldn't"). There's
:going to be a point in time (probably not too far off) when the
:one-article-per-file format just isn't going to cut it any more,
:then the non-NNTP readers will be really up the creek.
I do agree with that but still wish somebody (besides Netscape) had a
threaded nnrpd capable of multiple clients... it would wipe out the few
valid reasons I can think of for going non-NNTP...
:As for innfeed. I'm thinking about how to put mmap() in there. Of
:course I have to allow for people who can't (or won't) use mmap().
Worst case scenario, do what you do now (well sorta) - read it into
RAM.
pseudo_code() {
stat(article)
#ifdef MMAP
flags = FREE_BY_MUNMAP
art = mmap(article, st_size)
#else
flags = FREE_BY_FREE
art = malloc(st_size)
read(art, st_size)
#endif
}
This is NO worse and probably more efficient than the current scheme
because you can do a single read() in and write() out, even without mmap().
You should be able to trivially encapsulate it in a "fetch_art" and
"unfetch_art" layer... and if you make the layer smart, it might even
be able to handle some of what's below..
:I also have to be very careful about not being a vnode hog--some
:of you may be able to mmap() 45000 files at once, but others only
:150 (not even).
Some of us might even ask you to make it user-definable :-)
I'm thinking a number of things. It "may" be more practical, if vnodes
are scarce, to only mmap() articles over a certain size (50K?), and malloc()
the remaining ones like currently is done... basically the BIG ones are the
biggest problem when you think about it... or it may be useful to specify
a per-process cap to mmap()'s..
Just some random thoughts.
... JG
Technical Details
Message-ID:
<4vtsk8$262@brasil.moneng.mei.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-mailReferences:
<4vc7hk$sjj@news2.cais.com> <slrn51plk2.j0.coneill@luser.halo.net> <4vilr3$olj@brasil.moneng.mei.com> <4vl6b3$8b0@data.ramona.vix.com>Show Full Headers
Complete Article Headers
Message-ID: <4vtsk8$262@brasil.moneng.mei.com> Subject: Re: Probs with innfeed 0.8.5b on Solaris Date: Mon, 26 Aug 1996 00:00:00 +0000 From: jgreco@brasil.moneng.mei.com (Joe Greco) References: <4vc7hk$sjj@news2.cais.com> <slrn51plk2.j0.coneill@luser.halo.net> <4vilr3$olj@brasil.moneng.mei.com> <4vl6b3$8b0@data.ramona.vix.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: 176706797 Distribution: inet Organization: Marquette Electronics, Inc. - Milwaukee, WI. Newsgroups: news.software.nntp