MailScanner is responsible for SWAP usage!
James Gray
james at grayonline.id.au
Mon May 22 05:44:17 IST 2006
On Mon, 22 May 2006 11:12, Michael S. wrote:
>And my second message that received flames was based on MS
> swapping on a box that handles little mail and has far more memory than
> most systems do and a query as to why its swapping. That's it!
Simple - because the RAM requirement exceeds the available RAM *OR* the
kernel is optimising for SPACE and swapping out rarely accessed libraries
and/or applications. This is basic system admin knowledge. Now sit down
and shut up - school is in.
The bigger questions are:
1. What is running on your system and how is it configured?
2. How is the kernel/memory optimisation configured?
Simply throwing the blame on MailScanner is like saying that because the
last thing you did to your house was paint it, it's the painter's fault
you've got termites! There could be underlying configurations/applications
that need further tweaking, and installing MailScanner simply pushed these
over some "high water" mark. Thus resulting in swap being used
(<sarcasm>PANIC! PANIC!</sarcasm>)
Depending on how your web server processes are set up, the mix of mail and
web server may not play nice together. MailScanner spawns a FIXED number
of children thus has a predictable memory footprint. Web servers OTOH
(especially Apache 1.3x) can spawn and kill off dozens, even hundreds, of
children commensurate with HTTP requests. Obviously the kernel will swap
out rarely (or less frequently) used processes and libraries to make space
for the webserver children. Once again, this is all basic system
administration stuff and has VERY little to do with MailScanner per se.
So far you haven't provided any information that would help any of us assist
you further. FWIW the 20MB per MailScanner process/child is merely a rough
guide; to quote the MAQ:
"A process usually uses between 20 and 60 MB of RAM."
On my systems, that is closer to 32Mb/child + 250kB Parent process (between
the pair there is about 140MB non-resident). Here's the raw "ps -auxmM -u
postfix" (with a few columns stripped) on my Mac OSX server (2GB RAM, one
MS child):
%MEM VSZ RSS STAT TIME COMMAND
1.5 99032 32172 S 0:08.50 MailScanner: waiting for messages
0.0 41188 248 S 0:00.03 MailScanner: starting child
^^^^^^^^^^^^
1024 byte blocks
If you are running any custom rule sets (Sare, Rules du jour, etc) these
will add significantly to the memory footprint. Tools like "ps", "top",
"atop", "vmstat" and their ilk will reveal volumes about what is going on.
Oh, and 1200 messages per day - I've got a Celeron 333MHz with 256MB RAM
handling about 3 times that mail volume with zero swap in use and about
1400 custom spamassassin rules (only a single MailScanner child)....of
course, I KNOW how to configure my systems correctly.
Here's some light reading seeing as you seem insistent on rejecting any
outside assistance (watch the wrap):
http://wiki.mailscanner.info/doku.php?id=maq:index#optimization_tips
http://wiki.mailscanner.info/doku.php?id=documentation:test_troubleshoot:performance&s=memory+footprint
YMMV (and obviously does).
James
--
There are few people more often in the wrong than those who cannot endure
to be thought so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20060522/019f4770/attachment.bin
More information about the MailScanner
mailing list