httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Dessent <>
Subject Re: [users@httpd] server is sloooowww
Date Fri, 06 Feb 2004 19:14:21 GMT
"M.D. DeWar" wrote:
> Hello,
> I am not sure were my issue lies.
> I am running on freebsd 4.9 .
> apache 2.0.48
> mysql (was latest about 2 months ago)
> php 4.3.3
> ZendOptimizer is also installed.
> I run some postnuke sites.
> But they come up slow. very slow. worse than dialup at times.
> uptime shows
> # uptime
> 12:19PM  up 38 days, 17:24, 1 user, load averages: 1.57, 1.32, 1.21

I assume you've done all the easy stuff, like ensuring that all MySQL
communications happens over Unix domain sockets, persistent connections
are in use, and that your MySQL max_connections is not set way high or
too low.  These are probably all set right if you're using a stock-ish
PHP from ports and common scripts like PHP-Nuke.

I suggest that you install LinuxThreads from ports, and then recompile
MySQL with that type of threading, instead of the native threading
type.  I don't know which MPM you're using with Apache but if it's
threaded, do the same.  Take a look at Zawodny's blog for all kinds of
nuggets on tuning Apache and MySQL on FreeBSD.  Here's a good starting
entry: <>

Also, all the normal APache tuning tips apply.  Consider disabling
keepalives (Or turning the timeout way down) and using something such as
'lingerd' to free up as many idle workers as possible -- again this
applies to prefork, not sure about threaded.  Load mod_status and turn
on ExtendedStatus.  This will give you a good picture of what's going on
with the workers.  If a lot of them are in the 'K' state then you will
reap benefits from this.

Also consider serving all static content from a different server (if
only on a different port or IP address on the same machine), such as
thttpd or boa.  This will relieve Apache so that it can stick to the

But essentially, you need to determine what your critical path is:
- DB queries?  tweak MySQL buffer sizes, or disable DB-heavy features of
the site.  Check long queries, see what's blocking them.  "show
processlist" inside mysql is good here.
- PHP parsing/processing?  See if you can 'staticize' or pregenerate
some parts of the pages.
- Too many worker processes using up all the memory?  Try serving static
content from a seperate boa process, for example.
- Some kind of other slow query, like DNS lookups or something similar? 
Disable that feature.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message