Stefan F?rster:
> * Ralf Hildebrandt <ralf.hildebra...@charite.de>:
> > * Wietse Venema <wie...@porcupine.org>:
> > > Dec 29 04:20:17 spike postfix/postscreen[44900]: cache 
> > > /var/lib/postfix/ps_cache.db full cleanup: retained=134 dropped=19 entries
> > > Dec 29 06:19:33 spike postfix/verify[46072]: cache 
> > > /var/lib/postfix/verify.db full cleanup: retained=1726 dropped=28 entries
> > 
> > The initial cleanup:
> > Dec 29 10:16:35 mail postfix/postscreen[12078]: cache 
> > /var/lib/postfix/ps_cache.db full cleanup: retained=8460 dropped=274056 
> > entries
> > Dec 29 10:17:13 mail postfix/verify[12105]: cache 
> > /var/lib/postfix/verify.db full cleanup: retained=109892 dropped=648105 
> > entries
> 
> Not using verify here, for postscreen, the number of entries retained
> settled itself between 2500 and 2900, the number of dropped entries
> varies around 300 and 500.
> 
> I've noticed a vast deterioration of the databases's performance,
> though. 20091209 only emitted some timing warnings for updates from
> time to time (database rotated every Saturday as per your
> recommendation). With the new code, lookup timing warnings are emitted
> frequently for approximately 30 minutes after every cache cleanup.
> Guess I need a better database library.

As is to be expected, cache cleanup increases disk activity and
reduces the time that postscreen has available for SMTP client
requests.  My theory is that postscreen falls behind, and that it
catches up after the cache cleanup completes.  As postscreen catches
up, the mail system load slowly returns to normal and the update
warnings slowly go away. Why does this take 30 minutes? Perhaps
most SMTP clients have < 30min retry timers.

To reduce the performance impact from cache cleanup I could implement
a lower-priority scheduling mechanism in the Postfix event manager.
However, if cache cleanup takes too long then the database will
keep growing forever.

Systems that run close to the capacity limit probably should not
expire caches but simply rotate them.  I already have a version of
Postfix that allows you to turn off cache cleanup.

        Wietse

Reply via email to