[milters] Archive

Lists Index Date Thread Search

Article: 1706
From: Anthony Howe
Date: 2007-09-19 11:44:25 -0400
Subject: Re: Memory usage of milters

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support

Ben Spencer wrote:
> Maybe what I am seeing is normal and I happen to only be noticing such
> things now. It seems a little odd though:
> Host: Linux, RHEL4 w/ kernel 2.6.9-55.0.2.EL
> ps -auxww|more
> milter    2684  2.1  0.9 2753108 4896 ?      Ssl  03:43   4:35
> /opt/sbin/milter-spamc

VSZ is virtual size. RSS is resident. The resident size looks 
reasonable. The libmilter API uses pthreads. Each new thread, one per 
SMTP client, will by default assign 1MB of stack space. Overkill yes. 
There is no libmilter API function to change the default stack space 
used by pthreads. I've asked for this before from Claus of Sendmail.org, 
but tells me (paraphrased) "Its virtual memory, let the OS handle. If I 
want an API, write and submit a patch for libmilter."

I doubt there is any memory leak in the milters you referred to 
otherwise, people would have noticed much sooner I'm sure. Personally I 
would like to have smfi_setstacksize() API  and then I could set this to 
something reasonable like 64KB. BarricadeMX does this for all its 
threads and I think its a good practice to set it to something more 
reasonable. Alas I don't have this API yet.

Anthony C Howe          Skype: SirWumpus                    SnertSoft
+33 6 11 89 73 78         ICQ: 7116561      Sendmail Milter Solutions

Lists Index Date Thread Search