Thread View: news.software.nntp
5 messages
5 total messages
Started by Rahul Dhesi
Tue, 12 Aug 1997 00:00
crosspost.c quick performance hack (?)
Author: Rahul Dhesi
Date: Tue, 12 Aug 1997 00:00
Date: Tue, 12 Aug 1997 00:00
69 lines
2541 bytes
2541 bytes
An article cross-posted to many newsgroups causes many system calls: one
link or symlink for each newsgroup. Below is a quick mod to crosspost.c
from (inn 1.5.1 + patches) to add a -G flag to cause no more than the
specified number of links to be created for an article. Then the
article will appear to have expired in all other newsgroups. I don't
know yet just how much of a performance win this will be.
I guess you could run two instances of crosspost, thus:
crosspost!:*,!alt.sex*:Tc,Ap,WR:/somewhere/bin/crosspost -s
crosspost!:alt.sex*:Tc,Ap,WR:/somewhere/bin/crosspost -s -G 2
===================================================================
RCS file: RCS/crosspost.c,v
retrieving revision 1.1
diff -u -r1.1 crosspost.c
--- 1.1 1997/07/30 08:24:12
+++ crosspost.c 1997/08/12 11:33:25
@@ -31,6 +31,7 @@
STATIC int syncfiles = TRUE;
#define MAXXPOST 256
+STATIC int maxxpost;
/*
@@ -106,7 +107,7 @@
break;
}
- for (i = 0; *p && (i < MAXXPOST); i++) { /* parse input into array */
+ for (i = 0; *p && (i < maxxpost); i++) { /* parse input into array */
names[i] = p;
for ( ; *p; p++) {
if (*p == '.') *p++ = '/'; /* dot to slash translation */
@@ -232,10 +233,11 @@
/* Set defaults. */
Dir = _PATH_SPOOL;
+ maxxpost = -1;
(void)umask(NEWSUMASK);
/* Parse JCL. */
- while ((i = getopt(ac, av, "D:ds")) != EOF)
+ while ((i = getopt(ac, av, "D:dsG:")) != EOF)
switch (i) {
default:
Usage();
@@ -249,7 +251,13 @@
case 's':
syncfiles = FALSE; /* do not fsync articles */
break;
+ case 'G':
+ maxxpost = atoi(optarg);
+ break;
}
+ /* if -G value was 0 or less, default to max possible */
+ if (maxxpost <= 0)
+ maxxpost = MAXXPOST;
ac -= optind;
av += optind;
InSpoolDir = EQ(Dir, _PATH_SPOOL);
--
Rahul Dhesi <dhesi@spams.r.us.com>
Re: crosspost.c quick performance hack (?)
Author: Forrest J. Cavalier III
Date: Tue, 12 Aug 1997 00:00
Date: Tue, 12 Aug 1997 00:00
59 lines
2606 bytes
2606 bytes
In article <5spjtt$ggt$1@samba.rahul.net>, c.c.eiftj@65.usenet.us.com wrote... > >An article cross-posted to many newsgroups causes many system calls: one >link or symlink for each newsgroup. Below is a quick mod to crosspost.c >from (inn 1.5.1 + patches) to add a -G flag to cause no more than the >specified number of links to be created for an article. Then the >article will appear to have expired in all other newsgroups. I don't >know yet just how much of a performance win this will be. > >I guess you could run two instances of crosspost, thus: > > crosspost!:*,!alt.sex*:Tc,Ap,WR:/somewhere/bin/crosspost -s > crosspost!:alt.sex*:Tc,Ap,WR:/somewhere/bin/crosspost -s -G 2 > [snip of diff] 1. Not creating links is asking for trouble. If you are running overview, your users will complain a lot because they will see articles in the list, with recent dates which they can't get. I think you run a risk of confusing expire. If you ever have to run makehistory, then you aren't going to get a valid high article number. (But if you ever have to run makehistory, that will be a pretty minor problem....) 2. Running two instances of crosspost this way is not a good idea unless you want lots of reported errors. The problem occurs because there will be articles in BOTH the cross-post feeds you show. Consider an article cross-posted to alt.binaries.pictures.erotica and alt.sex. It will be in both feeds. Both crossposts will try to create the article, and one of them will get an error. In general, any '!' newsgroup exclusions on feed do not ensure the article is not transfered: crossposts will get it through. '@' newsgroup exclusions are a different story. See newsfeeds.5. (Available at: http://www.mibsoftware.com/userkt/inn/doc/newsfeeds.5.htm ) But stepping back from the problem, why do you want to prevent crossposts this way? If you think the article has too many crossposts, then drop it. Forrest Cavalier, Mib Software, INN customization and consulting
Re: crosspost.c quick performance hack (?)
Author: Alexis Rosen
Date: Tue, 19 Aug 1997 00:00
Date: Tue, 19 Aug 1997 00:00
36 lines
1988 bytes
1988 bytes
mibsoft@epix.net (Forrest J. Cavalier III) writes: >In article <5spjtt$ggt$1@samba.rahul.net>, c.c.eiftj@65.usenet.us.com wrote... >>An article cross-posted to many newsgroups causes many system calls: one >>link or symlink for each newsgroup. Below is a quick mod to crosspost.c >>from (inn 1.5.1 + patches) to add a -G flag to cause no more than the >>specified number of links to be created for an article. Then the >>article will appear to have expired in all other newsgroups. I don't >>know yet just how much of a performance win this will be. >> >>I guess you could run two instances of crosspost, thus: >> >> crosspost!:*,!alt.sex*:Tc,Ap,WR:/somewhere/bin/crosspost -s >> crosspost!:alt.sex*:Tc,Ap,WR:/somewhere/bin/crosspost -s -G 2 >> >[snip of diff] >1. Not creating links is asking for trouble. If you are running >overview, your users will complain a lot because they will see >articles in the list, with recent dates which they can't get. >I think you run a risk of confusing expire. No, it's perfectly happy to ignore missing articles. (At least, fastrm is. I can't imagine anyone running without fastrm these days.) >But stepping back from the problem, why do you want to prevent >crossposts this way? If you think the article has too many >crossposts, then drop it. Heh. I have to agree with this... /a
Re: crosspost.c quick performance hack (?)
Author: Rahul Dhesi
Date: Tue, 19 Aug 1997 00:00
Date: Tue, 19 Aug 1997 00:00
27 lines
1808 bytes
1808 bytes
In <5tbqrm$d5c@panix4.panix.com> alexis@panix.com (Alexis Rosen) writes: >mibsoft@epix.net (Forrest J. Cavalier III) writes: >>But stepping back from the problem, why do you want to prevent >>crossposts this way? If you think the article has too many >>crossposts, then drop it. >Heh. I have to agree with this... I see almost no spam on Usenet these days. I think it's partly because I discard all postings passing through UUNET, and partly because the spam cancellers are doing a terrific job. So, the degree of cross-posting of an article that gets through is no longer an indicator of whether or not it's spam. A priori, the contents of an article do not become worthless just because it's cross-posted in too many places. But it's a safe bet that that it's most relevant in the first two or three newsgroups into which it is cross-posted. So, by linking it in only a few places, we can still benefit from the article in the newsgroups into which it most belongs, while still substantially decreasing processing effort. -- Rahul Dhesi <dhesi@spams.r.us.com>
Re: crosspost.c quick performance hack (?)
Author: Forrest J. Cavalier III
Date: Fri, 29 Aug 1997 00:00
Date: Fri, 29 Aug 1997 00:00
32 lines
1761 bytes
1761 bytes
In article <vow203fmzne.fsf@panix2.panix.com>, ulmo@panix2.panix.com wrote... [snip] >Besides the obvious First Amendment implications of censoring >crossposted articles or any other (overly) arbitrary methods, >the continued success of USENET will definately be at stake if >methods such as these are used. A troll. The First Ammendment guarantees a free press. It does not guarantee every odd-ball, loser, or spammer the right to use somebody else's press for their spew or advertising. >The beauty of the First Amendment is that it puts the job of >censoring in the hands of the people and the people whose services >they purchase. However, that job needs to be taken very, very >seriously; just doing it whimsicly simply will not do. Of course. But consider that the american court system gets bogged down trying to protect the innocent. Usenet admins take a different route. Fair? Not! But Usenet admins can't raise taxes to pay for more courts. Automatic spam cancelling is the only practical solution. Forrest
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