🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by Joseph J. Nuspl Jr. Thu, 23 May 1996 00:00
INN nnrpd as a shared library
#7912
Author: Joseph J. Nuspl Jr.
Date: Thu, 23 May 1996 00:00
17 lines
1053 bytes

Before I go diving into this, has anyone built nnrpd as a shared
library?

At rough glance, it doesn't look like the code would have problems
with re-entrancy but I haven't looked at it that closely.



-- 
++------------------------------------------------------------------++
|| Joseph J. Nuspl Jr. :: Usenet :: X.500 :: Anon ftp :: OED :: PDN ||
|| "Would you be prepared if gravity reversed itself?"-Chris Knight ||
++------------------------------------------------------------------++

Re: INN nnrpd as a shared library
#7937
Author: Joseph J. Nuspl Jr.
Date: Fri, 24 May 1996 00:00
16 lines
1175 bytes
>>>>> "Dave" == Dave Barr <barr@math.psu.edu> writes:
In article <4o4nfn$7i1@augusta.math.psu.edu> barr@math.psu.edu (Dave Barr) writes:

    Dave> What would be the benefit?  nnrpd shares little code between
    Dave> it and other programs.

300+ nnrpd's on one host...

-- 
++------------------------------------------------------------------++
|| Joseph J. Nuspl Jr. :: Usenet :: X.500 :: Anon ftp :: OED :: PDN ||
|| "Would you be prepared if gravity reversed itself?"-Chris Knight ||
++------------------------------------------------------------------++

Re: INN nnrpd as a shared library
#7948
Author: Dave Barr
Date: Fri, 24 May 1996 00:00
13 lines
928 bytes
In article <ny07mu3icaf.fsf@nvwls.cc.purdue.edu>,
Joseph J. Nuspl Jr. <nuspl@nvwls.cc.purdue.edu> wrote:
>Before I go diving into this, has anyone built nnrpd as a shared
>library?

What would be the benefit?  nnrpd shares little code between it
and other programs.  There is libinn.a which could be linked shared, but
it's very small.

--Dave

Re: INN nnrpd as a shared library
#7966
Author: Per Hedeland
Date: Sat, 25 May 1996 00:00
19 lines
1348 bytes
In article <ny091eiau0h.fsf@nvwls.cc.purdue.edu> nuspl@nvwls.cc.purdue.edu (Joseph J. Nuspl Jr.) writes:
>>>>>> "Dave" == Dave Barr <barr@math.psu.edu> writes:
>In article <4o4nfn$7i1@augusta.math.psu.edu> barr@math.psu.edu (Dave Barr) writes:
>
>    Dave> What would be the benefit?  nnrpd shares little code between
>    Dave> it and other programs.
>
>300+ nnrpd's on one host...

