Virtualmin Pro Memory Requirements

I have a brand new centos5 box running virtualmin pro with 1 gb of ram. Only a few sites so far (5) with very little http traffic. One of the sites though, has around 65 pretty active email accounts, sending and receiving a good amount of email and attached docs.

At peak times, I notice the server load getting in the 3-4 range, and a few times, for short time periods up to 80-85, which brings the server down to a slow crawl. This has only happened twice so far, in about 10 days.

My first guess is that I need more memory, because I see spammassassin and clamav using lots of memory, and the server using lots of swap memory too.

My question is? what is a good formula to come up with server memory requirements based on expected number of sites/email accounts hosted?

And also, what can be done to optimize email performance without sacrificing spam and virus filtering?

I would like to be able to host at least 40 sites on this server, with maybe around 500 active email accounts total.

I’ve already ordered an upgrade to 2gb Ram. This is an Intel Xeon 3060-Dual Core [2.4GHz]

Thanks for your comments

juarezon wrote:

And also, what can be done to optimize email performance without sacrificing spam and virus filtering?

Are you running clamscan or clamdscan for AV?
I’ve had the same problems you’re having because clamscan is such a memory and CPU hog. The difficult in changing depends on the platform you’re on. I believe Joe is supposed to put an update out that’ll make it easy to change on RH based systems.
Check this link out…
http://www.virtualmin.com/forums/blue-skies/easy-way-to-change-virus-scan-to-clamav.html

Howdy juarezon,

The default spam/AV filtering configuration is a bit heavy for a large number of email accounts, particularly clamav. It used to be easy to switch to using clamdscan on CentOS, but ClamAV has gotten a bit hostile of late, so I’m in the midst of building new packages to make it easy again.

I’ll try to wrap those up tonight. Running clamdscan instead of clamscan makes a pretty big difference in memory and CPU usage on a heavily loaded system. And, it doesn’t take away any flexibility (there’s nothing to configure in Clam–it’s either a virus or it isn’t–so no functionality is lost when you make it a system-wide daemon).

1GB is probably sufficient for the number of sites you expect, but the email processing will probably kill you. :wink:

SpamAssassin can also be switched to a daemonized mode, but you lose most of the meaningful per-domain and per-user configuration. Some folks don’t care about that, and it’s also pretty easy to switch to spamc instead of spamassassin for testing spamminess.

Anyway, I’m gonna run poke at the clam packages some more to see if I can give you a nice solution for at least that portion of the problem tonight. Conrad has been after me for it as well (I’m sure he’s not the only one who wants it, either).

Joe, ConRadical,

Thanks for your responses. I will wait for your clamav daemon solution. As my centos 5 install only has the clamav-wrapper option.

Thanks for your quick response, I’ll check back soon to look for the update.


Alonso (juarezon)

>>>>>>>>>
SpamAssassin can also be switched to a daemonized mode, but you lose most of the meaningful per-domain and per-user configuration. Some folks don’t care about that, and it’s also pretty easy to switch to spamc instead of spamassassin for testing spamminess.
>>>>>>>>>

I thought I had a spam configuration issue last night (I hadn’t it was “just” a full /tmp file :frowning: ! ) so, being the Dillon that I can be at times (all the time, according to my wife…) I uninstalled spamassassin and reinstalled it thinking it might help as I thought the program may be corrupted. (Maybe I will go with the wife’s view after all…)

Anyway the net result is the install worked and emails started coming in again after the /tmp was cleared. However, there seems to be no prefixing with [SPAM] to the subject line anymore which I think maybe due to Spamassassin being in daemonized mode?

I thought I would post the question here albeit slight unrelated as an answer about how to get back from or into daemonized mode may well be useful :slight_smile:

If I am barking up the wrong tree on how to get my [SPAM] back please let me know and I can always start a new thread on that elsewhere.

However, there seems to be no prefixing with [SPAM] to the subject line anymore which I think maybe due to Spamassassin being in daemonized mode?

I thought I would post the question here albeit slight unrelated as an answer about how to get back from or into daemonized mode may well be useful :slight_smile:

Whether you’re daemonized or not won’t matter. That’s a configuration detail (and usually set at the system-wide level, anyway, though in the per-user/per-domain mode it’s possible to change it with finer detail).

The first step to troubleshooting is to see if the messages are being tagged with the X-Spam-* headers. Check a few messages in the source for those headers.

If they don’t exist, then we’ll know we need to figure out why Procmail isn’t sending your mail through SpamAssassin (whether it’s spamc or spamassassin).

My stuff is not getting tagged – I get no spam filtering. Lucky me I have bogofilter and sylpheed locally – I don’t see any spam but it’s all getting through and downloaded.

>>>>>
If they don’t exist, then we’ll know we need to figure out why Procmail isn’t sending your mail through SpamAssassin (whether it’s spamc or spamassassin).
>>>>>

No the headers don’t exist. The biggest clue possibly though was my uninstallation/reinstallation of Spamassassin as that presumably disabled the “link” somehow?

I have tried disabling and re-enabling the settings in virtualmin server features on the per domain basis to no avail. Another thing I noticed is that if spamassassin and AV are enabled in that section no spam at all appears to get downloaded from the domain.

I will take a look at the procmail settings to see if I can see anything obvious but further thoughts still appreciated.

Drop off the two lines at the end:

:0
DEFAULT

Those mean that it always delivers regardless of other earlier decisions.

Still no joy on that one.

I deleted the procmail config lines but still no filtering.

When I enable the per domain Anti Spam and AV I then I don’t get any spam at all so it must be trapping it or deleting or something? When I switch it off spam starts coming in again. That applies to all virtual servers/domains.

I was wondering if the order rules are applied in procmail might be affecting it too - not entirely sure what they relate to but was wondering if default needs to take a higher priority or something?

Set variable LOGFILE to /var/log/procmail.log
Set variable TRAP to /etc/webmin/virtual-server/procmail-logger.pl
Set variable VIRTUALMIN Always execute action
Execute conditional block Exit status of command /usr/bin/test "$VIRTUALMIN" != ""

Set variable ORGMAIL to $HOME/Maildir/
Set variable DEFAULT to $HOME/Maildir/
Set variable DROPPRIVS to yes

Yeah, order could very well matter here. I’m kind of an amateur on Procmail, myself. :wink:

Hi Joe, any news on the clamdscan package?

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
:0

  • ?/usr/bin/test "$VIRTUALMIN" != ""
    {
    INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
    }
    ORGMAIL=$HOME/Maildir/
    DEFAULT=$HOME/Maildir/
    DROPPRIVS=yes
    :0
    $DEFAULT

procmail configuration if that helps at all?

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
:0

  • ?/usr/bin/test "$VIRTUALMIN" != ""
    {
    INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
    }
    ORGMAIL=$HOME/Maildir/
    DEFAULT=$HOME/Maildir/
    DROPPRIVS=yes
    :0
    $DEFAULT

procmail configuration if that helps at all?