Thread View: news.software.readers
15 messages
15 total messages
Started by Reality is a point of view
Sun, 19 Jul 1998 00:00
Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Reality is a point of view
Date: Sun, 19 Jul 1998 00:00
Date: Sun, 19 Jul 1998 00:00
62 lines
2560 bytes
2560 bytes
While using a new news server, one that carries a large number
of articles (10,000+ for some groups), I noticed slrn starting
up very slowly. Too slow. After finding out that GROUP was
causing the problem I was told LIST ACTIVE is faster. So,
after a night out, I foolishly tried to munge. Broken patch
follows. NNTP_Type reuse bug? estim = bug? slrn_opn_xover()
side effect? I'm going to bed, you tell me.
--
Gary Johnson gjohnson@season.com
Privacy on the net is still illegal.
--- nntplib.orig Sun May 3 13:06:26 1998
+++ nntplib.c Sun Jul 19 04:56:55 1998
@@ -199,6 +199,24 @@
if (-1 == nntp_gets_server (s, s->rspbuf, NNTP_RSPBUF_SIZE))
return -1;
+/*
+This is an hack that fakes multiline response parsing for the
+LIST ACTIVE special case. I know nothing about NNTP_Type state
+changes, I just want faster GROUP data.
+*/
+ if( strstr( s->rspbuf, "list:" ) != NULL )
+ {
+ NNTP_Type cheese = *s;
+ char curd[NNTP_RSPBUF_SIZE];
+ if( -1 == nntp_gets_server( &cheese, cheese.rspbuf, NNTP_RSPBUF_SIZE ) )
+ return 1;
+ strcpy( curd, cheese.rspbuf );
+ if( -1 == nntp_gets_server( &cheese, cheese.rspbuf, NNTP_RSPBUF_SIZE ) )
+ return 1;
+ strcpy( s->rspbuf, "211 " );
+ strcat( s->rspbuf, curd );
+ }
+
status = atoi (s->rspbuf);
if (((status == ERR_FAULT) && (-1 != _nntp_try_parse_timeout (s->rspbuf)))
@@ -701,16 +719,17 @@
int estim;
int min, max;
- switch (nntp_server_vcmd (s, "GROUP %s", name))
+ switch (nntp_server_vcmd (s, "LIST ACTIVE %s", name))
{
case -1:
return -1;
case OK_GROUP:
- if (3 != sscanf(s->rspbuf + 4, "%d %d %d", &estim, &min, &max))
+ if (2 != sscanf(s->rspbuf + strlen( name ) + 1 + 4, "%d %d", &max, &min))
return -1;
+ estim = max - min;
if (minp != NULL) *minp = min;
if (maxp != NULL) *maxp = max;
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Sylvain Robitaille
Date: Sat, 25 Jul 1998 00:00
Date: Sat, 25 Jul 1998 00:00
30 lines
1969 bytes
1969 bytes
On 19 Jul 1998 14:15:18 GMT, Reality is a point of view
<gjohnson@dream.season.com> wrote:
> While using a new news server, one that carries a large number
> of articles (10,000+ for some groups), I noticed slrn starting
> up very slowly. Too slow. After finding out that GROUP was
> causing the problem I was told LIST ACTIVE is faster. So,
> after a night out, I foolishly tried to munge. Broken patch
> follows. NNTP_Type reuse bug? estim = bug? slrn_opn_xover()
> side effect? I'm going to bed, you tell me.
What was wrong with (from sample slrn.rc file in source distribution):
% If non-zero, slrn will read the active file when starting. This may
% lead to faster startup times IF your network connection is fast. If
% it is slow, DO NOT USE IT. If you can, I recommend setting it to 1.
set read_active 0
Of course, to use LIST ACTIVE, have 'set read_active 1' in your .slrnrc
file.
--
----------------------------------------------------------------------
Sylvain Robitaille syl@alcor.concordia.ca
Systems Manager Concordia University
Instructional & Information Technology Montreal, Quebec, Canada
----------------------------------------------------------------------
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Reality is a point of view
Date: Sat, 25 Jul 1998 00:00
Date: Sat, 25 Jul 1998 00:00
42 lines
2184 bytes
2184 bytes
+---- syl@alcor.concordia.ca wrote (25 Jul 1998 11:03:34 GMT): | % If non-zero, slrn will read the active file when starting. This may | % lead to faster startup times IF your network connection is fast. If My network connection isn't fast. | % it is slow, DO NOT USE IT. If you can, I recommend setting it to 1. | set read_active 0 | | Of course, to use LIST ACTIVE, have 'set read_active 1' in your .slrnrc | file. +---- Maybe I'm still hung over, or missing something, but read_active doesn't seem to do what I need. connect MODE READER LIST ACTIVE newsgroup (instead of GROUP to get current stats) pick a group GROUP newsgroup (I wish this weren't necessary!) XOVER range pick an article ARTICLE id GROUP can be really slow because the server in question has a large spool and user base. Any GROUP is expensive (sometimes more than 10 seconds each), especially multiple GROUP's on startup (before anything can happen). So much so that, after waking up (seemingly) sober I passed on another pass through slrn source and decided to finish a newsreader project. Early results are good. I start slrn and before the group list appears (delayed because GROUP's are hitting slow server storage) I can start my reader, browse groups, read a few articles, and shut down. -- Gary Johnson gjohnson@season.com Privacy on the net is still illegal.
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Sylvain Robitaille
Date: Mon, 27 Jul 1998 00:00
Date: Mon, 27 Jul 1998 00:00
37 lines
2440 bytes
2440 bytes
On 25 Jul 1998 20:48:11 GMT, Reality is a point of view <gjohnson@dream.season.com> wrote: > GROUP can be really slow because the server in question has a > large spool and user base. Any GROUP is expensive (sometimes > more than 10 seconds each), especially multiple GROUP's on > startup (before anything can happen). Ohhhh.... This sounds a little *too* familiar! :-( Let me guess, your provider is using INN as the news server, and is in a situation where they end up with excessively large (spool) directories which see lots of activity; (perhaps they have very long expiry times on some of the more active newsgroups). At our site, we stopped carrying the 'junk' pseudogroup and *POOF!* the news server was usable again! Also, we split cancel messages into their own pseudogroup, 'control.cancel'. > Early results are good. I start slrn and before the group list > appears (delayed because GROUP's are hitting slow server > storage) I can start my reader, browse groups, read a few > articles, and shut down. I suppose by "slow server storage", you could also mean simply slow disks. Based on experience described above though, I might try and discuss the matter with the newsmaster at the site and see what they think the problem might be, (and if they intend to do anything about it). -- ---------------------------------------------------------------------- Sylvain Robitaille syl@alcor.concordia.ca Systems Manager Concordia University Instructional & Information Technology Montreal, Quebec, Canada ----------------------------------------------------------------------
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Jeremy
Date: Tue, 28 Jul 1998 00:00
Date: Tue, 28 Jul 1998 00:00
53 lines
3310 bytes
3310 bytes
Reality is a point of view <gjohnson@dream.season.com> wrote: > | Based on experience described above though, I might try and discuss the > | matter with the newsmaster at the site and see what they think the problem > | might be, (and if they intend to do anything about it). > +---- > > It isn't a bug, it's a feature. An admin suggested using > newsreaders that use LIST ACTIVE. I tried to tweak slrn, much > faster start up and failure when entering groups (half baked > kludge was posted). I revived an old Java newsreader project, > much faster and it works. Without history or scoring, so far. > > So I'm unlikely to poke around in the slrn source again. The > problem is the use of GROUP instead of LIST ACTIVE for > newsgroup overviews. I wish GROUP was completely unnecessary. > Unfortunately XOVER and ARTICLE don't take newsgroup arguments. Since I was the admin who got all this started :) let me jump in here and see if I can clarify. In certain groups, GROUP commands take a while, becuase there might be 30000 or 60000 articles in the group, and yes, it's an INN-based system. Improving the response of GROUP commands is on the to-do list, but is not a simple patch-n-recompile thing. When slrn starts up, it uses a whole bunch of GROUP commands to make its newsgroup list with the number of articles in each. (If you don't have it reading the active file, which I'll get to in a minute.) So, this can take a while. By contrast, trn uses LIST ACTIVE commands to do the same thing, which is *much* faster. I've been trying out slrn for a few weeks now (I've been using trn for quite a long time) and what I've done is "set read_active 1". But this reads the *whole* active file -- this is fine for me, since I'm using it on a shell account, but on a dialup connection this is quite useless. And it still takes too long to start up -- I assume this prevents all the GROUP commands, but it still has to read the whole active. (I didn't do a protocol trace on it with read_active on, as I'm not going to use that on my dialup, and I can't protocol-trace on my shell account). I realize GROUP is often more accurate than LIST ACTIVE, but it doesn't seem like that big a deal, and I don't see the point of using a whole bunch of GROUP commands just to make a list. -- Jeremy | jeremy@exit109.com Here's a nickel, kid. Go buy yourself a real computer.
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Reality is a point of view
Date: Tue, 28 Jul 1998 00:00
Date: Tue, 28 Jul 1998 00:00
43 lines
2732 bytes
2732 bytes
+---- syl@alcor.concordia.ca wrote (27 Jul 1998 11:04:05 GMT): | Ohhhh.... This sounds a little *too* familiar! :-( Let me guess, your | provider is using INN as the news server, and is in a situation where they | end up with excessively large (spool) directories which see lots of | activity; (perhaps they have very long expiry times on some of the more | active newsgroups). Yes. Supernews. Long expires/storage limits. All groups. Terabytes 'n shit. | I suppose by "slow server storage", you could also mean simply slow disks. No. Supernews uses, in addition to lots of drive storage, gigabytes of RAM. Slow server storage as in 'pull a directory' instead of 'pull from an index', the difference between GROUP (hits directories) and LIST ACTIVE (hits an index). When a newsgroup has 10,000+ articles the directory hits can be slow. In single instances it isn't so bad, but when a newsreader starts up and sends a pile of GROUP's immediately the delays can add up to minutes. | Based on experience described above though, I might try and discuss the | matter with the newsmaster at the site and see what they think the problem | might be, (and if they intend to do anything about it). +---- It isn't a bug, it's a feature. An admin suggested using newsreaders that use LIST ACTIVE. I tried to tweak slrn, much faster start up and failure when entering groups (half baked kludge was posted). I revived an old Java newsreader project, much faster and it works. Without history or scoring, so far. So I'm unlikely to poke around in the slrn source again. The problem is the use of GROUP instead of LIST ACTIVE for newsgroup overviews. I wish GROUP was completely unnecessary. Unfortunately XOVER and ARTICLE don't take newsgroup arguments. -- Gary Johnson gjohnson@season.com Privacy on the net is still illegal.
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Russ Allbery
Date: Tue, 28 Jul 1998 00:00
Date: Tue, 28 Jul 1998 00:00
27 lines
1840 bytes
1840 bytes
Jeremy <jeremy@exit109.com> writes: > Russ Allbery <rra@stanford.edu> wrote: >> Jeremy <jeremy@exit109.com> writes: >>> In certain groups, GROUP commands take a while, becuase there might be >>> 30000 or 60000 articles in the group, and yes, it's an INN-based >>> system. Improving the response of GROUP commands is on the to-do >>> list, but is not a simple patch-n-recompile thing. >> Isn't this one of the things that actived helps with? > Wouldn't actived's help be pretty restricted to things like LIST ACTIVE? > I mean, since it uses the active file, and all? (he said, having never > really delved into the code much...) Aha. You're right. Looking at group.c in the nnrpd source, a GROUP command actually goes into the directory, reads in all of the files, and then calls qsort on them. Bleh. No wonder GROUP on large newsgroups is so slow. -- Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Russ Allbery
Date: Tue, 28 Jul 1998 00:00
Date: Tue, 28 Jul 1998 00:00
13 lines
1248 bytes
1248 bytes
Jeremy <jeremy@exit109.com> writes: > In certain groups, GROUP commands take a while, becuase there might be > 30000 or 60000 articles in the group, and yes, it's an INN-based system. > Improving the response of GROUP commands is on the to-do list, but is > not a simple patch-n-recompile thing. Isn't this one of the things that actived helps with? -- Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Speeding up INN's GROUP command (was: Re: Getting slrn to use LIST ACTIVE instead of GROUP?)
Author: Jeremy
Date: Wed, 29 Jul 1998 00:00
Date: Wed, 29 Jul 1998 00:00
50 lines
3560 bytes
3560 bytes
I'm crossposting this to news.software.nntp, as it's departed from the realm of client software. :) Followups directed there... For those just joining us, I was trying, unsuccessfully, to find a way to speed up INN's GROUP command, which scans the entire directory and thus can take an eternity in a very large group. At Supernews we have groups with tens of thousands of articles present, creating a long wait for users of newsreaders that use a series of GROUP commands to create a list of newsgroups with article counts. Curt Welch <curt@kcwc.com> wrote: > jeremy@exit109.com (Jeremy) wrote: > >> Hmm. I wonder if a quick and dirty fix would be to make GROUP get >> its numbers from active? Or would that break something...? Hmm, >> something to ask our programmer about... > > I'm pretty sure that the old inn nnrpd will do that and remember the > list of valid articles. Then, when you do an XOVER, it matches that > list against the XOVER data and removes the XOVER records (from the > response) for missing articles. I'd guess that it also uses that list > for stepping though the articles with NEXT and LAST etc. So if you > don't read the directory and build that list, you will either have to > do it later, or you will just loose the accuracy of knowing which > articles are really there and which aren't. Yeah, that's what it'll break, I didn't think of that. On the other hand ... if you don't process cancels, there won't *be* any missing articles, right? :) > This is the problem that INN 2.0 created and it means the newsreaders > will show the user headers for articles that have been cancled. And > then returns errors when the user tries to read them. A real step > backwards in functionality. > > What you might want to do is hack in a change to GROUP that will limit > the number of article names it will read from the directory to something > like 1,000. When it hits the limit, it just gives up and returns the > active file info for the GROUP command. But remember the fact that > the article list isn't yet valid so you can go back and do it compleletly > when (and if) it's needed. This gives you fast GROUP commands for > clients that do a series of GROUP commands on start up, but retains > the accuracy of the info GROUP returns for small groups. -- Jeremy | jeremy@exit109.com "Everything you think you know is wrong." --Jack Chalker
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Jeremy
Date: Wed, 29 Jul 1998 00:00
Date: Wed, 29 Jul 1998 00:00
19 lines
1643 bytes
1643 bytes
Russ Allbery <rra@stanford.edu> wrote: > Jeremy <jeremy@exit109.com> writes: > >> In certain groups, GROUP commands take a while, becuase there might >> be 30000 or 60000 articles in the group, and yes, it's an INN-based >> system. Improving the response of GROUP commands is on the to-do >> list, but is not a simple patch-n-recompile thing. > > Isn't this one of the things that actived helps with? Wouldn't actived's help be pretty restricted to things like LIST ACTIVE? I mean, since it uses the active file, and all? (he said, having never really delved into the code much...) -- Jeremy | jeremy@exit109.com "I think I speak for everyone here when I say, 'Huh?'" --Buffy
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Jeremy
Date: Wed, 29 Jul 1998 00:00
Date: Wed, 29 Jul 1998 00:00
30 lines
2025 bytes
2025 bytes
Russ Allbery <rra@stanford.edu> wrote: >> Wouldn't actived's help be pretty restricted to things like LIST >> ACTIVE? I mean, since it uses the active file, and all? (he said, >> having never really delved into the code much...) > > Aha. You're right. Looking at group.c in the nnrpd source, a GROUP > command actually goes into the directory, reads in all of the files, and > then calls qsort on them. Yes, I know, that's the problem. :) With normal-sized newsgroups, you don't notice too much (though it is still an expensive operation). But try putting tens of thousands of articles in a group, and you see what we're talking about. > Bleh. > > No wonder GROUP on large newsgroups is so slow. Exactly. Hmm. I wonder if a quick and dirty fix would be to make GROUP get its numbers from active? Or would that break something...? Hmm, something to ask our programmer about... -- Jeremy | jeremy@exit109.com "Do you think a princess, and a guy like me..." --Han Solo
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Curt Welch
Date: Wed, 29 Jul 1998 00:00
Date: Wed, 29 Jul 1998 00:00
31 lines
2832 bytes
2832 bytes
jeremy@exit109.com (Jeremy) wrote: > Hmm. I wonder if a quick and dirty fix would be to make GROUP get > its numbers from active? Or would that break something...? Hmm, > something to ask our programmer about... I'm pretty sure that the old inn nnrpd will do that and remember the list of valid articles. Then, when you do an XOVER, it matches that list against the XOVER data and removes the XOVER records (from the response) for missing articles. I'd guess that it also uses that list for stepping though the articles with NEXT and LAST etc. So if you don't read the directory and build that list, you will either have to do it later, or you will just loose the accuracy of knowing which articles are really there and which aren't. This is the problem that INN 2.0 created and it means the newsreaders will show the user headers for articles that have been cancled. And then returns errors when the user tries to read them. A real step backwards in functionality. What you might want to do is hack in a change to GROUP that will limit the number of article names it will read from the directory to something like 1,000. When it hits the limit, it just gives up and returns the active file info for the GROUP command. But remember the fact that the article list isn't yet valid so you can go back and do it compleletly when (and if) it's needed. This gives you fast GROUP commands for clients that do a series of GROUP commands on start up, but retains the accuracy of the info GROUP returns for small groups. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Reality is a point of view
Date: Wed, 29 Jul 1998 00:00
Date: Wed, 29 Jul 1998 00:00
16 lines
1650 bytes
1650 bytes
+---- curt@kcwc.com wrote (29 Jul 1998 05:18:14 GMT): | What you might want to do is hack in a change to GROUP that will limit the | number of article names it will read from the directory to something like | 1,000. +---- I would rather have a new command that would give the newsgroup context of GROUP without the overhead of article counts. The LIST ACTIVE, XOVER, ARTICLE sequence is fine, except for the required GROUP (to give XOVER and ARTICLE their context). -- Gary Johnson gjohnson@season.com Privacy on the net is still illegal.
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Jeremy
Date: Fri, 31 Jul 1998 00:00
Date: Fri, 31 Jul 1998 00:00
35 lines
2308 bytes
2308 bytes
Reality is a point of view <gjohnson@dream.season.com> wrote: > Some of these quoted posts didn't show up on Supernews. The > numbers were off by at least an order of magnitude so I thought > I should provide a data point or two. > > 60,000 is a ridiculous number. Even 30,000. While running > tests I was seeing 10+ second waits for GROUP requests on > newsgroups with less than 10,000 articles. Granted, this was > during a 'problem period' at Supernews, so there may be other > factors involved. > > I just checked, the longest wait is currently about 5 seconds > for a newsgroups with 15,000 articles. Most newsgroups tested > are currently taking 2 seconds or less, cool! Yeah, but did you check the ones that really *do* have 60,000+ posts? :) (Hint: alt.binaries.sounds.mp3...) Besides, 2 seconds is still too long, when you're trying to build a list of 100+ groups. > So maybe a GROUP patch has been applied, or the other problems > were impacting the speed of GROUP at Supernews . . . Small improvement from having fixed the problems. The real fix is anything but "quick and dirty" and will be deployed "eventually"... -- Jeremy | jeremy@exit109.com Here's a nickel, kid. Go buy yourself a real computer.
Re: Getting slrn to use LIST ACTIVE instead of GROUP?
Author: Reality is a point of view
Date: Fri, 31 Jul 1998 00:00
Date: Fri, 31 Jul 1998 00:00
35 lines
2372 bytes
2372 bytes
+---- rra@stanford.edu wrote (28 Jul 1998 19:31:19 -0700): | Jeremy <jeremy@exit109.com> writes: | > Russ Allbery <rra@stanford.edu> wrote: | >> Jeremy <jeremy@exit109.com> writes: | | >>> In certain groups, GROUP commands take a while, becuase there might be | >>> 30000 or 60000 articles in the group, and yes, it's an INN-based | >>> system. Improving the response of GROUP commands is on the to-do | >>> list, but is not a simple patch-n-recompile thing. [...] | No wonder GROUP on large newsgroups is so slow. +---- Some of these quoted posts didn't show up on Supernews. The numbers were off by at least an order of magnitude so I thought I should provide a data point or two. 60,000 is a ridiculous number. Even 30,000. While running tests I was seeing 10+ second waits for GROUP requests on newsgroups with less than 10,000 articles. Granted, this was during a 'problem period' at Supernews, so there may be other factors involved. I just checked, the longest wait is currently about 5 seconds for a newsgroups with 15,000 articles. Most newsgroups tested are currently taking 2 seconds or less, cool! So maybe a GROUP patch has been applied, or the other problems were impacting the speed of GROUP at Supernews . . . -- Gary Johnson gjohnson@season.com Privacy on the net is still illegal.
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