Read Dave's reply again - "other programs". Multiple processes executing
the same file always share their code segment on Unix (and any other
sane OS, I'd guess) - i.e. turning code used by a single binary into a
shared library buys you nothing.

--Per Hedeland
per@erix.ericsson.se

Re: INN nnrpd as a shared library
#7986
Author: Joe Greco
Date: Sun, 26 May 1996 00:00
57 lines
3465 bytes
In news.software.nntp article <4o85ru$q94@euas20.eua.ericsson.se>, per@erix.ericsson.se (Per Hedeland) wrote:
:In article <ny091eiau0h.fsf@nvwls.cc.purdue.edu> nuspl@nvwls.cc.purdue.edu (Joseph J. Nuspl Jr.) writes:
:>>>>>> "Dave" == Dave Barr <barr@math.psu.edu> writes:
:>In article <4o4nfn$7i1@augusta.math.psu.edu> barr@math.psu.edu (Dave Barr) writes:
:>
:>    Dave> What would be the benefit?  nnrpd shares little code between
:>    Dave> it and other programs.
:>
:>300+ nnrpd's on one host...
:
:Read Dave's reply again - "other programs". Multiple processes executing
:the same file always share their code segment on Unix (and any other
:sane OS, I'd guess) - i.e. turning code used by a single binary into a
:shared library buys you nothing.

Shame on you guys!  You could explain the problem a little better than this.

The problem is not nnrpd's code segment, which most modern UNIX variants
will share (to the extent possible) between the programs anyways.  Making a
shared library out of this might help shake a little extra efficiency out of
the process, but the reality is that it will buy you so very little..

Each nnrpd maintains a separate copy of a lot of data, and this is the real
problem.  The biggest pig is the active file, someone else already noticed
this and fixed it with the sharedactive patch.  Other pigs can include the
history.pag (or is it .dat) file.  The nnrpd sample configuration brings
this into core after a rather small number of by-Message-ID lookups.

The REAL fix?  It is not clear.

Some of us are moving our INND's up to different ports (I use 1119), the
point being to free up the Well Known Port 119 for nnrpd's.  I wrote a
little nnrpd spawner a while back, and it will be revisited in the near
future to impose per-host client limits, etc...  :-)

This, however, also clears the way for a monolithic threaded nnrpd client.
The monolith can handle multiple simultaneous clients, since the connection
rendezvous is not a problem (as it is when nnrpd is spawned from innd).  It
would even be possible to have several monoliths run simultaneously (i.e.
when it is handling too many clients, it can break itself into two, one will
stop listening on the listen() fd and just run until all connections are
serviced).

Nobody's interested in putting the effort into writing this, however.  I've
suggested it many times..  :-(

I would anticipate that the VM requirements would be greatly reduced.
Creative use of mmap(), etc., would do wonders.

... Joe

-------------------------------------------------------------------------------
Joe Greco - Systems Administrator			      jgreco@ns.sol.net
Solaria Public Access UNIX - Milwaukee, WI			   414/546-7968

Re: INN nnrpd as a shared library
#8003
Author: Per Hedeland
Date: Mon, 27 May 1996 00:00
32 lines
2348 bytes
In article <4oa4bp$rdl@brasil.moneng.mei.com> jgreco@brasil.moneng.mei.com (Joe Greco) writes:
>In news.software.nntp article <4o85ru$q94@euas20.eua.ericsson.se>, per@erix.ericsson.se (Per Hedeland) wrote:
>:Read Dave's reply again - "other programs". Multiple processes executing
>:the same file always share their code segment on Unix (and any other
>:sane OS, I'd guess) - i.e. turning code used by a single binary into a
>:shared library buys you nothing.
>
>Shame on you guys!  You could explain the problem a little better than this.

Well I dunno - if someone proposes doing a shared library, I tend to
assume that he knows that it can only be used for sharing code (and how
to find the size of the code segment of a binary on Unix). The fact that
the code segment is already shared might have been unknown/overlooked
though, so I pointed it out...

>The problem is not nnrpd's code segment, which most modern UNIX variants
>will share (to the extent possible) between the programs anyways.  Making a
>shared library out of this might help shake a little extra efficiency out of
>the process, but the reality is that it will buy you so very little..

AFAIK, shared code segment has been in Unix since around day one -
remember that they had a whopping 64k instruction space way back when...
I think a shared library will actually *reduce* efficiency, e.g. due to
position-independent code and runtime linkage - the savings are only in
disk and memory usage, neither of which will happen with a single binary
- in fact both will probably go up slightly.

--Per Hedeland
per@erix.ericsson.se

Re: INN nnrpd as a shared library
#8024
Author: Ben Polk
Date: Tue, 28 May 1996 00:00
29 lines
1653 bytes
Joe Greco wrote:

> Each nnrpd maintains a separate copy of a lot of data, and this is the real
> problem.  

Or at least one of the real problems.

> This, however, also clears the way for a monolithic threaded nnrpd client.

Version 2 of the Netscape News Server (currently in beta) does this.  The 
NNRPD processes are multithreaded partly for the reasons described here, 
and partly because on NT the one process per user model doesn't scale well.

We ended up also having to allow multiple NNRPDs at a time because some
versions of UNIX have per-process resource limits that we're lower than
we liked.

> Nobody's interested in putting the effort into writing this, however.  I've
> suggested it many times..  :-(

Thanks for the suggestion. :)

> 
> I would anticipate that the VM requirements would be greatly reduced.

Yep.

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