Dave wrote:
> Policyd seems to be taking a huge chunk of memory - is there any way I can 
> control it?
> 
> Currently it runs in 34032 kB.  This wasn't a problem when I had a whole 
> server but I'm currently running on a memory-restricted VPS and I can't see 
> why it wants so much memory.  The server only recives c. 1200 emails a day, 
> 85% of which are local and accepted without Policyd and 10% are rejected on 
> Helo checks before Policyd even sees them.
> 
> Kill & restarting policyd still gives it 34MB.
> 
> I think uLimit applies to every program on the server so that wouldn't be any 
> good - is there another way to restrict policyd's memory usage?

Short answer: No. Policyd pre-allocates all required memory and it does 
not increase.
Long answer: Yes, you can modify the amount of policy threads that will
be accepted  by modifying policyd.h

....
/* Miscellaneous constants */
#define LISTENQ         1023    /* 2nd argument to listen() */
#define MAXLINE         1023    /* max text line length */
#define BUFFSIZE        8191    /* buffer size for reads and writes */
#define BUFSIZE         4095
#ifndef MAXFDS
   #define MAXFDS        1023    /* max file descriptors   */
#endif
....

Change at your own peril, if it breaks, you get to keep both pieces. ;)

Cami

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
policyd-users mailing list
policyd-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/policyd-users

Reply via email to