🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
12 messages
12 total messages Started by Chris Sedore Wed, 09 Apr 1997 00:00
bug in INN1.4unoff4 streaming code
#16857
Author: Chris Sedore
Date: Wed, 09 Apr 1997 00:00
36 lines
1543 bytes

I believe that I have observed a bug in INN 1.4unoff4's streaming code on
the incoming side. 

I noted that with my latest build of NNTPRelay, which dynamically adjusts
the number of outgoing checks downward in the case of a high percentage of
late refusals, that upon reaching a check window of 1 and reverting to
IHAVE, that INN1.4 continues to return 239 instead of 235 for successfully
transmitted articles.

In other words, I watch a protocol sequence like this:

>mode stream
<203 streamok
>check <...>
<238 <...>
>takethis <...>
>(article)
>.
<239 <...>
[time passes, window closes, revert to IHAVE]
>IHAVE <...>
<335
>(article)
>.
<239 <...>

This only seems to happen in the context of a connection that actually uses
streaming commands--if I start out with IHAVE it never occurs.  This is not
a terribly big deal, and I patched my code to accept it, but if people are
still maintaining 1.4unoff4, they may want to look into this and fix it.

-Chris

Re: bug in INN1.4unoff4 streaming code
#16838
Author: Dave Barr
Date: Wed, 09 Apr 1997 00:00
13 lines
1072 bytes
In article <01bc4481$01766ea0$1f8fe680@spring>,
Chris Sedore <cmsedore@maxwell.syr.edu> wrote:
>This only seems to happen in the context of a connection that actually uses
>streaming commands--if I start out with IHAVE it never occurs.  This is not
>a terribly big deal, and I patched my code to accept it, but if people are
>still maintaining 1.4unoff4, they may want to look into this and fix it.

No, nobody is maintaining 1.4unoff4.  Upgrade to 1.5.1.

--Dave

Re: bug in INN1.4unoff4 streaming code
#16867
Author: Jerry Aguirre
Date: Wed, 09 Apr 1997 00:00
35 lines
2384 bytes
In article <01bc4481$01766ea0$1f8fe680@spring>,
Chris Sedore <cmsedore@maxwell.syr.edu> wrote:
>
>I noted that with my latest build of NNTPRelay, which dynamically adjusts
>the number of outgoing checks downward in the case of a high percentage of
>late refusals, that upon reaching a check window of 1 and reverting to
>IHAVE, that INN1.4 continues to return 239 instead of 235 for successfully
>transmitted articles.

I can well believe this.  I never considered that anyone whould mix
check and IHAVE in the same connection.  In effect you did a "mode stream"
to go into check/takethis mode and then decided later to revert without
telling the server.  Did you do a "mode ihave" to revert back?  Alright,
there is no "mode ihave" command but if your going to switch back then
you should create one!

As an implementation detail the server doesn't actually change when
a "mode stream" is done.  But when the first "check" or "takethis" is
done the server allocates a structure to keep track of the message-ID.
The presense of that structure is used later to tell if the connection
is streaming.

Why do you want to revert to IHAVE mode?  The check/takethis mode is a
superset of IHAVE.  If you run check/takethis waiting after each command
for the response then you have the same functionality that using IHAVE
would achieve.  What advantage do you think that IHAVE is giving you?

How are you telling a "late refusal" from other errors?  In debugging the
code a lot of rejected articles were from unwanted newsgroups, too old,
header errors, etc.  As I recall the server has two response codes,
accepted, and rejected.  Sending one at a time will not help you to
avoid sending articles that are rejected for the above reasons.

Re: bug in INN1.4unoff4 streaming code
#16882
Author: Chris Sedore
Date: Thu, 10 Apr 1997 00:00
71 lines
3926 bytes


