Optimization for Reducing Deferred Queue Scans

From: Jon Forrest (no email)
Date: Wed Dec 01 2004 - 00:35:20 EST


I have a working Postfix installation that I have
to admit was done mostly by somebody who works for
me, so now I'm reading the O'Reilly Postfix book
to understand what's going on.

When reading about the queue_run_delay parameter
I had a thought. Even though the default value,
1000 seconds, seems reasonable, there might
still be cases when the deferred queue is scanned
when there's nothing in it that's ready for
attempted delivery. It's easy to imagine how
this could happen.

Instead of blindly scanning the deferred queue
every queue_run_delay seconds, why not use the
smallest timestamp value of any message in the
deferred queue as the time to do the next scan?
This way you'd know that there is at least
one message that's ready for a delivery attempt.
There would never be any needless scans.

This is so obvious that I'm worried that I'm
so new that I'm missing something. Maybe this
isn't a big deal since the default value for
maximal_backoff_time is 4 times the default
value for queue_run_delay. If I'm understanding
things correctly, there could be at most 3 needless
scans. (I'm not sure I understand how entries
in the dead host list expire and that could also
effect things).

Cordially,
Jon Forrest
Computer Resources Manager
Civil and Environmental Engineering Dept.
205 Davis Hall
Univ. of Calif., Berkeley
Berkeley, CA 94720-1710
510-642-0904








Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD