Hans Kristian Rosbach wrote:
Is memory usage on insertion a real problem or only a theoretical? If
message size is limited to 25 MB by the MTA and the MTA is only allowed
to deliver 25 messages at once maximum memory usage is 625 MB. But I
think it happens very rarely that 25 mails with the maximum message size
arrive at once and are inserted at once.
Well, it is a theoretical problem atleast.
We host something like 15.000 domains each with loads of mailaccounts.
We generally peak at 300 incoming mails per minute, not counting
spam-floods and viruses.
Do you have statistics about message size? Would be interesting to see
on a large system. I'd guess >95% are below 20kb.
We currently allow 50MB max mail size, but might want to increase that
at some point in the future. So I can see perfectly well that memory
usage can peak way above what we have of physical ram.
It depends. If your MTA has a fast outbound connection (155 MBit are to
slow I think) or a full queue after some dbmail/database failure there
could be a problem (depending on the number of delivery processes allowed).
It can lead to OOM conditions or even a total system crash. System
crashes make the alarm go off and wake me at night, leading to
a pissed off sysadmin.
That's a bad thing :) The sysadmin should use a MTA like Exim that
doesn't deliver more mails if p.e. the load goes above some threshold -
so the system stays stable and the admin can stay in bed.
I'd rather have the usage of tempfiles _IF_ the size of a mail goes
above a specified threshold. This should lead to a minimal performance
decrease if done right.
Harddisc IO is always slow and even worse is far from linear. Doubled
random IO leads to less than half performance (because of head
movements). That's why my alarm bells always ring when I hear tempfile.
But if the message size is configurable I can set the MTA to a limit of
x MB and dbmail to x+1 MB.
Thomas
--
http://www.tmueller.com for pgp key (95702B3B)