On 2009-05-21, Markus Hennecke <markus-henne...@markus-hennecke.de> wrote:
> Matthew Weigel schrieb:
>> On Thu, 21 May 2009 12:54:30 +0000 (UTC), Stuart Henderson
>> <s...@spacehopper.org> wrote:
>>> On 2009-05-21, Robson Caetano <inet1...@myself.com> wrote:
>>>> The problem is that changing the time of the hour or of the day you
>>>> fetch the blacklist will avoid concurrency but is not fault proof.
>>> It isn't fault proof, but you should do it anyway.
>> 
>> Just to be clear... when spamd-setup is run in /etc/rc, with the -D flag,
>> it doesn't actually stick around, right?  It just does its job in the
>> background so that grabbing updated black/whitelists can't hang the
>> machine.
>> 
>> And then the sample spamd-setup line in crontab runs it every hour, if
>> it's a good idea for everyone to change it wouldn't it be a good idea
>> to give an example that only runs e.g. once a day?
>
> The main problem is that too many spamd-setups are running at the same 
> time. So doing this only once a day would only shift the problem.
>
> My suggestion would be something like this patch to the default crontab 
> (this one is against 4.5-stable):
>
> Index: crontab
>===================================================================
> RCS file: /cvs/src/etc/crontab,v
> retrieving revision 1.15
> diff -r1.15 crontab
> 23c23
>< #0    *       *       *       *       /usr/libexec/spamd-setup
> ---
>> #0    *       *       *       *       sleep $((RANDOM % 120)); 
>> /usr/libexec/spamd-setup
>
> This should take the load from the server providing the blacklist.
>
> Kind regards,
>    Markus
>
>

As long as people pick their own value for the minutes column, there
will be some reasonable kind of spread. Are the majority of people not
doing this anyway? (actually, I guess probably not or this thread
wouldn't have come up..)

Got to be better than on the hour, give or take a few minutes for
out-of-whack clocks. I guess enough people run ntpd that there would
be some big spikes bang-on the hour, but probably also enough that
don't run it, so that 0-120 seconds is probably not a big enough
random delay to steer clear of them.

I think this would make a fairly decent cue and is simpler..:

-#0    *       *       *       *       /usr/libexec/spamd-setup
+#XX   *       *       *       *       /usr/libexec/spamd-setup

Reply via email to