Jerry Aguirre <jerry@rigel.whowhere.com> wrote in article
<5igq95$2mk$1@fes.whowhere.com>...
> In article <01bc4481$01766ea0$1f8fe680@spring>,
> Chris Sedore <cmsedore@maxwell.syr.edu> wrote:
> >
> >I noted that with my latest build of NNTPRelay, which dynamically
adjusts
> >the number of outgoing checks downward in the case of a high percentage
of
> >late refusals, that upon reaching a check window of 1 and reverting to
> >IHAVE, that INN1.4 continues to return 239 instead of 235 for
successfully
> >transmitted articles.
> 
> I can well believe this.  I never considered that anyone whould mix
> check and IHAVE in the same connection.  In effect you did a "mode
stream"
> to go into check/takethis mode and then decided later to revert without
> telling the server.  Did you do a "mode ihave" to revert back?  Alright,
> there is no "mode ihave" command but if your going to switch back then
> you should create one!

Well, it depends on your perspective of the mode command.  It really (in
this case) is a misnomer--it just verifies a capability rather than
actually causing a mode switch.  Part of the question is whether streaming
is a subset of or an add-on to total NNTP command set.  My general view is
that it is an add on, meaning that I should have all of the commands
available to me.
 
I don't mean to sound accusatory here, either.  My code did the same thing
until a few days ago.

> As an implementation detail the server doesn't actually change when
> a "mode stream" is done.  But when the first "check" or "takethis" is
> done the server allocates a structure to keep track of the message-ID.
> The presense of that structure is used later to tell if the connection
> is streaming.
>
> Why do you want to revert to IHAVE mode?  The check/takethis mode is a
> superset of IHAVE.  If you run check/takethis waiting after each command
> for the response then you have the same functionality that using IHAVE
> would achieve.  What advantage do you think that IHAVE is giving you?
> 
> How are you telling a "late refusal" from other errors?  In debugging the
> code a lot of rejected articles were from unwanted newsgroups, too old,
> header errors, etc.  As I recall the server has two response codes,
> accepted, and rejected.  Sending one at a time will not help you to
> avoid sending articles that are rejected for the above reasons.

Most of the articles are rejected because they arrived before my
transmission completed.  The main disadvantage to takethis is that I cannot
determine if an article was really rejected, or if it was just too slow in
coming.  This is important if I'm trying to determine whether to stay in
nocheck mode, or if I am calculating whether or not to close my check
window down.  IHAVE seems not to suffer from this problem as badly as
streaming.  I'm suspicious that this is a implementation issue somewhere in
INN, though this is little more than a guess since I have not checked the
source code.

I'm about ready to add a new command to NNTPRelay to enable it to return
438 when an article was received on another connection prior to the
termination on the current connection.  Maybe "mode advstream", though I
think this should be the default behavior.

-Chris


Re: bug in INN1.4unoff4 streaming code
#16894
Author: Don Lewis
Date: Thu, 10 Apr 1997 00:00
30 lines
1890 bytes
In article <01bc4549$27b69ea0$1f8fe680@spring>,
Chris Sedore <cmsedore@maxwell.syr.edu> wrote:
>
>
>Jerry Aguirre <jerry@rigel.whowhere.com> wrote in article
><5igq95$2mk$1@fes.whowhere.com>...
>> How are you telling a "late refusal" from other errors?  In debugging the
>> code a lot of rejected articles were from unwanted newsgroups, too old,
>> header errors, etc.  As I recall the server has two response codes,
>> accepted, and rejected.  Sending one at a time will not help you to
>> avoid sending articles that are rejected for the above reasons.
>
>Most of the articles are rejected because they arrived before my
>transmission completed.


>I'm about ready to add a new command to NNTPRelay to enable it to return
>438 when an article was received on another connection prior to the
>termination on the current connection. 

I think it would be useful to if the NNTP article rejection responses
could be standardized so that feeders could take the appropriate
action.
-- 
Don "Truck" Lewis                                       TDK Semiconductor
Internet: Don.Lewis@tsc.tdk.com                         138 New Mohawk Road
Phone: +1 916 478-8284       FAX: +1 916 478-8251       Nevada City, CA  95959

