Article View: news.software.nntp
Article #81952Keeping the history file "small" vs. expire/expireover programs.
From: D. Stussy
Date: Sun, 04 Oct 2009 21:33
Date: Sun, 04 Oct 2009 21:33
71 lines
5144 bytes
5144 bytes
As noted in a thread earlier this year, I had a problem where the history index file grew to a size where the system could not regularly run expire. I think I have figured out a way to have the history file expired while retaining articles for overview purposes until they naturally expire out of the spool due to use of a self-expiring storage method. Given: - INN version 2.5.0 - Storage method CNFS (or any "inexpensive," self-expiring method). - Overview method TradIndexed (I haven't looked at the other) - Class based expiry (not group based). Expireover: Expireover won't need anything special. As long as the storage method is not expensive (or "-s" were specified), storage/tradindexed/tdx-data.c, lines 869-877 imply that messages will be tested against retrieval via the storage manager but their presence in the history file will NOT be tested. Only "expensive" articles when "-s" is not specified are required to be in the history file in order to be retained in the overview. This means that I should be able to remove articles' history file entries and still have them remain accessible to readers via the overview files, correct? I have not investigated whether the storage manager requires that a history file entry be present for retrieval of an article by SM token, but I don't believe that it does. Expire: The goal appears to be to have the articles expired out of the history file but not out of the spool. There may be two ways to perform this: 1) Trick the expire program: By specifying 'news.daily flags="-N -z /dev/null"', it appears that the expire program will NOT copy expiring articles into the new history file and will SKIP the removal of the article from the spool at storage/expire.c, line 538 by by instead writing the list of articles to expire to the "-z" parameter file. Since we're not going to actually remove these articles, routing the output to the "infinite sink pseudofile" is acceptable. This method will use the "expire.ctl" file to limit the number of entries retained in the history file by duration. 2) Use a front-end program run before expire to limit its size by number of entries. In this version, specifying 'news.daily "/usr/bin/tail -n$X >$TMPHIS" flags="-h $TMPHIS"', where X is the maximum number of entries to retain from day to day and TMPHIS is some temporary file to hold the result. This method will approximately fix the size of the history index file so it won't grow too big. With a correct choice of X, considering the average number of articles arriving daily, the out-of-memory problem should be avoidable except in extreme cases of rapid article flooding. This method won't remove articles from the spool with an appropriate choice in "expire.ctl" of "never" entries, but the oldest will certainly disappear from the history file. Entries removed by the "tail" program will be retained in the spool Therefore, am I correct that the above settings will cause the expiration of articles out of the history file but NOT impact their ability to be fetched by readers via the overview files until such time that the self-expiring storage naturally removes them by overwriting? ---------- Also noted: While investigating this, I noted something unusual with the "news.daily" script. Is there unnecessary repeated code present? Pertaining to running expireover after expire: Lines 467-484 and lines 487-504 seem to be unnecessary. Can't they all be removed and simply flow through to their duplicates at lines 507-523? The only line not duplicated in the last block is the "DOEXPIREOVER=false" line which causes the future instances to be skipped (as there are no future instances for the last block). ...Or did I miss something?
Technical Details
Message-ID:
<hab4b5$4pu$1@snarked.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newsfeed2.telusplanet.net!newsfeed.telus.net!news-in-02.newsfeed.easynews.com!easynews.com!easynews!news.he.net!news.snarked.org!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <hab4b5$4pu$1@snarked.org> Subject: Keeping the history file "small" vs. expire/expireover programs. Date: Sun, 4 Oct 2009 14:33:20 -0700 From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newsfeed2.telusplanet.net!newsfeed.telus.net!news-in-02.newsfeed.easynews.com!easynews.com!easynews!news.he.net!news.snarked.org!not-for-mail Newsgroups: news.software.nntp Lines: 71 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> NNTP-Posting-Host: pool-71-160-18-32.lsanca.dsl-w.verizon.net X-Trace: snarked.org 1254692005 4926 71.160.18.32 (4 Oct 2009 21:33:25 GMT) X-Complaints-To: newsmaster@snarked.org NNTP-Posting-Date: Sun, 4 Oct 2009 21:33:25 +0000 (UTC) X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478