On Mon, Jun 10, 2013 at 3:33 PM, motty cruz <motty.cruz@xxxxxxxxx> wrote: > Hi Mike, > > Thanks for your replied; I'm using FreeBSD 9.1, here is the list of modules > > Loaded Modules: > core_module (static) > mpm_prefork_module (static) > http_module (static) > so_module (static) > authn_file_module (shared) > authn_anon_module (shared) > authn_default_module (shared) > authn_alias_module (shared) > authz_host_module (shared) > authz_groupfile_module (shared) > authz_user_module (shared) > authz_dbm_module (shared) > authz_owner_module (shared) > authz_default_module (shared) > auth_basic_module (shared) > auth_digest_module (shared) > file_cache_module (shared) > cache_module (shared) > disk_cache_module (shared) > dumpio_module (shared) > reqtimeout_module (shared) > include_module (shared) > filter_module (shared) > charset_lite_module (shared) > deflate_module (shared) > log_config_module (shared) > logio_module (shared) > env_module (shared) > mime_magic_module (shared) > expires_module (shared) > headers_module (shared) > usertrack_module (shared) > unique_id_module (shared) > setenvif_module (shared) > version_module (shared) > mime_module (shared) > dav_module (shared) > status_module (shared) > autoindex_module (shared) > asis_module (shared) > info_module (shared) > cgi_module (shared) > dav_fs_module (shared) > vhost_alias_module (shared) > negotiation_module (shared) > dir_module (shared) > imagemap_module (shared) > actions_module (shared) > speling_module (shared) > userdir_module (shared) > alias_module (shared) > rewrite_module (shared) > php5_module (shared) > Syntax OK > 1) run worker or event MPM instead of prefork 2) do not use mod_php, use php-fcgi 3) Disable all modules you do not use At the moment, serving an image/static content to a client is depriving you of a PHP worker - since each apache child handles only one request and each apache child has one PHP worker, and therefore you need more PHP workers to serve your dynamic requests, and therefore you need more apache children. Since each child can only serve one request at a time, if that client is slow or blocks, then the child cannot do anything until it has dealt with its current request. This means, again, you need more children. This is inefficient, serving static content is cheap and easy to do. Using worker means that each child can serve multiple requests at once, and using php-fcgi means that you can control the number of PHP workers you have to produce your dynamic pages independently of how many httpd workers you need. It also separates the PHP work into a separate process, so you can clearly see how much memory and CPU PHP uses, compared to apache httpd. Cheers Tom --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx