On Wed, 7 Feb 2001, Jeffrey Goldberg wrote:
> On Wed, 7 Feb 2001, Alain Williams wrote:
>
> > Is there any way to control the load that exim puts on the network trying to
> > deliver messages based on the time of day. So that night time use could be
> > higher than we might want during the day.
> >
> > I would like to do something like:
> > queue_run_max = 50 at night
> > queue_run_max = 50 during the day
>
> I assume you wanted a lower number during the day, say 20.
>
> Anyway, queue_run_max takes an integer, not an expansion string. (If it
> did you could play with conditions on substr_-8_2{$tod_log} to get the
> hour.)
>
> So the only thing I can imagine would be to have a script out of cron
> which changed your config at appropriate times.
And restarted the daemon whenever it made this change. Actually, you
wouldn't need to change the config if you use a script that runs as
root. You can use a -D option to change a macro definition when
restarting the daemon.
> Is there a reason why all things that take integers can't be expansion
> strings expected to resolve as an integer?
(a) History.
(b) Performance in some cases.
(c) In the case of queue_run_max there are two more reasons:
(i) When the daemon starts up, it gets a vector of size
queue_run_max in which to store the pids of the simultaneously
running queue runners. OK, it could get an arbitrary size, but I'm
wary of "this is *sure* to be big enough for everybody" things.
(ii) If it had to expand the string every time, it would need to use
a bit of memory; I would have to be careful to avoid a memory leak.
I try to keep the daemon's "infinite" loop as simple as I can.
Getting back to the original question: you must have a strange
configuration and message traffic pattern if you need as many as 50
simultaneous queue runners. How often do you start them? If it is at n
minute intervals, do you often find that the first one takes 50*n
minutes to complete?
OR: Are you misunderstanding what queue_run_max actually does? It does
not cause Exim to start up that many queue runners at once.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.