On Thu, 2004-09-16 at 04:58, Fajar A. Nugraha wrote:
> Trog wrote:
> 
> >Apache has been moving away from the "prefork-kind of daemon" towards
> >threads for a number of years.
> >  
> >
> Yes, but in case you didn't notice prefork is STILL the default MPM if 
> no specific one
> is chosen. It's for "compatibility purposes" mostly, for modules that 
> are not thread-safe yet.
> So it's still pretty much alive.

Sure, and I still use it extensively. But, the point is that you were
using the fact that Apache uses fork()ing as an argument for not using
threads, when in fact they are moving towards threads away from
fork()ing.

> 
> >The lifetime of threads in clamd is limited by the workload. If they
> >don't have any work to do for a period of time, then they exit.
> >  
> >
> What if they have lots of things to do all the time? (e.g. busy 
> mailservers).

Then they will keep processing work requests.

> The 3G memory usage that I talk about happens on the busiest server.
> The not-so-busy only uses hundreds of MB max.
> It might be a good idea to force-limit thread lifetime to a number of scans
> if it indeed helps return memory back to the OS (not sure about this one 
> though.
> Logically it should work).

Won't make any difference. The thread manager is completely separate
from the scanning engine. A memory leak in the scanning engine won't get
magically recovered by thread termination.

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



> >Have you tried the current CVS version?????? If not, do.
> >
> >  
> >
> I did. Upgraded daily, in fact. I build (and use) daily CVS snapshot for 
> many
> platforms, including Solaris (available on clamav.or.id).
> 
> Most recent CVS snapshot still have this problem (e.g memory not 
> returned to the OS).
> 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.

-trog

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to