Re: bug in INN1.4unoff4 streaming code
#16925
Author: Chris Sedore
Date: Sat, 12 Apr 1997 00:00
148 lines
7537 bytes


Jerry Aguirre <jerry@rigel.whowhere.com> wrote in article
<5imno1$5km$1@fes.whowhere.com>...
> In article <01bc4549$27b69ea0$1f8fe680@spring>,
> Chris Sedore <cmsedore@maxwell.syr.edu> wrote:
[...]
> In the INN implementation of streaming!  I considered implementing it
> by forking off a separate stream-only server that would handle the
> connection.  Consider the "mode reader" command which under INN sets up
> a separate process that will not understand "IHAVE".  In INN it would
> be fairly trivial to modify it to support mixed check/ihave commands.
> Just have IHAVE free the message ID buffer.  But it might not be so
> easy for another implemetation.
> 
> You have to ask yourself are you working on a robust portable protocol
> or a hack that will only work with certain implementations.  Remember
> the "be conservative in what you send" part?  Sorry if I sound too
> critical.  I just think it is not a very good idea to switch back and
> forth.

Yes, I remember.  What is not specified (and what we apparently disagree
on) is whether streaming is a protocol *extension* or a *separate*
protocol.  In the extension case (my view) it is perfectly logical and
acceptable to "switch" back and forth.  In fact, streaming is not a
separate protocol because it requires use of the previous return codes for
things like throttling and errors.

> >Most of the articles are rejected because they arrived before my
> >transmission completed.  The main disadvantage to takethis is that I
cannot
> 
> How do you know this?  Do you also have access to the server to check
> its logs?

Since I feed a number of other sites that have the exact same reject
parameters I do, with rare exception all the rejects will come from this.
 
> >determine if an article was really rejected, or if it was just too slow
in
> >coming.  This is important if I'm trying to determine whether to stay in
> >nocheck mode, or if I am calculating whether or not to close my check
[...]
> 
> There is code in innd to lock a message ID while it is being sent.  If
> innd gets an IHAVE for a new article then it will lock that ID for 60
> seconds(?).  If a second feed does an IHAVE of the same ID it will just
> hang the second connection waiting for the first to finish transferring
> the article.  If the article is there within the timeout then the
> second feed will refuse the article because it has already been
> processed.  Thus there is no window for duplicates.   (Unless the first
> sender is very slow and the lock times out.)

This exactly confirms my experience with INN.

> This is not ideal as a slow feed can stall others who are trying to
> send the same article.  There was some work in progress to have a
> different IHAVE response code, the "send it later" response.  Instead
> of hanging the second connection it would return a "send it later"
> response.  The second feed would be free to offer other articles.
> Hopefully it would retry the potential duplicate later and it would
> then be refused if the original transfer had been sucessful.

The "send it later" is a pain, but a necessary one I suppose.

> Under streaming mode there is a fully implemented "send it later"
> response code.  What may be causing increased duplicates is how the
> check and takethis code interacts with the message ID locking.  It was
> not very clear to me which was the best way to handle that.
> 
> Should a "check" command lock the ID on the assumption that the message
> will be sent soon?  Remember that there is no assumption with check that
> the article will soon follow.  With a large window and several
> "takethis" articles in the pipe it could be quite some time before the
> article was received.  And if the other feeds are using IHAVE
> then they will stall.

I lock on the check and I refuse the article from other hosts for the lock
time.  I plan to modify this to allow the article to be double-accepted and
possibly also to use the "try again later" code if desired,  too.

