Alexander 'Leo' Bergolth:
> > Even then, a 1000 recipient list should be spread across two local(8)
> > processes, each delivering transactions of 50 recipients side by side.
> > I don't see that happen, so I suspect the measurement is inconclusive.
> 
> Unfortunately it doesn't. :-(

Actually, multiple local(8) processes are used only when delivery
is slow enough. 

When I send list mail to addresses that deliver to mailbox, I see
one local process(8) delivering each recipient like you do, with
10ms delay from queue file creation to mailbox update like you do:

Sep 24 10:20:17 hostname postfix/local[2732]: CE6E4924782: 
to=<al...@example.com>, orig_to=<alias>, relay=local, delay=0.02, 
delays=0.01/0/0/0, dsn=2.0.0, status=sent (forwarded as D14D4924781)
Sep 24 10:20:17 hostname postfix/qmgr[2721]: D14D4924781: 
from=<owner-al...@example.com>, size=473, nrcpt=10 (queue active)
Sep 24 10:20:17 hostname postfix/qmgr[2721]: CE6E4924782: removed
Sep 24 10:20:17 hostname postfix/local[2732]: D14D4924781: 
to=<dummy...@example.com>, relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, 
status=sent (delivered to mailbox)
Sep 24 10:20:17 hostname postfix/local[2732]: D14D4924781: 
to=<dummy...@example.com>, relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, 
status=sent (delivered to mailbox)
... and so on ...

When I send list mail to addresses that are slow (the .forward file
has a command "|sleep 1") then there are two local(8) processes:

Sep 24 10:21:58 hostname postfix/local[2753]: 9C9F5924782: 
to=<al...@example.com>, orig_to=<alias>, relay=local, delay=0.02, 
delays=0.01/0/0/0, dsn=2.0.0, status=sent (forwarded as 9E904924781)
Sep 24 10:21:58 hostname postfix/qmgr[2721]: 9E904924781: 
from=<owner-al...@example.com>, size=473, nrcpt=10 (queue active)
Sep 24 10:21:58 hostname postfix/qmgr[2721]: 9C9F5924782: removed
Sep 24 10:21:59 hostname postfix/local[2753]: 9E904924781: 
to=<dummy...@example.com>, relay=local, delay=1, delays=0/0/0/1, dsn=2.0.0, 
status=sent (delivered to command: sleep 1)
Sep 24 10:21:59 hostname postfix/local[2754]: 9E904924781: 
to=<dummy...@example.com>, relay=local, delay=1, delays=0/0/0/1, dsn=2.0.0, 
status=sent (delivered to command: sleep 1)
... and so on ...

Now this 10ms delay in my first example (and your example) is
suspicious. I strongly suspect that my laptop disk drive has write
caching enabled.  It is physically not possible to create a queue
file, fsync it, and then update a bunch of mailboxes and fsync them
when disk heads need to move.

With this caching going on, my laptop delivers mail (and syslogs
to the same disk) as fast as memory can be written, so there is no
room left to run multiple processes delivering mail.

On the other hand with my artificial 1000ms delays, there is plenty
of time for concurrency to pick up the slack. And that is what you
see happening in my second example.

Does your mail server disk have write caching enabled, and is the
cache persistent when power fails? I suppose it does not fail that
often where you live, compared to this third-world infrastructure
in the USA that I live on.

        Wietse

Reply via email to