On Sat, Jul 10, 2021 at 07:34:15AM -0700, Greg Sims wrote:

> I am tuning the performance of our mail server.    We collect
> information in our logs every 10 seconds including qshape, iostat,
> free and mpstat.  It seems that the maxproc parameter in master.cf is
> important for us as we can see the size of the queues decrease as we
> increase maxproc -- as expected.

Running "qshape" every 10s does seem rather excessive.  Two employers
and over a decade ago I had a "qshaped" that kept state between scans
avoiding rereading the same queue file twice, and would generate a
nalert if some age bucket exceeded a threshold occupancy.  I never
released "qshaped" to the world at large.

If you are running "qshape" to measure queue size, use "qshape -s" to
count senders, so that messages with many recipients don't distort the
numbers.

My take is that what matters is latency and so long as most messages
leave the queue quickly the queue size is not a problem.

I don't typically raise max_proc across board, but rather only raise the
process limits for smtpd(8) and perhaps smtp(8) (given sufficient
network capacity).  Delivery via local(8) and pipe(8) tends to be
CPU-intensive, and I don't want high process counts there.

> We are currently running with qshape showing 1,000 emails in the
> incoming/active queue maximum -- all less than 5 minutes.

That state of affairs Sounds fine.  Rather than monitoring queue size,
it may be better to monitor smoothed running averages of the "b", "c"
and "d", times in:

    delays=a/b/c/d

-- 
    Viktor.

Reply via email to