Re: [policyd-users] Memory hog?
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 BUFFSIZE8191/* buffer size for reads and writes */ #define BUFSIZE 4095 #ifndef MAXFDS #define MAXFDS1023/* 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
Re: [policyd-users] Memory hog?
On Mon, 13 Aug 2007 13:15:42 +0200, Cami Sardinha wrote: 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 BUFFSIZE8191/* buffer size for reads and writes */ #define BUFSIZE 4095 #ifndef MAXFDS #define MAXFDS1023/* max file descriptors */ #endif Change at your own peril, if it breaks, you get to keep both pieces. ;) ;) Cool - thanks for the pointer. In fact MAXFDS is set to 4096 in the Makefile. I've altered it to 1024 and policyd now only uses 12456kB. 1024 should be more than enough slots for my use but we'll see... Any particular reason it was increased to 4096 in the Makefile? Did someone find 1023 wasn't enough or was it to be 'on the safe side'? Thanks, Dave - 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
Re: [policyd-users] Memory hog?
That was the reason i started Policyd, [...] Thanks - please keep up the good work! :) Dave. - 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