Doubts about PF, what are the pros/cons about other MTAs?

Julian Field MailScanner at ecs.soton.ac.uk
Sun Jul 1 13:17:44 IST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Mikael Syska wrote:
> Glenn Steen wrote:
>> On 01/07/07, Mikael Syska <mikael at syska.dk> wrote:
>>> Hey,
>>>
>>> Julian Field wrote:
>>> > -----BEGIN PGP SIGNED MESSAGE-----
>>> > Hash: SHA1
>>> >
>>> >
>>> >
>>> > Mikael Syska wrote:
>>> >
>>> >> [snip]
>>> >> I think I'm convinced now ... I'm going to use postfix, since no 
>>> real
>>> >> arguments againts it have been made.
>>> >>
>>> >> Thanks for the time guys.
>>> >>
>>> > I'm going to release a new stable version tomorrow which includes the
>>> > recent Postfix bugfix to do with its milter support.
>>> > If you can't wait till tomorrow, then it's already on the website,
>>> > you'll just have to guess the URL for 4.61.7-1 :-)
>>> >
>>> I can wait ... I wont begin on the server until tuesday ... So no
>>> problems there.
>>>
>>> Can't wait to get my hands dirty converting the old amavisd-new setup
>>> ... some other dude had setup it up, and its a real pain to figure 
>>> out ...
>>>
>>> Btw, read on a page on the internet where a person said that MS did not
>>> use the resources very good cause its spawning a new process for every
>>> mail and afterwards closing it. amavisd-new also did that in the start
>>> but changed over to daemon style ... so its not spawning a new proces
>>> every time ...
>>> Is there something about this, or did the guy just not like MS ?
>>> and if there are something about it ... will MS be changed to spawn
>>> daemons ?
>>> what are the pros/cons agints it ?
>>>
>> Don't belieeve everything said on the net....:)
>> MS runs a master and several worker children, which all (incidentally)
>> work in a daemon-like fashion, and these children will take turns
>> popping messages from the queue ... They will take as many messages as
>> necessary to form a batch (1 -> ...many messages) and work on these in
>> a "group" way... So no "single process for every message" there:-).
>> The worker children might in turn spawn children to run specific
>> functions, like AV etc, but they will still work on the whole batch as
>> such.
> So whenever MS checks the mailqueue it takes all the mails in the 
> queue, and runs a batch agains them ? and then again in x seconds with 
> a new batch, taking mail that havent been handled?
It only waits at all if there were no messages available. So any mail in 
the queue is processed immediately. But otherwise you've just about got 
it, yes.

On a busy system, it will just go round without waiting at all as there 
will (pretty much) always be mail in the queue. And there are multiple 
processes doing the same thing. They are started with a delay between 
each one in the hope that there will always be 1 process very close to 
checking for new messages, despite what the others are doing. The net 
result is that the processes are always at different stages of handling 
a batch, so that all the resources available are being used all the 
time. Some bits are very processor-intensive, some network-intensive and 
some memory-intensive. Everything gets used all the time as different 
processes are at different stages of processing each batch.

This can result in high "load average" figures on a busy server, and 
this is perfectly normal and to be expected. A high "load average" 
doesn't mean it's being over-worked. Load averages of 10 to 15 are just 
fine. If you don't agree with that statement, read up on what the load 
average figure actually means, it's not just CPU.

>
>> Very efficient, very slick.
> If the above is right, this seems like its using the resources better 
> than amavisd-new maybe, but theese days Ram and harddrives are very 
> cheap, so if it just runs fast, i'm happy.
I would recommend normally 1GB ram per CPU.
>> Of course, as with most things in MS, you can configure the amount of
>> workers to prespawn, as well as most any aspect of the process...
>> You'll see, once you start using it;)
> Think this cleared any doubts i had.
Good.
>>
>> What motive the person stating the "one process/mail" thing has, I
>> surely can't speculate about... But it isn't correct. That much is for
>> certain.
> Can't say, lost the url... but if one process can handle multiple 
> mails in the same run, it sounds great.
The idea of the batches is that there is a certain cost overhead in 
handling each batch, regardless of the number of messages in the batch. 
Starting up the virus scanner is a very good example, as it takes time 
to load the signatures, which makes scanning 2 files take only slightly 
longer than scanning 1 file. The net result is that MailScanner's 
efficiency _improves_ as the load increases, as that makes the batches 
bigger.

Jules

- -- 
Julian Field MEng CITP
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
For all your IT requirements visit www.transtec.co.uk


-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.6.2 (Build 2014)
Charset: ISO-8859-1

wj8DBQFGh5tvEfZZRxQVtlQRAj8+AJ9jR1t4Dub/RpDEUdk09JNYTqBDLgCgztiT
AYm/7h9oD/lbiGYCObgQl4M=
=kCJU
-----END PGP SIGNATURE-----

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk



More information about the MailScanner mailing list