Hi Antonio

RAM is a lot cheaper than CPU on a typical server.  I think letting
children sleep rather than killing them works better for most
environments.  That said, it would be nice to be able to grow/shrink a
pool of children on demand.  Since PHP is not threadsafe, that would
have to be a pre-forking model which could add significant processing
overhead for other users.  It would best be done in a separate handler
(uCherokee might benefit from this).

You were saying mod_php with apache2 used 1.5GB of RAM in this
environment.  Cherokee will still use less.  My suggestion would be to
look into refactoring some of your database cleanup script into
triggers.  This could add request time (possibly, depending on how
they're written) but reduce cleanup time and the associated table lock
time.  Perhaps have a look at MySQL slow queries logs to see if
adding/deleting an index or two might help get the cleanup done
faster.

I'm going to say something harsh and judgemental that isn't aimed at
you personally - but is a generalization.  Database cleanup scripts
are an unfortunate near-necessity in some cases, but usually there are
architectural flaws in the underlying application that can be fixed -
removing the need for cleanup scripts altogether.

One other interim fix if this doesn't work... How long does your
database cleanup script take to run immediately after it has just run?
 Could increasing the run frequency of your cleanup script improve
HTTP responsiveness?

Ryan

On Thu, Feb 26, 2009 at 5:29 AM, Antonio <[email protected]> wrote:
> Ok, I will set to 20 and try. I don't remenber where I read that 5
> (default) was enought.
>
> This is the first time I work with fcgi, I have read about it and as I
> can see you always have to set a number of childrens, there isn't an
> option or env var to set min or max threads, this would be a best
> option, so that when you are in low load don't waste memory and
> resources. What about PHP_FCGI_CHILDREN = 0 ? this will let php manage
> automatic numbers of threads ?
>
> _______________________________________________
> Cherokee mailing list
> [email protected]
> http://lists.octality.com/listinfo/cherokee
>
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to