Thread View: news.software.nntp
7 messages
7 total messages
Started by Terry Kyriacopoulos
Thu, 29 May 1997 00:00
Why does nnrpd pause on 'article' and not 'head'/'body' ?
Author: Terry Kyriacopoulos
Date: Thu, 29 May 1997 00:00
Date: Thu, 29 May 1997 00:00
10 lines
828 bytes
828 bytes
I'm running INN 1.5.1 on Linux. When I telnet (loopback) to innd and use the 'ARTICLE n' NNTP command, there is a one second pause before the article is output, but (and this is really mysterious) there is no pause at all when I use the 'HEAD n' or 'BODY n' commands. Can anyone confirm or explain this?
Re: Why does nnrpd pause on 'article' and not 'head'/'body' ?
Author: Karl Kleinpaste
Date: Thu, 29 May 1997 00:00
Date: Thu, 29 May 1997 00:00
9 lines
923 bytes
923 bytes
Terry Kyriacopoulos <terryk@interlog.com> writes: > I'm running INN 1.5.1 on Linux. When I telnet (loopback) to innd and > use the 'ARTICLE n' NNTP command, there is a one second pause before the In config.data, change LIKE_PULLERS to DO and rebuild. Only nnrpd will be affected. See $inn/nnrpd/article.c:ARTsend(), line 236.
Re: Why does nnrpd pause on 'article' and not 'head'/'body' ?
Author: Pierre Belanger
Date: Fri, 30 May 1997 00:00
Date: Fri, 30 May 1997 00:00
82 lines
2998 bytes
2998 bytes
Pierre Belanger wrote:
>
> Terry Kyriacopoulos wrote:
> >
> > I'm running INN 1.5.1 on Linux. When I telnet (loopback) to innd and
> > use the 'ARTICLE n' NNTP command, there is a one second pause before the
> > article is output, but (and this is really mysterious) there is no pause
> > at all when I use the 'HEAD n' or 'BODY n' commands.
> >
> > Can anyone confirm or explain this?
>
> The pause of 1 second is a compilation option. You can remove
> it if you want. The pause is there to avoid a 'robot' from
> polling your news server and taking too much CPU time ...
>
> I have exchanged a few messages concerning this pause with James
> and I beleive we both agreed that the pause should stay but
> instead of pausing before sending the article we modified
> nnrpd to pause _after_ sending the article. This way, robots
> still get 'paused' and others, like you and I, if you take the
> time to read the article you just retreive, you won't notice
> the pause of -1- second.
>
> I also suggested to James to have a 'variable pause' by considering
> the load average of the machine. James also suggested to have a
> pause according to how many articles the 'reader' so far took...
>
> I will post the patch here and mail it to you tomorrow when
> I get to work...
>
> Pierre Belanger - RISQ
So, here is the patch to apply to article.c:
*** article.c Fri May 30 10:35:20 1997
--- article.c Fri May 30 10:38:26 1997
***************
*** 233,249 ****
ARTcount++;
GRParticles++;
- #if defined (DONT_LIKE_PULLERS)
- {
- static int count ;
-
- count++ ;
-
- if (what == STarticle || count > 100)
- sleep (1) ; /* slow down sucking readers */
- }
- #endif
-
/*
* it should never take 5 minutes to send an article line
*/
--- 233,238 ----
***************
*** 284,290 ****
--- 273,293 ----
Printf("%s%s\r\n", *p == '.' ? "." : "", p);
}
Printf(".\r\n");
+
alarm(0); /* cancel timer */
+
+ #if defined (DONT_LIKE_PULLERS)
+ {
+ static int count ;
+
+ count++ ;
+
+ if ((what == STarticle) || (count > 100)) {
+ sleep (1) ; /* slow down sucking readers */
+ (void)fflush(stdout);
+ }
+ }
+ #endif
}
Re: Why does nnrpd pause on 'article' and not 'head'/'body' ?
Author: Pierre Belanger
Date: Fri, 30 May 1997 00:00
Date: Fri, 30 May 1997 00:00
31 lines
1851 bytes
1851 bytes
Andrew Gierth wrote:
>
> >>>>> "Pierre" == Pierre Belanger <pbelange@risq.qc.ca> writes:
>
> Pierre> So, here is the patch to apply to article.c:
>
> Pierre> + if ((what == STarticle) || (count > 100)) {
> Pierre> + sleep (1) ; /* slow down sucking readers */
>
> Tell me this. Why is it appropriate to penalise ARTICLE always,
> but HEAD/BODY only after 100 commands?
>
This patch only move the sleep after the article is sent instead
of pausing before sending it. I didn't really want to do much
more changes. Actually, this is the only thing I changed, the
'if' condition is still the same.
I kind of agree with you that, maybe, we should also have a sleep
for HEAD/BODY commands. BUT I can't agreed at 100% since I
am not a NNTP expert ;) I would need to know when are the news
clients using the HEAD or BODY and how often.
If you, or someone else, can do a follow up to give a little bit
more infos. on HEAD/BODY commands, we could certainly figure out
what exactly should be in the 'if' condition.
yours thruly,
Pierre Belanger - RISQ
Re: Why does nnrpd pause on 'article' and not 'head'/'body' ?
Author: Andrew Gierth
Date: Fri, 30 May 1997 00:00
Date: Fri, 30 May 1997 00:00
15 lines
1167 bytes
1167 bytes
>>>>> "Pierre" == Pierre Belanger <pbelange@risq.qc.ca> writes:
Pierre> So, here is the patch to apply to article.c:
Pierre> + if ((what == STarticle) || (count > 100)) {
Pierre> + sleep (1) ; /* slow down sucking readers */
Tell me this. Why is it appropriate to penalise ARTICLE always,
but HEAD/BODY only after 100 commands?
--
Andrew.
Re: Why does nnrpd pause on 'article' and not 'head'/'body' ?
Author: Pierre Belanger
Date: Fri, 30 May 1997 00:00
Date: Fri, 30 May 1997 00:00
32 lines
1856 bytes
1856 bytes
Terry Kyriacopoulos wrote: > > I'm running INN 1.5.1 on Linux. When I telnet (loopback) to innd and > use the 'ARTICLE n' NNTP command, there is a one second pause before the > article is output, but (and this is really mysterious) there is no pause > at all when I use the 'HEAD n' or 'BODY n' commands. > > Can anyone confirm or explain this? The pause of 1 second is a compilation option. You can remove it if you want. The pause is there to avoid a 'robot' from polling your news server and taking too much CPU time ... I have exchanged a few messages concerning this pause with James and I beleive we both agreed that the pause should stay but instead of pausing before sending the article we modified nnrpd to pause _after_ sending the article. This way, robots still get 'paused' and others, like you and I, if you take the time to read the article you just retreive, you won't notice the pause of -1- second. I also suggested to James to have a 'variable pause' by considering the load average of the machine. James also suggested to have a pause according to how many articles the 'reader' so far took... I will post the patch here and mail it to you tomorrow when I get to work... Pierre Belanger - RISQ
Re: Why does nnrpd pause on 'article' and not 'head'/'body' ?
Author: Jef Poskanzer
Date: Tue, 03 Jun 1997 00:00
Date: Tue, 03 Jun 1997 00:00
21 lines
1474 bytes
1474 bytes
Pierre Belanger <pierre.belanger@risq.qc.ca>:
}I have exchanged a few messages concerning this pause with James
}and I beleive we both agreed that the pause should stay but
}instead of pausing before sending the article we modified
}nnrpd to pause _after_ sending the article. This way, robots
}still get 'paused' and others, like you and I, if you take the
}time to read the article you just retreive, you won't notice
}the pause of -1- second.
Geez, I hope that doesn't become the official fix for the LIKE_PULLERS
screwup, since it would still penalize completely legit uses such
as killfiles.
---
Jef
Jef Poskanzer jef@acme.com http://www.acme.com/jef/
"Any sufficiently advanced bug is indistinguishable from a feature."
-- Rich Kulawiec
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