> I think what I did was to not lock the message ID on the check but did
[...]
> An interesting enhancement to streaming trasmisson would be to use the
> number of bytes in the pipe as a limit in addition to the number of
> check/takethis commands.  For small articles one requires a large window
[...]
which pipe are you refering to?
> 
> >I'm about ready to add a new command to NNTPRelay to enable it to return
> >438 when an article was received on another connection prior to the
> >termination on the current connection.  Maybe "mode advstream", though I
> >think this should be the default behavior.
> 
> I ran a fairly big server with at least 10 major incomming feeds plus
> quite a few slower feeds.  Every day I would get the log summary which
> included the number of duplicates received.  Yes, there were some but I
> never saw enough for me to worry about.  Sites sending me groups I
> didn't want was a bigger problem than duplicates.

I don't do incoming group checking and I think I probably have on the order
of 20 major feeds, maybe 30, depending on what "major" is.  I think our
total number is around 80-90 now.

> If your incomming feeds are diverse enough then the order of the
> articles will be sufficiently different that duplicates will not be a
> big problem.  If your incomming feed sites are so closely coupled that
> they are in "sync" then they are not providing real redundancy.  By
[..]

True, but if you are trying to reduce usenet propagation time, you have to
have many feeds to aggregate the traffic one "tier" lower than the current
arrangement (in hub and spoke terminology).  This means checking lots of
articles (we're currently doing 10-13 million db searches per day).

> Can you quantify the percentage of duplicates you are seeing?

Sure.  Currently I have these statistics:

Started Fri Apr 11 05:24:26 Eastern Daylight Time 1997
Uptime 0.18941 days
ihave 603415
ihave_accept 41493
ihave_refuse 523483
ihave_reject 38111
check 2141954
check_refuse 2086293
takethis 87185
takethis_refuse 49674
precommit_saves 101900
search 2911912
insert 79004

precommit_saves is the number of times that my locking code prevented an
article from being sent more than once.  This is currently 128% of the
number of articles I have actually accepted (insert).  takethis_refuse is
the number of times that an article was rejected--I called it this because
most of the time it is due to a refuse not a reject.  I'd estimate that
50-70% of these are actually duplicates.

My lock is implemented as a 25 article id circular queue.  Each lock from a
check, takethis, or IHAVE is held until it is pushed out.  This is normally
1-8 seconds depending on how bursty the traffic is.

-Chris

Re: bug in INN1.4unoff4 streaming code
#16927
Author: Barry Boursyma
Date: Sat, 12 Apr 1997 00:00
84 lines
4767 bytes
On 12 Apr 1997, Chris Sedore wrote:

> > Under streaming mode there is a fully implemented "send it later"
> > response code.
> 
> I lock on the check and I refuse the article from other hosts for the lock
> time.  I plan to modify this to allow the article to be double-accepted and
> possibly also to use the "try again later" code if desired,  too.

    You'd definitely do much better to return the 431 code (try later)
rather than refusing the article, and I imagine this would be a trivial
change to your code.  I've watched innxmit running verbosely in streaming
mode and see that it does the right thing when faced with this response --
trying the article a second time around.

    Chances are you aren't actually losing many articles with your present
strategy, since there are a number of distant feeds to you which would get
the article to you after some time, in the event that the intended
transfer fails.  However, by using the 431/436 code, you'll assure that
your closer peers will retry the article rather quickly and you'll pretty
much eliminate the possibility that the article will be lost in the
confusion.


> ihave_refuse 523483
> ihave_reject 38111
> check 2141954
> check_refuse 2086293
> takethis 87185
> takethis_refuse 49674
> precommit_saves 101900
> 
> precommit_saves is the number of times that my locking code prevented an
> article from being sent more than once.  This is currently 128% of the
> number of articles I have actually accepted (insert).  takethis_refuse is
> the number of times that an article was rejected--I called it this because
> most of the time it is due to a refuse not a reject.

    A trivial difference in terminology, but a reject implies that the
article was transferred in its entirety before being tossed, whilst a
refuse implies (to INN-heads) that the only wasted bandwidth was the
transfer of the Message-ID.  That is, rejects are undesirable, just as are
your takethis_refuse, for sites which are concerned with bandwidth spent
with no gain.  Of course, a duplicate article is rather different from an
article with an invalid Message-ID or which is three weeks old or which
otherwise can't be accepted.


    For what it's worth, now that I'm peering with a number of very fast
sites, my configuration to these sites consists of sending at most 3 to 5
CHECKs in the category of articles smaller than 4k size, but over a number
of connections ranging from 5 to 10 simultaneously.  This has resulted in
a significant decrease of tossed articles (sent but rejected after
transmission) from the time I was giving 10 CHECKs.  However, this
requires that the peer have the resources (file descriptors) to handle
enough incoming connections, as well as not to be slowed down during the
INN select loop.  Most peers running conventional INN will not be happy
about this, yet my primary incoming server has been handling some 120
incoming connections with no noticeable delay in response lately -- but
I'm sure I'd see that it's not quite up to snuff if I bothered to perform
actual measurements.  I'm lazy though, and if cruel twists of fate cause
me to accept over 360 000 articles daily, I'll rack my brains on other
things like sleep.

    At the same time, proving that the connection into this country is the
kink in the hose (and traceroutes as seen from other sites have confirmed
my suspicions), the change in strategy for outgoing peers at Maxwell has
resulted in a keep-up rate at my end now on the order of >90%, much
improved from the time when it would fluctuate wildly from around 10%
during weekdays to 80% or more overnight.

    Just some more figures for those who like to turn numbers into useful
code...


Barry Bouwsma, Radio Praha newsbully


P.S.:  I'm not bragging.  In fact, given the disasters which have befallen
me lately, I'd be doing better to hide my head.  Target practice, anyone?


Re: bug in INN1.4unoff4 streaming code
#16930
Author: Sang-yong Suh
Date: Sat, 12 Apr 1997 00:00
22 lines
1670 bytes
In article <5imno1$5km$1@fes.whowhere.com>,
Jerry Aguirre <jerry@rigel.whowhere.com> wrote:
>                           There was some work in progress to have a
>different IHAVE response code, the "send it later" response.  Instead
>of hanging the second connection it would return a "send it later"
>response.  The second feed would be free to offer other articles.

I wish the response code, "send it later" be applied to the host base,
probably introducing another field in hosts.nntp.  The reason
is that we have several ISPs each of them have their own foreign
link.  The so called backbone news servers receive some amount of news
from foreign sites and distribute to other backbone servers.
Because we know that receiving from foreign sites is slower than
that from domestic sites, I prefer simultaneous receiving from the
faster sites but not from the slower sites.

Would my suggestion too difficult to implement?
--
sysuh

Re: bug in INN1.4unoff4 streaming code
#16934
Author: Jerry Aguirre
Date: Sat, 12 Apr 1997 00:00
105 lines
6234 bytes
In article <01bc4549$27b69ea0$1f8fe680@spring>,
Chris Sedore <cmsedore@maxwell.syr.edu> wrote:
>Well, it depends on your perspective of the mode command.  It really (in
>this case) is a misnomer--it just verifies a capability rather than
>actually causing a mode switch.  Part of the question is whether streaming

In the INN implementation of streaming!  I considered implementing it
by forking off a separate stream-only server that would handle the
connection.  Consider the "mode reader" command which under INN sets up
a separate process that will not understand "IHAVE".  In INN it would
be fairly trivial to modify it to support mixed check/ihave commands.
Just have IHAVE free the message ID buffer.  But it might not be so
easy for another implemetation.

You have to ask yourself are you working on a robust portable protocol
or a hack that will only work with certain implementations.  Remember
the "be conservative in what you send" part?  Sorry if I sound too
critical.  I just think it is not a very good idea to switch back and
forth.

>Most of the articles are rejected because they arrived before my
>transmission completed.  The main disadvantage to takethis is that I cannot

How do you know this?  Do you also have access to the server to check
its logs?

>determine if an article was really rejected, or if it was just too slow in
>coming.  This is important if I'm trying to determine whether to stay in
>nocheck mode, or if I am calculating whether or not to close my check
>window down.  IHAVE seems not to suffer from this problem as badly as
>streaming.  I'm suspicious that this is a implementation issue somewhere in
>INN, though this is little more than a guess since I have not checked the
>source code.

There is code in innd to lock a message ID while it is being sent.  If
innd gets an IHAVE for a new article then it will lock that ID for 60
seconds(?).  If a second feed does an IHAVE of the same ID it will just
hang the second connection waiting for the first to finish transferring
the article.  If the article is there within the timeout then the
second feed will refuse the article because it has already been
processed.  Thus there is no window for duplicates.   (Unless the first
sender is very slow and the lock times out.)

This is not ideal as a slow feed can stall others who are trying to
send the same article.  There was some work in progress to have a
different IHAVE response code, the "send it later" response.  Instead
of hanging the second connection it would return a "send it later"
response.  The second feed would be free to offer other articles.
Hopefully it would retry the potential duplicate later and it would
then be refused if the original transfer had been sucessful.

Under streaming mode there is a fully implemented "send it later"
response code.  What may be causing increased duplicates is how the
check and takethis code interacts with the message ID locking.  It was
not very clear to me which was the best way to handle that.

Should a "check" command lock the ID on the assumption that the message
will be sent soon?  Remember that there is no assumption with check that
the article will soon follow.  With a large window and several
"takethis" articles in the pipe it could be quite some time before the
article was received.  And if the other feeds are using IHAVE
then they will stall.

I think what I did was to not lock the message ID on the check but did
lock on the takethis command.  Certainly this provides a window for
duplicates.  I think this is inherent in achieving good thruput.

If the "send it later" response were generally implemented then it might
make sense to lock the ID on a check command.  Yes, it might delay other
sending of that article, but not permanently.  The lock time might also
need to be bumped up a bit to allow for the stream window and the
megabyte articles being sent.

An interesting enhancement to streaming trasmisson would be to use the
number of bytes in the pipe as a limit in addition to the number of
check/takethis commands.  For small articles one requires a large window
to achieve good thruput.  But for large articles a window of 2 would
provide the same thruput and a greatly reduced chance of duplicates.
This might be more effective than trying to separate the cause of
article rejections.

>I'm about ready to add a new command to NNTPRelay to enable it to return
>438 when an article was received on another connection prior to the
>termination on the current connection.  Maybe "mode advstream", though I
>think this should be the default behavior.

I ran a fairly big server with at least 10 major incomming feeds plus
quite a few slower feeds.  Every day I would get the log summary which
included the number of duplicates received.  Yes, there were some but I
never saw enough for me to worry about.  Sites sending me groups I
didn't want was a bigger problem than duplicates.

If your incomming feeds are diverse enough then the order of the
articles will be sufficiently different that duplicates will not be a
big problem.  If your incomming feed sites are so closely coupled that
they are in "sync" then they are not providing real redundancy.  By
this I mean that if you are fed by two sites that are each fed from
UUNET then they will offer you the articles in the same order with a
greater chance of duplicates.  But if UUNET were down then all your
feeds would be down.

Can you quantify the percentage of duplicates you are seeing?

Re: bug in INN1.4unoff4 streaming code
#16953
Author: Jerry Aguirre
Date: Mon, 14 Apr 1997 00:00
75 lines
4372 bytes
In article <01bc46e8$91616f10$9401e680@spring>,
Chris Sedore <cmsedore@maxwell.syr.edu> wrote:
>
>Yes, I remember.  What is not specified (and what we apparently disagree
>on) is whether streaming is a protocol *extension* or a *separate*
>protocol.  In the extension case (my view) it is perfectly logical and
>acceptable to "switch" back and forth.  In fact, streaming is not a
>separate protocol because it requires use of the previous return codes for
>things like throttling and errors.

Exactly BECAUSE it "is not specified" is why you need to be careful!
Obviously it can be implemented in several ways.  One implementation
might just add the streaming commands to the existing ones.  Another
might actually change modes.

Specifying the protocol more tightly, say by specifying that all
commands should be supported after mode stream, might make your life
happier right now but would unnecessarily restrict someone implementing
the protocol at some future time.  As I said I had strong reasons to
want to implement streaming under INN as a separate process as was done
for readers.

>I lock on the check and I refuse the article from other hosts for the lock
>time.  I plan to modify this to allow the article to be double-accepted and
>possibly also to use the "try again later" code if desired,  too.

If the other session is doing an IHAVE then your choices are to accept
the (duplicate) article, refuse it, or to block that connection until
the article has transferred.  That is about it.

If the other session is a streaming "CHECK" then you have the added
option to use the "try later" command.  Under INN (innxmit) this causes
another CHECK command to be sent.  Due to the delays the server
will see this enough later that the other feed is already likely to
have finished the article.  In other words use the send it later
response for CHECK commands.  It works fine.

>> An interesting enhancement to streaming trasmisson would be to use the
>> number of bytes in the pipe as a limit in addition to the number of
>> check/takethis commands.  For small articles one requires a large window
>[...]
>which pipe are you refering to?

When the sender (innxmit for example) does six CHECK commands the server
does not immediately receive them.  The OS on the client side buffers
these up.  Then they get sent out on the network where routers do store
and forward processing.  Then the server's OS buffers the received
packets and presents the data to the server as requested.  All this
buffering is quite substantial and was what I was reffering to as the
"pipe".

It is by filling this "pipe" that streaming is able to make better use
of the connection bandwidth.  Ideally when the server finished
processing a request it will find that there is already some data in its
input buffer waiting to be processed.  Thus it doesn't have to sit idle
waiting for the client to send it more data.

The INN innxmit streaming code measure's the "fullness of the pipe" by
the number of CHECK or TAKETHIS commands it has sent but which have not
been ackowledged.  This issue is that a TAKETHIS comand might have been
a 300 byte cancel message of a 900,000 byte binary.  The later should
count for more.

>My lock is implemented as a 25 article id circular queue.  Each lock from a
>check, takethis, or IHAVE is held until it is pushed out.  This is normally
>1-8 seconds depending on how bursty the traffic is.

This seems inadequate to me.  A single innxmit can offer 16 articles via
"CHECK" before the first arrives.  Thus even two such feeds would seem
to saturate your 25 ID lock queue.

					Jerry Aguirre

Re: bug in INN1.4unoff4 streaming code
#16983
Author: News Admin news.maxwell.syr.edu
Date: Tue, 15 Apr 1997 00:00
89 lines
4896 bytes
On 14 Apr 1997 21:38:49 GMT, jerry@rigel.whowhere.com (Jerry Aguirre)
wrote:

>In article <01bc46e8$91616f10$9401e680@spring>,
>Chris Sedore <cmsedore@maxwell.syr.edu> wrote:
>>
>>Yes, I remember.  What is not specified (and what we apparently disagree
>>on) is whether streaming is a protocol *extension* or a *separate*
>>protocol.  In the extension case (my view) it is perfectly logical and
>>acceptable to "switch" back and forth.  In fact, streaming is not a
>>separate protocol because it requires use of the previous return codes for
>>things like throttling and errors.
>
>Exactly BECAUSE it "is not specified" is why you need to be careful!
>Obviously it can be implemented in several ways.  One implementation
>might just add the streaming commands to the existing ones.  Another
>might actually change modes.
>
>Specifying the protocol more tightly, say by specifying that all
>commands should be supported after mode stream, might make your life
>happier right now but would unnecessarily restrict someone implementing
>the protocol at some future time.  As I said I had strong reasons to
>want to implement streaming under INN as a separate process as was done
>for readers.

I think we just disagree about whether it is an extension, or a
protocol in its own right. 

>>I lock on the check and I refuse the article from other hosts for the lock
>>time.  I plan to modify this to allow the article to be double-accepted and
>>possibly also to use the "try again later" code if desired,  too.
>
>If the other session is doing an IHAVE then your choices are to accept
>the (duplicate) article, refuse it, or to block that connection until
>the article has transferred.  That is about it.
>
>If the other session is a streaming "CHECK" then you have the added
>option to use the "try later" command.  Under INN (innxmit) this causes
>another CHECK command to be sent.  Due to the delays the server
>will see this enough later that the other feed is already likely to
>have finished the article.  In other words use the send it later
>response for CHECK commands.  It works fine.

Yes it works, but it is a nuisance to have to double (or more) offer
each article.  In my case I simply refuse it for the lock time.  For
some hosts it seems that we get about 10-20% "try later" returns,
which is a significant number of re-offers.  

>>> An interesting enhancement to streaming trasmisson would be to use the
>>> number of bytes in the pipe as a limit in addition to the number of
>>> check/takethis commands.  For small articles one requires a large window
>>[...]
>>which pipe are you refering to?
>
>When the sender (innxmit for example) does six CHECK commands the server
>does not immediately receive them.  The OS on the client side buffers
>these up.  Then they get sent out on the network where routers do store
[...]
>
>It is by filling this "pipe" that streaming is able to make better use
>of the connection bandwidth.  Ideally when the server finished
[..]
>
>The INN innxmit streaming code measure's the "fullness of the pipe" by
>the number of CHECK or TAKETHIS commands it has sent but which have not
>been ackowledged.  This issue is that a TAKETHIS comand might have been
>a 300 byte cancel message of a 900,000 byte binary.  The later should
>count for more.

This seems like a good idea.  I'd like to be able to get some of TCP's
calculated parameters (like RTT) to use in this calculation, too.

>>My lock is implemented as a 25 article id circular queue.  Each lock from a
>>check, takethis, or IHAVE is held until it is pushed out.  This is normally
>>1-8 seconds depending on how bursty the traffic is.
>
>This seems inadequate to me.  A single innxmit can offer 16 articles via
>"CHECK" before the first arrives.  Thus even two such feeds would seem
>to saturate your 25 ID lock queue.

Assuming that all 32 are accepted, it would.  I don't often see
incoming rushes of 32 articles in that short a period, except when
clearing a backlog.  My queue length is configurable, though, so if
you were concerned you could lengthen it.

-Chris

Re: bug in INN1.4unoff4 streaming code
#17082
Author: Alan Brown
Date: Thu, 17 Apr 1997 00:00
39 lines
2274 bytes

In article <5iu859$44v$1@fes.whowhere.com>,
Jerry Aguirre <jerry@rigel.whowhere.com> wrote:

>The INN innxmit streaming code measure's the "fullness of the pipe" by
>the number of CHECK or TAKETHIS commands it has sent but which have not
>been ackowledged.  This issue is that a TAKETHIS comand might have been
>a 300 byte cancel message of a 900,000 byte binary.  The later should
>count for more.

This is a fundamental problem of newsfeeding.

My very hacky solution was simply to split all outbound feeds into small 
and large streams. For some sites I've broken the outbound feed into 3 
streams based on article size.

Things are working a lot better than they were now, largely because small 
articles are not blocked by 2Mb binary postings in the same stream.

>>My lock is implemented as a 25 article id circular queue.  Each lock from a
>>check, takethis, or IHAVE is held until it is pushed out.  This is normally
>>1-8 seconds depending on how bursty the traffic is.
>
>This seems inadequate to me.  A single innxmit can offer 16 articles via
>"CHECK" before the first arrives.  Thus even two such feeds would seem
>to saturate your 25 ID lock queue.

One solution would be to provide a circular queue for each incoming feed
or add 25 places to the queue for each incoming connect.

AB
-- 
o Stamp out unauthorised relay-hosting. This SMTP "feature" shouldn't default 
  "on" - See http://www.vix.com/spam/ and http://www.sendmail.org/antispam.html

             There's a hole in the sky the size of America.

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