Thread View: news.software.nntp
3 messages
3 total messages
Started by James Youngman
Mon, 25 Mar 1996 00:00
Infelicity of "sort -o" in news.daily
Author: James Youngman
Date: Mon, 25 Mar 1996 00:00
Date: Mon, 25 Mar 1996 00:00
17 lines
1158 bytes
1158 bytes
I recently discovered that if the expire.rm file created by
expire is bigger than /tmp, "sort -o" leaves it unsorted and so "fastrm" is
passed an unsirted list of files to delete and therefore takes far, far longer
to run than it normally does.
If the exit code of the sort command denotes failure, perhaps
the $RMFILE should be beleted so that "fastrm -e" can signal an error, rather
than just silently giving apalling performance.
Alternatively, we could use sort ${RMFILE} | fastrm .... to avoid
the problem altogether.
James Youngman
VG Gas Analysis Systems
Re: Infelicity of "sort -o" in news.daily
Author: Per Hedeland
Date: Wed, 27 Mar 1996 00:00
Date: Wed, 27 Mar 1996 00:00
15 lines
1228 bytes
1228 bytes
In article <4j6s4u$iae@halon.vggas.com> JYoungman@vggas.com (James Youngman) writes:
> Alternatively, we could use sort ${RMFILE} | fastrm .... to avoid
>the problem altogether.
Sorry, won't help - even though it is used as a filter, it doesn't walk
like one.:-) Sort by definition has to read the entire input file before
it can output anything, thus it will use the same amount of temp files
in the above case as with the default 'sort -o ${RMFILE} ${RMFILE}' (and
using the same file for input and output like this doesn't require any
extra effort from sort, for the same reason).
--Per Hedeland
per@erix.ericsson.se
Re: Infelicity of "sort -o" in news.daily
Author: Jerry Aguirre
Date: Sat, 30 Mar 1996 00:00
Date: Sat, 30 Mar 1996 00:00
33 lines
2044 bytes
2044 bytes
In article <4jc4vt$kls@euas20.eua.ericsson.se> per@erix.ericsson.se (Per Hedeland) writes:
>In article <4j6s4u$iae@halon.vggas.com> JYoungman@vggas.com (James Youngman) writes:
>> Alternatively, we could use sort ${RMFILE} | fastrm .... to avoid
>>the problem altogether.
>
>Sorry, won't help - even though it is used as a filter, it doesn't walk
>like one.:-) Sort by definition has to read the entire input file before
But news.daily could do something like:
sort -u -o ${RMFILE} ${RMFILE} && ln ${RMFILE} ${XOFILE}
And then later use a test of the existance of ${XOFILE} (expire.xo)
to decide whether to run expireover -z or expireover -s.
If the sort fails and there is no space then there is not much you can
do about fastrm. It is going to be slower but you still need to get
rid of the files.
But running expireover -z on an unsorted list is a real killer. It
is much more efficient at that point to run expireover -s. Yes it
scans the spool but at least it updates each .overview file only
once istead of thousands of times.
I don't even run expireover from news.daily any more. Instead I run
a separate post news.daily script that runs it. It does a "sort -c"
of the expire.list file and then runs expireover -z or expireover -s
based on the result.
By moving expireover out of news.daily I allow it to finish its work
more quickly and minimize the time innwatch is locked out.
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