Trog wrote:


You can limit the number of concurrent threads, and hence memory by using the MaxThreads directive. That also limits the number of concurrent scans.



I did. MaxThreads 32

This clamd has been running for 7 hours, on a not-so-busy maliserver.

 PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
 1706 exim       9  58    0   41M 8064K sleep   16:43  4.30% clamd




It's using only 8M of memory. Nothing wrong with that.



If you look at the RES it's using 8M. I believe I mentioned earlier that the problem is not in RES,
but in SIZE. This time SIZE is 41M and RES 8M, my system still runs fine.
But SIZE can get realy, really big (over 3 GB used by clamd, on a system with 1 GB memory and 4 GB swap),
and the system will start complaining out-of-memory when all that time RES only shows 8-21 MB.


I suspect (might be wrong) that clamd DID call all necessary free()s, but the OS is unable
to return the memory back to system.
IF using fork instead of threads could help return this memory back to the OS
(again, I might be wrong about this), isn't it worth to try ?


If that indeed helps on some platform, then wouldn't providing both ways (fork and threads)
and let users pick which one they want (something like --with-mpm= directive in apache)
be a good thing?


Regards,

Fajar


------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ Clamav-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-users

Reply via email to