Amavisd, clamd memory limit

General support questions
Post Reply
makgab
Posts: 21
Joined: 2014/03/03 15:08:37

Amavisd, clamd memory limit

Post by makgab » 2014/03/20 08:41:04

Hi!

I configured a VPS: http://www.campworld.net/thewiki/pmwiki ... MailServer
The vps has mysql,apache,ssh services.
The 2GB RAM is sometimes run out: "out of memory", "cannot allocation memory"...
Default the amavis and clamd use large size of memory (after start like this):

Code: Select all

# top|grep ...
883 amavis 20 0 353m 247m 1208 S 0.0 12.1 0:05.83 clamd
8966 clam 20 0 353m 246m 592 S 0.0 12.1 0:00.00 clamd
9048 amavis 20 0 327m 91m 3076 S 0.0 4.5 0:01.51 amavisd
9051 amavis 20 0 328m 90m 1812 S 0.0 4.4 0:00.00 amavisd
9052 amavis 20 0 328m 90m 1808 S 0.0 4.4 0:00.00 amavisd
Which parameters can I reduce this memory usage with?

I reduce the "max_server" in the amavisd.conf?

Code: Select all

$max_server = 2;
Or for example, I reduce MaxThreads (and increase the MaxConnectionQueueLength?) in clamd.conf:

Code: Select all

MaxConnectionQueueLength 50
MaxThreads 50
Can anybody give me any idea?


--
G.
--
G.

makgab
Posts: 21
Joined: 2014/03/03 15:08:37

Re: Amavisd, clamd memory limit

Post by makgab » 2014/03/20 09:48:35

I try it (it seems to working):

Code: Select all

# clamd.conf
...
#MaxConnectionQueueLength 50
MaxConnectionQueueLength 150
#MaxThreads 50
MaxThreads 5
...
The memory usage is better (1644M free):

Code: Select all

#free -m
...
-/+ buffers/cache: 403 1644
Some additional settings:

Code: Select all

# amavisd.conf
#$max_server = 2;
$max_server = 1;

# /etc/postfix/master.cf
#smtp-amavis unix - - y - 2 smtp
smtp-amavis unix - - y - 1 smtp
--
G.

Post Reply

Return to “CentOS 6 - General Support”